I encountered an issue with the code coverage reported by sonarqube. The xunit code coverage for one file is 91% but the coverage reported by sonarqube for the same file is only 40%. I’m not sure what is causing this issue, any help would be appreciated.
We need more details , the verbose output of the END command (please run SonarScanner.MSBuild.exe begin /k:"MyProject" /d:sonar.verbose=true as the begin step, and please attach the output of END step).
Also,
what is the version of SQ?
what is the version of MSBuild you are using?
Can you share the code with us , or a small reproducer project?
I believe that to be the case. As i understand it, SonarQube only displays the results of the code coverage tool therefore the issue is unrelated to your product.