-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add an NCover-compatible XML report output #7
Conversation
That's awesome! I will review it later. Thanks for contributing! |
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.
I did some tests and it is completely functional and reports generated with ReportGenerator looks good.
No blocker in the comments.
@@ -9,16 +9,16 @@ public static void Execute(InstrumentationResult result) | |||
{ | |||
foreach (var assembly in result.Assemblies) | |||
{ | |||
if (File.Exists(assembly.BackupFile)) | |||
if (File.Exists(assembly.Value.BackupFile)) |
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.
You can avoid .Value
by changing the foreach to foreach (var assembly in result.Assemblies.Values)
@@ -154,13 +157,17 @@ private void InstrumentAssembly(string assemblyFile) | |||
|
|||
var instructionId = ++id; | |||
|
|||
result.AddInstruction(sourceRelativePath, new InstrumentedInstruction | |||
result.Assemblies[assemblyDefinition.Name.Name].AddInstruction(sourceRelativePath, new InstrumentedInstruction |
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.
I would prefer that the method AddInstrumentedAssembly returns the InstrumentedAssembly object.
Then we don't need to access the assembly by dictionary key here.
Thanks for the feedback @lucaslorentz - I made the changes! |
I had to change the structure of the output coverage JSON to make this fit (so it's not compatible with previously-output coverage), but now people can use something like ReportGenerator to generate HTML reports :)