Sonar cloud exclusions

In my sonar.gradle file i tried to add the following sonar.coverage.exclusions

**/*, +
**/*Fragment.kt, +

I basically want to exclude all files ending in or Fragment.kt.

But these files are not getting excluded. Am I doing something wrong?


I think the following should work: **/* and **/*Fragment.kt.


Actually thats what i did. Sorry the formatting on this forum got messed up. Actually i just realized those files no longer show up in coverage. However there is another section that shows duplicate lines. How can i ignore that. Or how can i fix that?

You can use the same pattern with the property sonar.cpd.exclusions to ignore duplication on some files.

1 Like