question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Normalize File Paths In Generated Reports (Linux / Windows)

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:30

github_iconTop GitHub Comments

1reaction
abbotwarecommented, Dec 11, 2019

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 😃

0reactions
MarcoRossignolicommented, Dec 23, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found