SonarQube analysis mode: preview vs issues

Radu Dumbrăveanu picture Radu Dumbrăveanu · Jun 30, 2016 · Viewed 21.6k times · Source

Which are the key differences between these preview and issues modes of SonarQube (greater than 5.2) analysis?

Considering http://docs.sonarqube.org/display/SONAR/Concepts the main differences between publish and preview is that preview reports only issues (no measures) and no report is pushed back to the SonarQube server; this idea is clear. But what about issues? It is written that issues is the same as preview, but should be used only for tools development. I'm a little confused, what do they mean by tools?

Answer

The theory is that preview mode is what a end user should use for example when using issues report feature. The goal is to run an analysis without publishing results. The issues mode is a technical mode similar to preview but focusing only on issues. It can be used in combination with one of the pull request analysis plugin (like GitHub plugin).

Now in practice, in SonarQube 5.6, they are doing exactly the same thing. It is a bit confusing I admit, so maybe we could try to simplify this.