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 58 Next »

Live example

Icon

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

Loading

Release 2.0 (not yet released) (39 issues)

Type Key Summary Priority Status
Task SONARPLUGINS-2699 Remove "sonar.cpd.web.minimumTokens" property from UI Major Closed
Task SONARPLUGINS-2892 Remove the RegularExpressionCheck rule Major Closed
Bug SONARPLUGINS-2891 NPE thrown by the 'RegularExpressionCheck' rule Major Closed
Bug SONARPLUGINS-2915 DocTypeCheck should be removed Major Closed
Task SONARPLUGINS-2910 Correct pom.xml Major Closed
New Feature SONARPLUGINS-2908 Rule: Image elements or image button should have an 'alt' attribute Major Closed
Bug SONARPLUGINS-3026 AvoidCommentedOutCodeCheck: Improve title, description and issue message Major Closed
Bug SONARPLUGINS-3024 LibraryDependencyCheck : Update title, description and violation message and make it multiple cardinality Major Closed
Task SONARPLUGINS-3019 Reimplement MaxLineLengthCheck Major Closed
Bug SONARPLUGINS-3018 HeaderCheck Improve violation message, rule title and description and the line at which violations are reported Major Closed
New Feature SONARPLUGINS-3013 Table headers use scope or id attribute Major Closed
New Feature SONARPLUGINS-3010 Rule: Links with identical texts should have identical targets Major Closed
Bug SONARPLUGINS-3004 HeaderCheck can lead to NPE Major Closed
Bug SONARPLUGINS-3005 LibraryDependencyCheck Can lead to an NPE Major Closed
New Feature SONARPLUGINS-3003 Rule: Semantic <strong> and <em> tags should be used in place of syntactic <b> and <i> tags Major Closed
New Feature SONARPLUGINS-3001 Rule: The 'width' and 'height' attributes of a 'img' tag should always be defined Major Closed
New Feature SONARPLUGINS-3000 Rule: Each 'header' tag should contain a 'favicon' declaration Major Closed
Improvement SONARPLUGINS-2998 Review the Sonar way profile Major Closed
New Feature SONARPLUGINS-2997 Rule: Form fields should have labels properly associated Major Closed
New Feature SONARPLUGINS-2996 Rule: HTML pages should have a title Major Closed
Showing 20 out of 39 issues Refresh

 

Loading

Release 1.2 (13 issues)

 

Loading

Release 1.1 (6 issues)

 

Loading

Release 1.0.2 (1 issues)

 

Loading

Release 1.0.1 (1 issues)

 

Loading

Release 1.0 (21 issues)

Showing 20 out of 21 issues Refresh

 

Loading

Release 0.1 (5 issues)

  • No labels