{iframe:src=http://update.sonarsource.org/plugins/issuesreport.html|width=700|height=250|frameborder=0} Your browser does not support iframes. {iframe} |
The Issues Report plugin provides the ability to run local SonarQube analyses on your machine. The main use case is for developers to check the code they have added or changed before pushing it to the SCM.
It generates an HTML report that displays a list of issues that can be filtered by severity, new issues (comparison made against the latest version available on the remote server), etc.
It supports all languages.
Here's an example of HTML report that you can download:
Note that to perform local analyses, a SonarQube Eclipse plugin is also available. It currently supports Java, C/C++ and Python. |
Note that you do not need to install any SonarQube server and database on your local machine. Just install and configure your favorite analyzer (SonarQube Runner, Maven or Ant).
Then, copy on your local machine the analysis configuration file of the project to analyze. Make sure that the sonar.sources
property refers to the directory containing your source code. The tree structure of the source code on your local machine must match the tree structure that has been remotely analyzed by SonarQube. Finally, run a local analysis:
# Set the "sonar.dryRun" property to "true" to run a local analysis sonar-runner -Dsonar.dryRun=true |
To get a local report:
sonar.issuesReport.html.enable
property to true
. To set the location of the HTML report, set the sonar.issuesReport.html.location
property: absolute or relative path to the SonarQube working directory; default is .sonar/issues-report.html for the SonarQube Runner and Ant, target/sonar/issues-report.html for Maven.sonar.issuesReport.console.enable
property to true
:sonar.inclusions
property can be set.
sonar-runner -Dsonar.dryRun=true -Dsonar.issuesReport.html.enable=true -Dsonar.inclusions=myCobolProgram.cbl |
Note that the Issues Report plugin is not yet compatible with multi-module projects. See https://jira.codehaus.org/browse/SONARPLUGINS-2805. |