Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{iframe:src=http://updateredirect.sonarsource.orgcom/plugins/web.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 Web plugin, you can have a look at the analysis of the Shopizer project on Nemo.

Description / Features

The plugin enables analysis of Web projects within SonarQube. Currently JSP and JSF are supported. Some initial support is provided for Ruby templating (erb files). 

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 SonarQubeserver

Usage

Run an Analysis with the SonarQubeRunner (Recommended Way)

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

A sample project is available on github that can be browsed or downloaded/projects/languages/web/web-sonar-runner.

Run an Analysis with the other Analyzers

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

Metrics

See Metrics documentation page.

Complexity
Complexity of the web page is measured by counting the decision tags (such as if and forEach) and boolean operators in expressions ("&&" and "||"), plus one for the body of the document. It is a measure of the minimum number possible paths to render the page.

The decision tags and the operators are configurable. For details see rules library

Duplication
Duplication is counted by comparing tokens. Duplication is reported if more than a minimum amount of tokens are replicated (in the same file or another file). The default minimum tokens is set to 70.

Comments
Comments are counted by adding the lines for server side and client side comments.

Rules

There are about 20 checks in the library. Please read the documentation of the checks on the page Web Rules Library.

The ruleset is inspired on the following standards and guidelines:

Roadmap Ideas

  • More support for WCAG, webrichtlijnen
  • Enhanced validation of unified expressions (using JSFUnit?)
  • Dependency analysis

Change Log

JIRA Issues
anonymoustrue
titleRelease 2.0 (not yet released)
renderModestatic
width900
columnstype;key;summary;priority;status
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+%22WEB-2.0%22+ORDER+BY+priority+DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.2
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+%22WEB-1.2%22+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000

 

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

 

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

 

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

 

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

 

JIRA Issues
anonymoustrue
titleRelease 0.1
height250
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16708&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

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