Suppress only some rules of a quality profile for a project


  • We are using SonarQube 6.7.7 LTS at the moment.
  • We use Apache Maven for building software mostly.
  • For our division we decided to implement a set of rules for Java as a quality-profile.
  • Some of the rules are not useful for e.g. legacy code.
  • However there are variations and we would end with a bunch of quality-profiles
  • Is it possible to suppress some rules for a project?
  • For exclusions of files there is sonar.exclusions, which is a comma separated list of Ant patterns.
  • Is there some similar like sonar.suppressedRules where I can state a comma separated list like “squid:S1197,squid:S2344” as well?



Putting aside that the point of Quality Profiles is to be able to adjust them for the specific needs of a project or set of projects, I would recommend reviewing the “Ignore Issues” section of our documentation on Narrowing the Focus, which describes a couple ways of accomplishing what you’ve laid out.


1 Like

Thanks, I’ll take a look. Just for the record: is the LTS version of the document, unfortunately not directly linked via the standard documentation pages.s