0.1.0 • Published 8 years ago

grunt-complexity-report v0.1.0

Weekly downloads
27
License
-
Repository
github
Last release
8 years ago

Synopsis

Run complexity-report against javascript source code from grunt build.

Code Example

grunt.loadNpmTasks('grunt-complexity-report');
 
grunt.initConfig({

  complexity : {
    js: {
      files : [{ cwd: '.', src: ['/**/*.js'], expand : true}],
      exclude: [],
      options: {
        pmdXML: '/pmd.xml',
        teamcity: true  //send buildStatisticValue to TeamCity
      }
    }
  };
  
});

Motivation

This project is based on the excellent grunt-complexity from vigetlabs. Unfortunately there are some bugs/missing features that stopped me from using it and the project seems to have been abandoned.

This uses the same concepts, but adds the ability to break on different levels of severity, making it more useful as a reporting tool. It also treats maintainability as a similar error to complexity, enabling it to fit within a single report style.

It currently only outputs to console and PMD format, but would be easy to extend to other XML formats.

Installation

npm install grunt-complexity-report

Contributors

Stuart Campbell (campbes)

License

Released under the MIT License