Search code examples
sonarqube

SonarQube: How to deactivate rules in a default Quality Profile?


I have the default profile for Java in SonarQube called Sonar way. Default QualityProfile

When I try to deactivate any rules in it, there is no way I can do it.

Default Rules

How do I specifically disable rules for this profile?


Solution

  • You do not. Starting with SonarQube 6.5 default profiles are not editable. Instead, make a new profile and copy the Sonar way rules into it. Then you'll be able to edit your copy.

    If after each upgrade you want to make sure you haven't missed any exiting new rules, just compare your copy with Sonar way and edit your profile to handle the differences.