Sonarqube Version: * Developer Edition * Version 9.2.4 (build 50792)
We have implemented PR analysis on TFS Checkins.
what are you trying to achieve
Now recently, in c#, the sonarqube is blocking one of PR analysis due to Congnitive Complexity. For the time being, we need to disable this rule, until we clear our code.
Rule Name: Cognitive Complexity of methods should not be too high
The rule is in C# > http://[SonarqubeServer]/coding_rules?rule_key=csharpsquid%3AS3776
When I am going into the RULES > filtering on C#, and searching for above mentioned rule, I can’t seem to DEACTIVATE it.
As you see in the interface, you can’t deactivate rules in child/inherited profiles.
Fortunately, Quality Profile updates aren’t what I recommend in your situation. Instead, just mark the one problematic issue “Won’t Fix”. That should free up your PR for merge.
For a question of a single issue, marking it Won’t Fix is probably best. But if you feel the rule simply isn’t appropriate for your situation in general, then deactivating it is indeed the best way to go. You’ll need to create a copy of the profile, set it as your default, and deactivate the rule in the copy.
Hi.
We have just upgraded to Version 10.3 (build 82913) and are not really happy with the rule java:S6813. we wanted to deactivte this rule in our inherited profile (From "Java Sonar’ way). It seems not to be possible.
Any ideas to deactivte except copying a complete ruleset?
thanks michael