- ALM used: Azure DevOps
- CI system used: Azure DevOps
- Scanner command used when applicable:
SonarCloudPrepare@1
,SonarCloudAnalyze@1
,SonarCloudPublish@1
,sonarcloud-buildbreaker@2
- Languages of the repository: TypeScript/JavaScript
- Error observed:
Sonar is reporting code coverage is 0%. When run on known good commits it is reporting coverage of 0% where previously it reported 80%+ - Steps to reproduce
As above. We have not made any changes to our pipelines. We are aware that some properties have been deprecated for examplesonar.typescript.lcov.reportPaths
, however we are usingsonar.javascript.lcov.reportPaths
.
We first saw this failing on the 26th of August however the last known good run was 13th of August 10:38 UTC.
We have compared the output of the sonar cloud analysis for the known good commit which passed with the one which failed. We found the following difference:
passed:
INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: Analysing [/home/vsts/work/1/s/packages/../lcov.info]
failed:
INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: No LCOV files were found using ../lcov.info
So it appears that sonar is now no-longer honoring ..
in paths. It looks like this change may have been introduced by this PR
Removing the “…” from our lcov path appears to be a valid workaround to this issue, however we have older pipelines which have not been progressed to release which this will be a problem for.
Hello Jack,
Sorry for the long delay, and welcome to SonarSource community.
Indeed, as you pointed out, the introduction of wildcard support for coverage reports broke the resolving of relative paths.
I created this ticket to track and address this issue soon.
Regards,
Yassin
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.