coverage inclusions

1,595 views
Skip to first unread message

aepedr...@gmail.com

unread,
May 22, 2018, 11:56:11 AM5/22/18
to SonarQube
Hello:
There are some use cases where I need to exclude a package except 1 or 2 files.
Currently, you can exclude some files from coverage with sonar.coverage.exclusions property, and you can exclude a folder with path/to/package/*.java (if you are analyzing a Java project)
It would be a great feature to have also sonar.coverage.inclusions to re-include a specific file previously excluded. For instance:

<sonar.coverage.exclusions>path/to/package/*.java</sonar.coverage.exclusions>
<sonar.coverage.inclusions>path/to/package/IncludeThis.java</sonar.coverage.inclusions>

Would exclude the whole folder except IncludeThis.java

Hope this helps to improve Sonarqube. Best regards

G. Ann Campbell

unread,
May 23, 2018, 9:01:52 AM5/23/18
to SonarQube
Hi,

Thanks for the input. This seems reasonable, but IIRC this is the first request we've had for it. I'm going to let this mature a while to see if it's a broadly compelling feature (i.e. more requests).


Ann

G. Ann Campbell

unread,
May 25, 2018, 9:29:23 AM5/25/18
to SonarQube
Hi,

To follow up, I tried and tried but couldn't find this ticket when I was replying the other day. I've just stumbled across it, and it's relevant, so I'll add it here:

  1. MMF-283
  2. Simpler Issue Exclusions

Ann
Reply all
Reply to author
Forward
0 new messages