we are facing a problem with code coverage displayed in our Sonarqube Developer Edition v220.127.116.11159.
Let me briefly explain the process.
- We are calculating the coverage of a .NET Core project using Coverlet and we configured it to ignore some paths, for example the EF Migration files.
- After that we convert the report generated by Coverlet into a SonarQube report using a tool called reportGenerator.
- The final SonarQube report is perfectly fine: it contains all the intended files and does not include the excluded files.
- That file is the one we provide to SQ: in the sonarscanner begin we referenced it => /d:sonar.coverageReportPaths=“.\sonarqubecoverage\SonarQube.xml”
The problem is that, when we browse the coverage on SonarQube we actually see the coverage calculated for excluded files… and I can’t understand why.
I know that SonarQube also a sonar.coverage.exclusions property but I expect I don’t have to fill it because the SonarQube.xml report already has the correct file list.
What am I missing?