Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Issues Report plugin provides the ability to run local SonarQube TM analyses. The main use case is for a developer to check his/her code before pushing it to the SCM.

...

Info
titleSonar Eclipse Plugin
Note that to perform local analyses, a SonarQube TM Eclipse plugin is also available. It currently supports Java, C/C++ and Python.

...

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

 Usage

Note that you do not need to install any local SonarQube TM server and database.

Just run a SonarQubeTM analysis SonarQubeanalysis on your project with your favorite analyzer (SonarQube TM RunnerMaven or Ant). To run the analysis locally (without making the results available on the remote SonarQube TM server), just set the sonar.dryRun property to true and make sure that the sonar.host.url is properly set to match your remote SonarQube TM server.

To get a local report:

  • To generate an HTML report, set the 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 TM working directory; default is .sonar/issues-report.html for the SonarQube TM Runner and Ant, target/sonar/issues-report.html for Maven.
  • To display a short report in the console, set the sonar.issuesReport.console.enable property to true:


...

In the following example, SonarQube TM will only check the myCobolProgram.cbl Cobol program and ignore the other programs of the application. The analysis will be local: nothing will be pushed to the database, thus the results will not be available through the SonarQube TM server web interface. An HTML report will be generated to display the list of issues on the myCobolProgram.cbl file:

...