Sonar Coverage showing 0%

Must-share information (formatted with Markdown):

  • which versions are you using ( SonarQube server 7.9.4, SonarScanner 4.6.1.2450, Plugin)
  • what are you trying to achieve (Code Coverage)
  • what have you tried so far to achieve this (Code coverage is not reflecting and it is showing 0.0% )

the set property is
sonar.javascript.lcov.reportPaths=./coverage/lcov.info

But the error from the Azure pipeline is
No coverage information will be saved because LCOV file cannot be found.
WARN: Provided LCOV file path: ./coverage/lcov.info. Seek file with path: /home/vsts/work/1/s/./coverage/lcov.info

I don’t know what the path should be

Hi,

Welcome to the community!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.4 → 8.9.2 → 9.0.1 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your actual question, can you try it without the './? It looks like ADO is concatenating your current directory to the path provided & perhaps in that context the ./` is throwing it off.

 
HTH,
Ann