Grunt-Complexity
A grunt task that utilizes complexity-report to evaluate the complexity and maintainability of code.
Versions
- Use version 0.0.7 for Grunt 0.3.x
- Use versions 0.1.x for Grunt 0.4.x
Usage
npm install grunt-complexity --save-dev
Within your grunt file:
// Project configuration. grunt; grunt; grunt;
What is Cyclomatic and Halstead?
Documentation on this to come. For now, see jscomplexity.org
Reporter
Set the broadcast
option to true
to send the aggregated data over the
grunt-event bus.
Emitted events are:
grunt-complexity.start
grunt-complexity.maintainability, payload
grunt-complexity.end
// payload of grunt-complexity.maintainability filepath: /path/to/file valid: true|false maintainability: 12342
Contributing
This repo has a submodule, so after you npm install
, you'll want to run:
git submodule initgit submodule updatecd test/grunt.0.4npm installcd ...
Tests can be run with npm test
.
License
grunt-complexity
is released under the MIT License.
Contributors
- Nate Hunzaker(nhunzaker)
- Golo Roden (goloroden)
- Tomasz Drwięga (tomusdrw)
- Doug Avery (averyvery)
- Jozsef Kozma (jzsfkzm)
- Patrick Williams (pwmckenna)
- Luís Couto (Couto)
- Roman Liutikov (roman01la)
- Nick Weingartner (streetlight)
- David Linse (davidlinse)
- Tim Carry (pixelastic)
Visit code.viget.com to see more projects from Viget.