Simple demo project to run a Sonar analysis on a js project.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src enhanced makefile Apr 18, 2013
test/core added one test + test directory in sonar-project.properties Apr 16, 2013
tools added the node js profile Apr 25, 2013
.gitignore enhanced makefile Apr 18, 2013
.jshintrc
Makefile make file changes Apr 25, 2013
README.md updated readme to indicate the need of the sonar js plugin Apr 20, 2013
package.json
sonar-project.properties enhanced makefile Apr 18, 2013

README.md

sonar-js

Simple demo project to run a Sonar analysis on a js project.

Prerequisites

The actual configuration in sonar-project.properties assumes the Sonar server is running on http://localhost:9000.

You can change that by specifying the right values in sonar-project.properties (see http://docs.codehaus.org/display/SONAR/Analysis+Parameters).

Running

  • Install node dependencies with npm install
  • Run the ci task with make ci
  • Check the results : http://localhost:9000 or wherever.

Tasks in the Makefile

  • Clean with make clean
  • Run tests with make test
  • Run tests and generate a xunit compatible file with make xunit
  • Run coverage analysis and generate a lcov compatible file with make coverage
  • Run coverage analysis and generate a cobertura compatible file with make coverage
  • Run jshint with make jshint
  • Run jhsint and generate a checkstyle compatible file with make checkstyle
  • Run the Sonar analysis with make sonar
  • Run a CI related set of tasks make ci

All generated files are generated in the reports folder.

Only tested on linux, you may have to adapt some stuff on other platforms.