Versions Compared

Key

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

...

Managing Existing Violations

When going through the source code, Sonar in Eclipse will highlight to you the existing violations. The idea is that once you have read the code and understood it, the cost of fixing a violation is low.

Fixing a Violation

Go through the Violations view Problems view that displays the list of violations of the selected resource (project, file, etc.):Image Added

Image Removed

A double-click on a violation opens the source code editor and highlights the violation:

...

Once a violation has been fixed, you can simply delete it by clicking on the violation icon and then by selecting the Delete violation item. Deleting a violation also removes it from the Violations viewthe Problems view:

Creating a Review (Remote)

...

Note
titleKnown limitations

This Mylyn extension has currently the following limitations that should be quickly fixed:

  • There is no way to create a review that doesn't relate to an existing violation
  • There is no way to create a Mylyn query with filters in order for instance to retrieve reviews only on a project, or reviews assigned to another user
  • There is no way to add a review to an action plan: SONARIDE-286

...

When adding or changing the code of an application, Sonar in Eclipse provide the ability to show the quality of this code prior to committing back to the SCM.

 

Note
titleKnow limitation on differential services

This use case is currently not fully supported since Sonar Eclipse does not provide a differential mode yet. It is therefore not possible to differentiate what defect was there before from what has been added by the changes.

...

To run a local analysis, switch to the local mode. As soon as this mode is selected a local analysis is launched run to update the Violations and Measures Problems views.

Later, at any time, you can run a new local analysis by clicking on Sonar on Sonar > Run Local Analysis

Note
titleBe Careful

Even in local mode, the Hotspots and Web views still display remote data.