LCOV.INFO具有SF的绝对路径 [英] LCOV.INFO has absolute path for SF

查看:244
本文介绍了LCOV.INFO具有SF的绝对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在因果覆盖率生成的lcov.info文件中,我需要具有相对路径作为SF:参数的值.这是为了使SonarQube能够收集信息以显示覆盖范围. 当前,SF参数具有完整的绝对路径,例如c:\ abc \ xyz .... \ src \ bar \ foo.js

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

我需要使用SF:src \ bar \ foo.js

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

有没有办法做到这一点?

Is there a way to achieve this?

推荐答案

不幸的是,这仍然是不可能的.要解决此问题,您可以:

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

  • 使用伊斯坦布尔与请求合并,
  • 使用类似sed(示例)之类的工具来处理输出文件,
  • 从执行Sonar扫描的同一台计算机上生成报告(原始建议).
  • 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).

这篇关于LCOV.INFO具有SF的绝对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆