Exclude some SonarQube rules for certain files in sonar.properties


(Sylvia Werth) #1

I know it is possible to exclude some rules for certain files in the SonarQube UI but I did not find anything about excluding this in the sonar.properties file.

Everything I found was how to exclude files and directories for all rules, but is it possible to restrict this to only one rule in the sonar.properties ?


(G Ann Campbell) #2

Hi,

It’s possible to do this, but extremely tricky to get right. Please, for both our sakes, just use the UI.

 
:slight_smile:
Ann


(Sylvia Werth) #3

Hi Ann,

thank you for your answer. I would use the UI but we need this in my company for a big project. Do you have some kind of how-to even if it is tricky? Or do you have an URI where to find something about it? I googled a lot but did not find anything.

Greetings,
Sylvia


(G Ann Campbell) #4

Hi Sylvia,

Honestly I don’t. Your best bet is to submit a request via the UI and sniff what gets sent.

Ann