Cognitive Complexity and different severities

(Hermann Czedik Eysenberg) #1

Hi,
I’m working on a team of Java developers using and loving SonarQube.
The Cognitive Complexity rule is very helpful at pointing out smells in our code.

A nice extension would be to be able to configure the severity of an issue raised by the rule based on the complexity measured.
So e.g.
Complexity > 25 ==> Critical issue
Complexity > 15 ==> Major issue

Is this possible already?
If not, is this functionality something you could consider adding in a future version?

(Thanks to sonarsource for creating this excellent product!)

(G Ann Campbell) #2

Hi,

Thanks for the kind words.

It’s not possible to vary severity per rule, and regardless of what an intriguing idea it is to increase severity with distance from the threshold, this is not currently in our plans.

 
Ann