Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube analysis mode: preview vs issues

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?

like image 920
Radu Dumbrăveanu Avatar asked Jun 30 '16 09:06

Radu Dumbrăveanu


People also ask

What happens during the analysis of code in SonarQube?

What happens during analysis? During analysis, data is requested from the server, the files provided to the analysis are analyzed, and the resulting data is sent back to the server at the end in the form of a report, which is then analyzed asynchronously server-side.


2 Answers

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.

like image 143
Julien H. - SonarSource Team Avatar answered Sep 29 '22 12:09

Julien H. - SonarSource Team


sonar.analysis.mode Deprecated since SQ 6.6. see https://docs.sonarqube.org/latest/analysis/analysis-parameters/

like image 28
mturra Avatar answered Sep 29 '22 12:09

mturra