Grunt-Complexity
[Still a significant work in progress]
A grunt task that utilizes complexity-report to evaluate the complexity and maintainability of code.
Usage
npm install grunt-complexity --save
Within your grunt file:
// Project configuration.
grunt.initConfig({
complexity: {
generic: {
src: ['grunt.js', 'tasks/grunt-complexity.js'],
options: {
cyclomatic: 3,
halstead: 8,
maintainability: 100
}
}
}
});
grunt.registerTask('default', 'complexity');
What is Cyclomatic and Halstead?
Documentation on this to come.