LCOV.INFO has absolute path for SF

最后都变了- 提交于 2020-01-14 06:17:28

问题


I need to have relative path as value of SF: parameter in the lcov.info file generated by karma coverage. This is to enable SonarQube to gather the info to display the coverage. Currently, the SF parameter is having complete absolute path , e.g. c:\abc\xyz....\src\bar\foo.js

I need to have SF: src\bar\foo.js

Is there a way to achieve this?


回答1:


Unfortunately it is still impossible out of the box. To fix the issue you can either:

  • use istanbul merged with this request,
  • process the output file using tools like sed (example),
  • generate the report from the same machine that Sonar scanning is performed (original advice).


来源:https://stackoverflow.com/questions/45602358/lcov-info-has-absolute-path-for-sf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!