Domanda

Today, i've upgraded Sonar from version 3.1.1 to 3.7 and got a problem and spent many hours to solve it.

I want to share because i don't know if it's Sonar issue or a bad usage of our team...

After the installation of Sonar 3.7, all my analysis were on failure...

The cause was the "Double Checked Locking" Checkstyle rule that has been deleted in Checkstyle 5.6 but seemed to be still executed in my analysis.

I checked quality profiles in sonar but the rule was not activated for any profile...

However, the export of the Checkstyle configuration file from the permalink was containing the rule!!!!

I've tried to create a new profile with a Checkstyle configuration file without the rule, but the export was always the same...

So i asked to my colleague who configured the quality profile the first time i've installed Sonar... and he found the problem in ~5min...

When he configured the profile, he put an entire Checkstyle configuration file (containing the rule) in the global Java Checkstyle parameters (Configuration > Parameters > Java > Checkstyle > Filters). The export of the Checkstyle configuration used for my analysis was the value of the "sonar.checkstyle.filters" and not a real export of the profile configuration.

So I'm wondering if it's a Sonar issue or a normal behaviour and a bad usage of our team...

Thanks for your help!

È stato utile?

Soluzione

@Matthieu, this is definitely due to a bad usage of this General Settings > Java > Checkstyle > sonar.checkstyle.filters property which must be used only to activate one of those three following filters : SuppressionCommentFilter, SuppressWithNearbyCommentFilter and SuppressionFilter.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top