Sitelet https://web.archive.org/web/20210801073646/https://github.com/coverlet-coverage/coverlet/issues/263
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative paths for lcov format #263

Open
bkaid opened this issue Dec 11, 2018 · 1 comment
Open

Use relative paths for lcov format #263

bkaid opened this issue Dec 11, 2018 · 1 comment

Comments

@bkaid
Copy link

@bkaid bkaid commented Dec 11, 2018

It would be helpful if the lcov generated reports could generate relative paths. My use case is that I am generating coverage reports from a docker image and then using VS Code Coverage Gutters which supports relative paths to view the coverage. But it doesn't work because the absolute paths on the docker container don't match the absolute path on my computer. My current workaround is to run a find & sed command to convert them to relative paths after running the tests:
find /app -name "lcov.info" -print | xargs sed -i 's/\/app/\./g'

lcov tool itself has a --base-directory option for relative paths according to the docs.

@Jkitche
Copy link

@Jkitche Jkitche commented May 3, 2019

+1 to this! Would love to use coverlet as it's one of the few tools I've found that works in a way I expect, but trying to export results to Codacy, there are only a few formats I can use; one of them being lcov. Being able to aggregate in something other than the default result.json would be super helpful

phaniva added a commit to phaniva/coverlet that referenced this issue Oct 19, 2020
…nto helper class (coverlet-coverage#263)

Refactored functions to determine base paths from CoberturaReporter into helper class
phaniva added a commit to phaniva/coverlet that referenced this issue Oct 19, 2020
…in report (coverlet-coverage#263)

Updated LcovReporter to include only relative paths for source files in report
phaniva added a commit to phaniva/coverlet that referenced this issue Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants