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

dotnet coverage merge leads to filenames with the leading characters "/_/" in the filenames which bricks other tools #101

Closed
DerGary opened this issue Feb 15, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@DerGary
Copy link

DerGary commented Feb 15, 2024

I have got 2 projects in one solution. The first project is the source code and the second project is the xunit test project.

Reproduction Steps:

  • dotnet test -c Release --collect:"Code Coverage"
  • dotnet coverage merge ./**/*.coverage -f cobertura -o mergedResult.cobertura.xml

The unit test files are getting the absolute path as filenames:
image

the source code files are getting a relative path with leading /_/
image

Then Sonarqube for example can't find the files.

@jakubch1
Copy link
Member

Thanks for reporting this. I've fixed issue in https://dev.azure.com/dnceng/public/_artifacts/feed/test-tools/NuGet/Microsoft.CodeCoverage/overview/17.10.0-preview-24120-01. I've added logic to resolve full paths by default. There is also configuration flag DeterministicReport to skip resolving and keep relative paths.

@DerGary
Copy link
Author

DerGary commented Jul 2, 2024

@jakubch1 We still experience this issue with the latest version 17.11.3. Do you have an idea why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants