Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{iframe:src=http://update.sonarsource.org/plugins/javascript-confluence.html|width=700|height=250350|frameborder=0}
Your browser does not support iframes.
{iframe}

...

The plugin enables analysis of JavaScript projects within Sonarwith SonarQube.

Installation

  1. Install the JavaScript plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
  2. Restart the Sonar server

Usage

Run a Sonar Analysis with the Sonar Runner (Recommended Way)

To launch a Sonar

Include Page
Include - Plugin Installation
Include - Plugin Installation

Usage

Run an Analysis with the SonarQube Runner (Recommended method)

To run an analysis of your JavaScript project, use the Sonar SonarQube Runner.

A sample project is available on GitHub that can be browsed or downloaded: /projects/languages/javascript/javascript-sonar-runner.

Run

...

an Analysis with the other Analyzers

Maven and Ant can also be used to launch analysis on JavaScript projects.

...

Code Coverage

...

To display code coverage data:

  1. Prior to the SonarQube analysis, execute your unit tests and generate the LCOV report.
  2. Import this report while running the SonarQube analysis by setting the sonar.javascript.lcov.reportPath property to the path to the LCOV report. The path may be absolute or relative to the project base directory.

A sample project is available on Github ( can be browsed or downloaded): this is a JavaScript project analyzed with the Sonar Runner reusing unit tests and code coverage reports generated with JsTestDriver. It is located in /projects/languages/javascript/javascript-sonar-runner-JsTestDriver.lcov

Metrics

See Metrics documentation page.

...

To navigate the AST, download the SSLR JavaScript Toolkit.

Change Log

...

Release Notes

Version 1.

...

 

JIRA Issues
anonymoustrue
titleVersion 1.3
height60
renderModestatic
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=19052&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleVersion 1.2
height60
renderModestatic
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=18832&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleVersion 1.1
height60
renderModestatic
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=18572&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleVersion 1.0
height60
renderModestatic
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=18248&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleVersion 0.4
height60
renderModestatic
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17247&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleVersion 0.3
height60
renderModestatic
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17199&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

5

It is no longer possible to:

  • let SonarQube drive the execution of unit tests
  • import unit test execution reports