Today I’m facing an unexpected behavior on sonar.coverage.exclusions settings. When I save any exclusions, Sonar groups them in just one input, separated by comma, but does not exclude them in the analysis process.
That’s weird but not technically an issue (I’ll flag it internally).
You set sonar.coverage.exclusions rather than sonar.exclusions (scroll down). These do different things (the former excluding from code coverage only, the latter excluding from analysis overall). Which are you trying to acheive?
Thanks for your explanation Colin. My intention is really to remove only the code coverage, so I believe I made the configuration in the right place.
An important point is that this problem started when I went to add a new exclusion configuration. Before everything was working and visually the exclusions were one below the other. When I added the new one and clicked on save it started to have the mentioned behavior.
New grouping row in UI is incorrect.
Because it doesn’t add spaces after commas.
And if you have several excludes it will not work after grouping.
As quick fix you may add spaces in row after UI grouping.
Can you help us with a specific example of the inputs on the SonarCloud side that result in a malformed/non-working exclusion? I’m having trouble reproducing it (I’m sure the issue is on my side and about my understanding if there are now multiple reports!)
I have a few code coverage exclusions setup and before adding a new exclusion, it used to work fine.
Today I added a new exclusion and noticed that on the web interface, the items are now being added as a comma delimited string (which sucks!)
It used to an exclusion per line.
Anyhow, after adding a new exclusion item, and running a sonar scan, none of the exclusions work anymore.
Do inspection and you guys can understand of error. After “collapsing of multi-line configuration into a comma seperate value”. The configuration value was changed from an array of strings to a single string.
Any updates on the resolution of the issue? as there is no way to revert to the original form and this comma-separated string is also not working, this is affecting the quality gates and deployments as well.