Sonar

Checkstyle suppressions to be managed by sonar

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.2
  • Fix Version/s: None
  • Component/s: Checkstyle, Rules
  • Labels:
    None
  • Number of attachments :
    0

Description

checkstyle suppressions XML cannot be handled by Sonar through the GUI

Issue Links

Activity

Hide
Allan Shoup added a comment -

FYI, this looks similar to the issue described in this thread [1]. Were the old issues not migrated with the move to the Codehaus Jira system?

[1] http://groups.google.com/group/sonar-user/browse_thread/thread/a8c4f82f84c8ebeb

Show
Allan Shoup added a comment - FYI, this looks similar to the issue described in this thread [1]. Were the old issues not migrated with the move to the Codehaus Jira system? [1] http://groups.google.com/group/sonar-user/browse_thread/thread/a8c4f82f84c8ebeb
Hide
Simon Brandhof added a comment -

It seems we forgot this one. Thanks Allan.

Show
Simon Brandhof added a comment - It seems we forgot this one. Thanks Allan.
Hide
Allan Shoup added a comment -

Can you describe your approach to this bug?

If I have a an XML file configured that resides in my project that suppresses particular warnings, will it read that XML file?

Show
Allan Shoup added a comment - Can you describe your approach to this bug? If I have a an XML file configured that resides in my project that suppresses particular warnings, will it read that XML file?
Hide
Freddy Mallet added a comment -

Allan, I think we're going to privilege a solution based on SuppressionCommentFilter and SuppressWithNearbyCommentFilter. The idea is to be able to configure those filters in the Configuration -> Settings -> Checkstyle page.

The Sonar administrator will then be able to :

  • Activate / Deactivate those filters
  • Optionally define all their properties

To my mind, the use of an external xml file is not userfriendly and is totally redundant with those filters.

Show
Freddy Mallet added a comment - Allan, I think we're going to privilege a solution based on SuppressionCommentFilter and SuppressWithNearbyCommentFilter. The idea is to be able to configure those filters in the Configuration -> Settings -> Checkstyle page. The Sonar administrator will then be able to :
  • Activate / Deactivate those filters
  • Optionally define all their properties
To my mind, the use of an external xml file is not userfriendly and is totally redundant with those filters.
Hide
Allan Shoup added a comment -

I agree that the comment suppressions are useful, especially for isolated warnings. Where the XML file is beneficial is in suppressing multiple violations without adding comments for each one. For example, it allows you to suppress magic number checks in all test code rather than cluttering the code with all the comment suppressions.

Show
Allan Shoup added a comment - I agree that the comment suppressions are useful, especially for isolated warnings. Where the XML file is beneficial is in suppressing multiple violations without adding comments for each one. For example, it allows you to suppress magic number checks in all test code rather than cluttering the code with all the comment suppressions.
Hide
Freddy Mallet added a comment -

In a first time, we are going to implement the SuppressionCommentFilter : SONAR-280

Show
Freddy Mallet added a comment - In a first time, we are going to implement the SuppressionCommentFilter : SONAR-280
Hide
Allan Shoup added a comment -

I went ahead and logged SONAR-738 to track the XML suppression filter.

Thanks.

Show
Allan Shoup added a comment - I went ahead and logged SONAR-738 to track the XML suppression filter. Thanks.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: