LCOV.INFO has absolute path for SF
Asked Answered
M

1

5

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?

Mothball answered 9/8, 2017 at 23:54 Comment(0)
D
6

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).
Dignify answered 11/8, 2017 at 9:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.