-
Notifications
You must be signed in to change notification settings - Fork 386
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
Improve cobertura absolute/relative path report generation #661
Improve cobertura absolute/relative path report generation #661
Conversation
update fork
Update fork
Update fork
Update fork
Update fork
Update fork
Update fork
Update fork
Update fork
I've tested it on Windows and Linux both with Jenkins build server and Cobertura Plugin. ReportGenerator is also still working. |
string absolutePath3; | ||
string absolutePath4; | ||
string absolutePath5; | ||
string absolutePath6; | ||
|
||
if (isWindows) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isWindows
is used only in one place use directly RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
var basePathSegments = new List<string>(); | ||
|
||
splittedPaths[0].Select((value, index) => (value, index)).ToList().ForEach(x => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, rename x
in fragmentIndexPair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Some comments but idea is ok to me, thank's! |
FYI after merge of this dotnet/runtime#934 (comment) we'll do splits with zero allocation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!Many thank's!
running the nightly build - I noticed the slashes are not normalized on linux the paths are all: and windows: Might not be an issue.. but perhaps worth noting |
I don't think that's a problem, reporters should understand all OS path format and @daveMueller can confirm that it works on some reporters like jenkins/report generator...btw before this update were they normalized in some way? |
Yes I can confirm that it works on the reporters Jenkins Cobertura Plugin and Report Generator. I checked the old code and there it also wasn't normalized. https://github.com/tonerdo/coverlet/blob/b3c99fffe757431403a0f4f3c4cc1e798ff97863/src/coverlet.core/Reporters/CoberturaReporter.cs#L155 |
closes #413