This page documents version 3.2 of the SonarQube Eclipse plugin. For more recent versions, click here.
Two modes are available:
This is the default mode. Information showed in the remote mode is coming from a remote SonarQube server. This means that this information has been computed during the latest analysis on that server.
Thus, you will not see issues introduced in the code that you just added or changed.
When switching to the local mode, information displayed is coming from the latest local analysis.
Thus, you can see the issues introduced in the code that you just added or changed.
To switch from one mode to another, right-click on the project, then select Sonar > Mode > Remote or Local:
When switching to the Local mode, a local analysis will be run automatically.
At any time, to run another local analysis, right-click on the project, then select Sonar > Run Local Analysis:
Parameters to configure local analysis can be set in various places. Here is the hierarchy of parameters:
Some plugins (useless for a local analysis) can be skipped while performing a local analysis thanks to the
The default value is 'devcockpit,pdfreport,report,scmactivity,views'. For example, to skip the Build Stability plugin (due to https://jira.codehaus.org/browse/SONARIDE-346), set the property to 'devcockpit,pdfreport,report,scmactivity,views,buildstability'.
There are two ways to know when the last analysis was run on a project:
The Sonar Issues view displays the list of issues of the selected component (project, file, etc.):
To refresh the list of issues on the project, click on the Refresh button.
You can also add/remove columns, group issues (by severities, ...), filter issues (new issues only, issues, assigned to me, ...), sort (by assignee, ...), etc.
Note that "Resolved" issues are not displayed.
This view can be displayed by going to Window > Show View > Other... > Sonar > Sonar Issues. Problems and Markers views also display issues.
The Web view displays the main project dashboard (for project) or the component viewer (for class or file).
This web page can also be used to access information and services (Clouds, Hotspots, etc.) that are not available in SonarQube Eclipse.
This view is automatically displayed when clicking on Sonar > Open in Sonar server. It can also be displayed by going to Window > Show View > Other... > Sonar > Sonar Web Browser.
It happens when the source folders are not properly set in Eclipse.
Let's take the C/C++ project sample for instance. When you import it into Eclipse, by default the source folder is set to /cpp-sonar-runner (and not to /cpp-sonar-runner/src):
Therefore, SonarQube will try to retrieve data from files whose fully qualified names are src/BiggestUnInt.cc, src/HelloWorld.cpp, etc. It will find none as the fully qualified names in SonarQube are BiggestUnInt.cc, HelloWorld.cpp, etc. (without "src/"):
Hence, you won't get any issue displayed in remote mode in Eclipse.
But if you set the source folder to cpp-sonar-runner/src instead:
you will get issues displayed: