Normalize File Paths In Generated Reports (Linux / Windows)
See original GitHub issueI run unit tests on windows and linux. This produces coverage report files that have different path roots:
C:\src\build\file.cs
vs
\var\src\build\file.cs
When the reports are merged it thinks there are 2 sets of functions. Instead of 100% code coverage, i have 50% coverage.
Perhaps a new command line option is needed to normalize the path:
coverlet -stripFromPath=C:\src\
coverlet -stripFromPath=\var\
That way both reports will then have a normalized file
Issue Analytics
- State:
- Created 4 years ago
- Comments:30
Top Results From Across the Web
normalizePath: Express File Paths in Canonical Form - rdrr.io
Convert file paths to canonical form for the platform, to display them in a user-understandable form and so that relative and absolute paths...
Read more >Python 3 Quick Tip: The easy way to deal with file paths ...
Python 3 Quick Tip: The easy way to deal with file paths on Windows, Mac and Linux.
Read more >Normalize slashes in path on Linux - c++
What is the recommended way to specify to use native separators in filesystem path object? Below is a simple example with a static...
Read more >How To Fix Flaws
Project uses normalize() to generated file path based on windows\linux but in VeraCode Static scan report this method used line detected as ...
Read more >The weird world of Windows file paths : r/programming
Strictly speaking, a device path starts \device\harddiskN\path. Device paths in this article are using links in n the global object table ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
oh wait a minute - while yes I originally requested the cmd line option in coverlet to produce normalized files… the report is being merged by dotnet-reportgenerator-cli … so those are not problems for you 😃
@abbotware please can you open a new issue to track https://github.com/tonerdo/coverlet/issues/649#issuecomment-568300617? This one is related to report file normalization that’s not an issue, I mean different OS will generate different path format and it’s ok.