Issues can then be filtered by severity, new issues only, etc.
|Note that a while the Issues Report plugin supports every language, there is also support for certain languages within the IDE. The SonarQube plugin for Eclipse is also available. It currently supports Java, C/C++ and Python. The SonarQube plugin for IntelliJ supports Java.|
Install your favorite analyzer (SonarQube Runner, Maven 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 analysis as no data is pushed to the database). Note that you don't need to install any SonarQube server on your local machine.
Copy the configuration file (sonar-project.properties, pom.xml, etc.) that is used to analyze the project on the remote server to your local machine. Make sure that the
sonar.sources property refers to the directory containing the source code on your local machine (or update it accordingly). 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 preview analysis that generates an HTML report:
# Since SonarQube 4.0 sonar-runner -Dsonar.analysis.mode=preview -Dsonar.issuesReport.html.enable=true # Prior to SonarQube 4.0 sonar-runner -Dsonar.dryRun=true -Dsonar.issuesReport.html.enable=true
Even more useful, you can limit the scope of the analysis to the files that have been recently created or modified (i.e. incremental mode):
# Since SonarQube 4.0 sonar-runner -Dsonar.analysis.mode=incremental -Dsonar.issuesReport.html.enable=true # Prior to SonarQube 4.0, the files have to be manually listed sonar-runner -Dsonar.dryRun=true -Dsonar.issuesReport.html.enable=true -Dsonar.inclusions=myCobolProgram.cbl,...