Resolve relative CodeCoverage.ReportRoot to an absolute path - #2921
Merged
Conversation
Get-RelativePath makes the coverage report paths relative by stripping the report root prefix off the (absolute) file paths. When ReportRoot, or its Run.RepoRoot fallback, is a relative path the prefix never matches, so the report keeps the absolute paths. Get-ReportRoot now resolves the path to absolute before it is used. Fix #2920 🤖
Collaborator
|
Thanks. But we need to resolve and validate these earlier as part of configuration validation. ReportRoot in Current solution will break on location change during the tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Get-RelativePath makes the coverage report paths relative by stripping the report root prefix off the (absolute) file paths. When
CodeCoverage.ReportRoot, or itsRun.RepoRootfallback, is a relative path the prefix never matches, so the report keeps the absolute paths.Get-ReportRootnow resolves the path to absolute before it is used.Added tests in
Coverage.Tests.ps1, they fail without the fix.Fix #2920
🤖