Hi, we’re currently migrating our sonar cloud setup away from a local CI Server up to Azure DevOps. All appears to be working well, however, on the same project, I’m getting different lines of code from the CI Server vs the Azure cloud run appearing in the different Sonar projects.
It appears to be one folder (VS project) which isn’t being counted as code for the Azure run, even though the tests are all run fine and there is coverage also shown. The exclusions etc. are all identical between the local to the cloud version.
on our CI server project on sonarcloud, *.cs files in one particular folder show with correct lines of code and 100% coverage, but on our Azure project on sonarcloud, they have - lines of code but still 100% coverage.
I’m not expecting a fix, but wondered if there were any suggestions on how to fix or how I can help diagnose?
I see you get coverage for the “ignored” project. Are you also getting reported issues on those files? Is it a test project or a production code project?
It would help us to see the diagnostic log files from analyses with both instances. To get the diagnostic logs please run SonarScanner.MSBuild.exe begin /k:"MyProject" /d:sonar.verbose=true as the begin step, and please attach the output of END step.
Please also share the logs of the BUILD step.
Ideally from using both instances (if possible), to compare the logs.