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 · 2 comments
Open

Use relative paths for lcov format #263

bkaid opened this issue Dec 11, 2018 · 2 comments
Labels
enhancement General enhancement request good first issue Good for newcomers stale

Comments

@bkaid
Copy link

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.

@tonerdo tonerdo added enhancement General enhancement request help wanted good first issue Good for newcomers labels Mar 3, 2019
@Jkitche
Copy link

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

@MarcoRossignoli MarcoRossignoli added the up-for-grabs Good issue for contributors label Sep 12, 2019
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
@MarcoRossignoli MarcoRossignoli removed the up-for-grabs Good issue for contributors label Feb 21, 2021
phaniva added a commit to phaniva/coverlet that referenced this issue Mar 9, 2021
Copy link

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancement request good first issue Good for newcomers stale
Projects
None yet
Development

No branches or pull requests

4 participants