Adrian Mitev
Adrian Mitev

Reputation: 4752

SonarQube: Profile inheritance and rule deactivation

I've read the docs about profile inhertiance [1]. They say that "A rule inherited from a parent cannot be deactivated". Is this on purpose and will it be supported in the future?

When I upgrade some plugin (i.e. the JavaScript analysis plugin) there are new rules and I have to restore the built-in profile "Sonar Way" in order to get the new rules. However when I do this I lose all the previous configurations (deactivated rules) and I have to remember what I've done in the past and repeat that again.

Upvotes: 4

Views: 2871

Answers (1)

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22804

It sounds like you're using the built-in profile as your default profile. If you're happy with the built-in profile as-is, then that's a great way to go. But it sounds like you're not. So instead, I'd suggest you make a copy of Sonar Way, I'll call it 'Copy', and set it as your default profile. Then after each upgrade, you can reset Sonar Way, use the comparison service to see the differences between Copy and Sonar Way and then choose which new changes to apply in Copy.

Upvotes: 5

Related Questions