Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

Table of Content

Features

FeatureScreenshot
Static code analysis with JSLint
 Expand...

Unit test and code coverage reports with JsTestDriver
 Expand...

 

Code metrics:

  • sizing (files, lines of code)
  • duplication
  • comments
  • cyclomatic complexity (function complexity, file complexity, complexity density)
 Expand...

 

Usage & Installation

Installation

  1. Install JavaScript plugin through Update Center
  2. Restart Sonar

Analysis with Maven

Create a maven pom for your project and run "mvn sonar:sonar" to run analysis and import JsTestDriver results

Sample pom.xml

Sample JavaScript project analysis with Maven

  1. Checkout http://javascript-plugin-for-sonar.googlecode.com/svn/trunk/sample

  2. Update <browser> in pom.xml to point to browser where JavaScript unit tests should be run

  3. Run "mvn test" to execute JsTestDriver unit tests and gather code coverage statistics
  4. Run "mvn sonar:sonar" to analyse JavaScript code and import unit test results

Analysis with simple Java runner

  1. Download latest version of Simple Java Runner
  2. Create sonar-project.properties file for your project

 

Sample sonar-project.properties

Sample JavaScript project analysis with Simple Java Runner

  1. Checkout https://javascript-plugin-for-sonar.googlecode.com/svn/trunk/sample-simple-runner

  2. Change "<base_dir>" placeholders to actual path in sample JsTestDriver coverage file "jstestdriver/jsTestDriver.conf-coverage.dat"

  3. Run "sonar-runner"

Unit Tests and Code Coverage Reports

Unit test and code coverage reports produced by JsTestDriver. Integrated through jstd-maven-plugin.

Changelog

Loading

Release 0.5 (${entries.size()} issues)

Type Key Summary Priority Status Resolution

Loading

Release 0.4 (${entries.size()} issues)

Type Key Summary Priority Status Resolution

Loading

Release 0.3 (${entries.size()} issues)

Type Key Summary Priority Status Resolution

Roadmap Ideas

 

  • No labels