I tried to use unit tests and code at the same level and use inclusion/exclusion parameters, just like it is describe here: Narrowing the focus with analysis scope.
The problem is that the wildcard pattern seems to not take on consideration file name and therefore makes impossible to use an structure like this:
It always listed the .test files having lines to cover, leaving it really low.
Was only able to overcome it when I separated the tests from code, but organisation wise it is very bad
Would love leave tests in the same folder again, thanks for the help!!
I spot the problem. Inclusion/Exclusion globs don’t play friendly with relative paths… and they aren’t necessary here (you’re defining a pattern, not a file path like you are with sonar.sources).
So you just need to remove the ./ from your sonarExclusions and sonarTestInclusions