Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{iframe:src=http://updateredirect.sonarsource.orgcom/plugins/javascript.html|width=700|height=250300|frameborder=0}
YourDocumentation browserhas doesbeen notmoved support iframes.
{iframe}
Tip
titleLive example

If you want to see a live example of the capabilities of the JavaScript plugin, you can have a look at the analysis of the jQuery project on Nemo.

Description / Features

The plugin enables analysis of JavaScript projects within SonarQubeTM.

It is compatible with the Issues Report plugin to run pre-commit local analysis.

Installation

  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. Restart the SonarQubeTM server

Usage

Run an Analysis with the SonarQubeTM Runner (Recommended Way)

To run an analysis of your JavaScript project, use the SonarQubeTM 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.

Unit Tests and Code Coverage Reports

Reports from JsTestDriver can be imported into SonarQubeTM.

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

Metrics

See Metrics documentation page.

Extending Coding Rules using XPath

New coding rules can be added using XPath. See the related documentation.

To navigate the AST, download the SSLR JavaScript Toolkit.

Change Log

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

 

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

to [http://redirect.sonarsource.com/plugins/javascript.html].
{iframe}