Versions Compared

Key

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

...

Info

This page documents how to browse Sonar SonarQubeTM in Eclipse for versions 3.2+.

For versions prior to 3.2, browse this page.

Local and Remote Mode

When using Sonar in Eclipse, two Two modes are available:

Remote Mode

This is the default mode. Information showed in the remote mode is coming from a remote Sonar SonarQubeTM server. This means that this information has been computed during the latest analysis on that server.

...

To switch from one mode to another, right-click on the project, then select Sonar > Mode > Remote or Local:

Image RemovedImage Added

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:

Image RemovedImage Added

Local Analysis Parameters

...

  • Parameters defined in the Sonar SonarQubeTM 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 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'.

...

  • 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 RemovedImage Added

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

The Sonar Issues view displays the list of issues of the selected resource (project, file, etc.):

Image RemovedImage Added

To refresh the list of issues on the project, click on the Refresh button.

...

This view can be displayed by going to Window > Show View > Other... > Sonar > Sonar Issues. Problems and Markers views also display Sonar issues.

Sonar Web Browser View (displays remote information only)

...

This web page can also be used to access information and services (Clouds, Hotspots, etc.) that are not available in Sonar SonarQubeTM Eclipse.

Image RemovedImage Added

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.

...