Class exclusion does not work

Hello, I using SonarQube v6.7.4 and have troubles with class exclusion from coverage.
I used maven property <sonar.coverage.exclusions>**/MyClass.java</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!

Hi,

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

Ann

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)

Hi Artem,

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

2 Likes

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

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

 
Ann