15
votes

Using SonarQube, we wish to create a new quality profile from an existing profile, but deactivate a couple of the rules. The GUI allows us to modify the severity of inherited rules, but not deactivate the rules.

Is there any way to achieve this?

A workaround is to copy the profile and modify it, but we wish to retain the link to the original profile so that our inherited profile picks up any changes that are made to the original profile.

2

2 Answers

17
votes

Independent of the used profile, you can always ignore rules on the project level: Go to the project's Administration --> General Settings menu. From there, go to Analysis Scope --> Issues.

Add the rule(s) you want to ignore to the Ignore Issues on Multiple Criteria list with ** as File Path Pattern.

8
votes

It is not possible to deactivate a rule inherited from a parent quality profile.