Template for a good new topic, formatted with Markdown:
-
ALM used (Azure DevOps)
-
CI system used (Azure DevOps)
-
Scanner command used when applicable (private details masked)
- task: SonarCloudPrepare@3
displayName: ‘SonarCloud prepare’ continueOnError: true inputs: SonarCloud: ‘sonarcloud_service_connection’ organization: ‘XXXX’ projectKey: ‘XXX’ projectName: ‘XXX’ projectVersion: ‘$(Build.BuildNumber)’ extraProperties: | sonar.qualitygate.wait=${{ lower(parameters.sonarQualityGateFail) }} sonar.cs.cobertura.reportsPaths="$(Build.SourcesDirectory)/TestResults/coverage/coverage.cobertura.xml" sonar.verbose=true # sonar.cs.vstest.reportsPaths=“$(Build.SourcesDirectory)/\*\*/\*.trx” # sonar.cs.vscoveragexml.reportsPaths=$(Build.SourcesDirectory)/\*\*/coverage.xml -
Languages of the repository .NET app
-
Error observed: My YAML pipeline runs green, it creates test report (percentage also visible in azure devops pipeline), but in SonarCloud, the project shows 0% code coverage.
In sonar cloud when I open the project to check details on code coverage summary report, it states: “There is not enough lines to compute coverage” even though I have 117 lines of code detected by Sonar.
I need this for a project, where I’m a fresh 3 weeks old DevOps engineer
Can someone please tell me, what do I need to change in my YAML?
Thank you!