Versions Compared

Key

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

...

As the main use case is for developers to check the code they have added or changed before pushing it back to the SCM, the Issues Report plugin is usually used in Preview preview mode. This is this usage that is detailed below.

Install your favorite analyzer (SonarQube RunnerMaven or Ant) on your local machine. You only have to set the sonar.host.url property to point to your remote SonarQube server (connection settings to the remote database do not have to be provided for a Preview preview as no data is pushed to the database).

...

To display a short report in the console, set the sonar.issuesReport.console.enable property to true:

Finally, run a Preview that preview that generates an HTML report:

 

Code Block
languagebash
# Set the "sonar.dryRun" property to "true" to activate the Previewpreview mode
sonar-runner -Dsonar.dryRun=true -Dsonar.issuesReport.html.enable=true

Another useful feature is to limit the scope to the files that have been recently created or modified. To do so, the sonar.inclusions property can be set. In the following example, only the myCobolProgram.cbl Cobol program will be checked:

...