...
Description / Features
The plugin provides static code enables analysis of web files Web projects within SonarSonarQube. Currently JSP and JSF are supported. Some initial support is provided for Ruby templating (erb files).
The following metrics are supported:
- sizing (files, lines of code)
- rules compliancy
- complexity
- duplication
- comments
The plugin scans the following files by default: .xhtml, .jspf, .jsp. The file extensions are configurable.
The plugin imports the source code in Sonar, calculates measurements and scans the code for violations, duplications and complexity. The checks are configurable in the Sonar rules repository.
It is compatible with the Issues Report plugin to run pre-commit local analysis.
Installation
- Install the Web plugin through the Update Center or download it into the SONAR SONARQUBE_HOME/extensions/plugins directory
- Restart the Sonar serverSonarQubeserver
Usage
Run
...
an Analysis with the
...
SonarQubeRunner (Recommended Way)
To launch a Sonar run an analysis of your Web project, use the Sonar 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.
...
The plugin uses a simple tokenizer to parse the web pages. The tokenizer is based on the sonar-channel library. The output of the tokenizer is analyzed by a set of analyzers and checks. Expressions written in the Unified Expression Language (EL) are validated with JBoss EL.
Roadmap Ideas
- Run analysis directly from maven (without sonar)
- More support for WCAG, webrichtlijnen
- Enhanced validation of unified expressions (using JSFUnit?)
- Dependency analysis
...
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
| JIRA Issues | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|

