Sonarqube default coverage to 0 from Karma Coverage LCOV file with absolute pathjs

ぃ、小莉子 提交于 2019-12-04 20:21:36

The SonarQube JavaScript plugin should be able to handle both relative and absolute paths in LCOV files. However, it seems that your setup is incorrect. Your LCOV file refers to file paths in a given directory:

SF:/home/mrincon/work/git/promoter-app-client/src/app.js

And based on the logs of your analysis, it seems that your analysis is run in another directory:

Analysing [/srv/jenkins/master/jenkins_home/workspace/job1/coverage/lcov.info]

Maybe you generated the LCOV file on one machine and run the analysis on another... In the end, SonarQube can't match the paths contained in the LCOV file with the files which are analysed.

You should either:

  • generate the LCOV report and run the SonarQube analysis from the same directory,
  • or have your LCOV file contain only relative paths.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!