Tells your continuous integration server everything about your JS-code.
This currently only works with Javascript MVC/DoneJS.
- Outputs a Checkstyle-compatible file, graphs and HTML
- Shows JSLint-violations
- Analyzes and warns about cyclomatic complexity
- Analyzes and warns about short variable names
- Shows dependencies between objects
- Shows events shared between objects
- Shows global code size metrics
- Works on the command line
- Requirements: Graphviz, JavascriptMVC/DoneJS-project
- Copy the whole directory into an analyzer-directory directly below your JS-root-directory.
- Configure js/config.js to fit your needs and directory structure.
- Call bin/analyze from your continuous integration server.
- Analyze output:
- checkstyle_js.xml: Checkstyle-compatible
- js-dependencies.html: file containing dependency matrix
- js-dependencies-d3.html: file containing collapsible dependency graph
- js-dependencies.svg: file containing detailed dependency graph
- openajax-events.svg: file containing graph showing OpenAjax-events
- js-statistics.html: file containing global code size-metrics
analyzer/bin/analyze
- -h for help
- -i for interactive mode (re-check on key-press)
- -s for silent-mode
- -no-cyclo to disable cyclomatic complexity-check
- -no-stat to disable printing statistics
- -c for command-line output
- lastzero's liquid jslint is the piece of software this is derived from.
- douglascrockford's JSLint is used for basic style checking.
- ariya's esprima is used for more heavy-weight analysis
- The global code size-thresholds are taken from pdepend