Class exclusion does not work


(Artem) #1

Hello, I using SonarQube v6.7.4 and have troubles with class exclusion from coverage.
I used maven property <sonar.coverage.exclusions>**/</sonar.coverage.exclusions>
but it does not works. May be any other approach is exist to exclude class from coverage? Or it is ony one way to do this?
Thank you!

Sonar.coverage.exclusions not working
(G Ann Campbell) #2


Have you tried setting this from the UI? Exclusions are multi-value properties and can be tricky to set properly via configs.


(Artem) #3

Thank you for you answer!
No, i does not try this, because i can’t find where i can configure this. Do you know how to do this (i mean proper section of menu or something else)

(Emre Dundar) #4

Hi Artem,

Please try to go: Administration > General Settings > Analysis Scope > Code Coverage

(Senthil Kumar Pandiyarajan) #5

sonar.coverage.exclusions property is need to use against .java / .class files?

(G Ann Campbell) #6

Good question! You’ll use patterns that end either with .java or .*