Skip a rule from SonarQube

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) 7.4.1
  • what are you trying to achieve : Skip default rule
  • what have you tried so far to achieve this : We want to skip some minor issues reported by SOnar qube, could you please let us know the process?

Hi,

I see two different questions here, although perhaps you didn’t intend that.

If you don’t want the rule to run - if you want it to report 0 issues - simply remove it from your Quality Profile. If you’re currently using a default profile, then you’ll need to create your own copy and remove the rule from it.

If you still want the rule to be executed during analysis, but only want some issues ignored, you can do that by marking them Won’t Fix, or by setting exclusions, altho this section option is more complicated. If it’s really only a couple issues you want to suppress, I would just mark them Won’t Fix. Note that you’ll need the Administer Issues permission on the project to do that.

 
HTH,
Ann