We have SonarCloud setup with our CI (Azure Devops) to report code analysis & coverage for a C#-based project. At some point after final August the issues stopped showing up in SonarCloud (coverage is still reported). At the time this reporting stopped working we didn’t change anything related to how we run the scanner. We are using SonarScanner 4.6.2.2472.
Any help would be greatly appreciated.
Hi @RamonaStefan,
Can you share your build logs and logs from analysis ends steps with us? I can provide a private thread if needed.
@RamonaStefan also, does the issue still occur if you use the latest version of the SonarScanner for .NET?
@Pavel_Mikula I can share the logs if you provide a private thread.
@duncanp Is not SonarScanner 4.6.2.2472 the last available version? Releases · SonarSource/sonar-scanner-cli · GitHub
One thing to add, the analysis step seems to be successful:
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=xx&pullRequest=yyyy
but the next step of publishing quality gate results shows:
##[warning]No analyses found in this build! Please check your build configuration.
@RamonaStefan if you are analysing C# code then you need to use the SonarScanner for .NET, not the scanner-cli
.
Since you are using Azure DevOps you could also use the SonarCloud extension for AuzreDevOps, and configure the Prepare
task to use MSBuild mode (which will then run the SonarScanner for .NET under the covers):
@duncanp I’ve also tested with SonarScanner for .Net and the result is the same, coverage reported, issues not. Still shows ##[warning]No analyses found in this build! Please check your build configuration.
in the publishing quality gate results step
@RamonaStefan I’ve sent you a private method so you can share the logs. Thanks.
@RamonaStefan there’s nothing obviously wrong from the build logs - the Sonar analysis rules are being executed and detecting issues.
Could you send me the logs for the analysis end step please?
Also, are you using the SonarCloud Azure DevOps extension, or are you executing the SonarScanner for .NET directly?
@duncanp We’re using the SonarCloud Azure DevOps extension. I’ve sent you the logs. Thank you for your time
Update for other readers: the customer in this case has a custom solution that involves changing some of the internal log files generated during scanning. We suspect that this custom solution was broken by this change to scanner, but this has not been confirmed.
This topic was automatically closed after 10 days. New replies are no longer allowed.