-
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
Implementation of HTML Reports #105
Implementation of HTML Reports #105
Conversation
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
=========================================
Coverage ? 98.91%
=========================================
Files ? 15
Lines ? 1378
Branches ? 0
=========================================
Hits ? 1363
Misses ? 15
Partials ? 0 Continue to review full report at Codecov.
|
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.
IMHO, a report generator shouldn't be part of coverlet.core. Maybe it can be part of a coverlet plugin or something like that.
For users who want report generation, they can add a buildstep in their project specifying the generator of their choice.
Besides that, your code looks good to me.
@@ -7,13 +7,15 @@ | |||
using Coverlet.Core.Reporters; | |||
using Microsoft.Build.Framework; | |||
using Microsoft.Build.Utilities; | |||
using Palmmedia.ReportGenerator.Core; |
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 don't think coverlet should have a dependency on this specific report generator.
@coenm - I see where you are going with that. Really this feature is completely optional. It does add a separate dependency to coverlet, but there are plenty of code coverage tools that include HTML report generation as a part of the base package. Istanbul for JavaScript, and Cobertura for Java are good examples of this. I added this functionality more for simplicity than anything else. For simple projects that don't utilize a build script or custom MSBuild configuration, it seems overkill to have them add an extra step to add one. I suppose I could make a separate nuget package that hooks into MSBuild and runs after coverlet's @tonerdo, if you believe that would be a better approach, let me know. |
I tend to agree with @coenm, this feature will be good as an add-on but doesn't really fit into the core library. Here a some reasons behind my reservation:
That being said, I understand the work that went into this. I'll leave this PR open and if there's considerable interest for this feature from the community then I'll merge it in |
@tonerdo - no worries. Wasn't too hard to implement. I do really like the simplicity of hooking into dotnet test for both, however. I'm going to explore creating a separate package that can marry the two and create a separate task that executes after |
😮 This is a great feature! But I agree that this should not be in the Core Problem is that we cannot consume Coverlet.Core because there is no package. The only way is to download the code and use that.. or make Private packages. Please check this issue. #212 |
We close this stale PR for the moment, we'll re-open in future if needed. |
I know that you mentioned in #90 that you were leaning toward letting people choose their own HTML report generator, but my PR into ReportGenerator was recently merged, and this is a completely optional way of letting people who want to generate both coverage results and HTML reports in one command do so. If the new, optional,
ReportTypes
property is not specified, nothing changes.