Skip to content
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

Fixed issue with ReportGenerator.Core when using .NET Core 3.1 #696

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- Do not upgrade this version or we won't support old SDK -->
<PackageReference Update="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Update="NuGet.Packaging" Version="5.4.0" />
<PackageReference Update="ReportGenerator.Core" Version="4.4.4" />
<PackageReference Update="ReportGenerator.Core" Version="4.4.5" />
<!--
Do not change System.Reflection.Metadata version since we need to support VSTest DataCollectors. Goto https://www.nuget.org/packages/System.Reflection.Metadata to check versions.
We need to load assembly version 1.4.2.0 to properly work
Expand Down
18 changes: 9 additions & 9 deletions test/coverlet.core.tests/Coverage/CoverageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void SelectionStatements_If()
CoverageResult result = TestInstrumentationHelper.GetCoverageResult(path);

// Generate html report to check
// TestInstrumentationHelper.GenerateHtmlReport(result);
TestInstrumentationHelper.GenerateHtmlReport(result);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert changes to this file?I'll merge package upgrade, it's ok commented, it's so as "documentation" for debugging! Thanks a lot for the fix the integration of your tool is invaluable help for me during coverage bug debugging!

// Asserts on doc/lines/branches
result.Document("Instrumentation.SelectionStatements.cs")
Expand Down Expand Up @@ -433,14 +433,14 @@ public void ExcludeFilteredNestedAutogeneratedTypes()
return 0;
}, path).Dispose();

TestInstrumentationHelper.GetCoverageResult(path)
.Document("Instrumentation.ExcludeFilter.cs")
.AssertLinesCovered(BuildConfiguration.Debug, (12, 1), (13, 1), (14, 1))
.AssertLinesCovered(BuildConfiguration.Debug, (27, 1), (28, 1), (29, 1), (30, 1), (31, 1))
.AssertLinesCovered(BuildConfiguration.Debug, (39, 2), (40, 2), (41, 2), (43, 5))
.AssertLinesCovered(BuildConfiguration.Debug, (50, 1), (51, 1), (52, 1))
.AssertNonInstrumentedLines(BuildConfiguration.Debug, 17, 21)
.AssertNonInstrumentedLines(BuildConfiguration.Debug, 33, 36);
TestInstrumentationHelper.GetCoverageResult(path)
.Document("Instrumentation.ExcludeFilter.cs")
.AssertLinesCovered(BuildConfiguration.Debug, (12, 1), (13, 1), (14, 1))
.AssertLinesCovered(BuildConfiguration.Debug, (27, 1), (28, 1), (29, 1), (30, 1), (31, 1))
.AssertLinesCovered(BuildConfiguration.Debug, (39, 2), (40, 2), (41, 2), (43, 5))
.AssertLinesCovered(BuildConfiguration.Debug, (50, 1), (51, 1), (52, 1))
.AssertNonInstrumentedLines(BuildConfiguration.Debug, 17, 21)
.AssertNonInstrumentedLines(BuildConfiguration.Debug, 33, 36);
}
finally
{
Expand Down