Full documentation for SonarQube has moved to a new location: http://docs.sonarqube.org/display/SONAR

Versions Compared

Key

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

...

At any time, to run another local analysis, right-click on the project, then select Sonar > Run Local Analysis:

If some Sonar properties must be specifically passed to the local analysis, this can be achieved at 2 different levels (only with Sonar Eclipse 3.1+):

...

  • Those properties will be passed to any local analysis run by Eclipse in "Local mode" 

...

Local Analysis Parameters

Parameters to configure local analysis can be set in various places. Here is the hierarchy of parameters:

  • Parameters defined in the Sonar Web UI
  • Parameters set in the pom.xml file (for Maven projects only, with the m2e connector installed) will override parameters defined in the UI
  • Parameters defined in Eclipse will override  parameters defined in the pom file (go to Window > Preferences > Sonar > Local analysis properties)
  • Parameters defined at project level in Eclipse will override parameters defined at Eclipse level (right click on the project and go to Properties > Sonar > Local analysis properties)
Info
titleExcluding Plugins

Some plugins (useless for a local analysis) can be skipped during the local analyses while performing a local analysis thanks to the 'sonar.dryRun.excludePlugins' property (Settings > Configuration > General Settings > General).

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'.

 

Last Analysis Date

There are two ways to know when the last analysis was run a project:

  • Right-click on the project in the Project Explorer, and then Properties > Sonar
  • This date can be displayed on the navigation views, like the Project explorer or the Navigator. This option is not active by default. To activate it, go to Window > Preferences > General > Appearance > Label Decorations and check Sonar Analysis Date Decorator:

Image Added

Violations View (displays local or remote information depending on the selected mode)

...

Note that Problems and Markers views also displays display Sonar violations.

Web View (displays remote information only)

...

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 > Web.

Last analysis date

It is possible to easily know when the last analysis occurred on a project:

  • This date is displayed when going on the "Sonar" panel in the project properties
  • This date can be displayed in the navigation views, like the Package explorer or the Navigator. This option is not active by default and should be activated in Eclipse preferences "General > Appearance > Label decorations" (check "Sonar Analysis Date Decorator"). This will look like this:

Image Removed