Skip to content

Commit d9e4383

Browse files
authored
Merge pull request FritzAndFriends#46 from csharpfritz/fix-coveragecount
2 parents 2bcc339 + 62ea85d commit d9e4383

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

‎src/CodeMedic/Plugins/HealthAnalysis/RepositoryScanner.cs‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ public ReportDocument GenerateReport(bool limitPackageLists = true)
130130
var nonTestProjects = totalProjects - testProjectCount;
131131
var totalPackages = _projects.Sum(p => p.PackageDependencies.Count);
132132
var totalLinesOfCode = _projects.Sum(p => p.TotalLinesOfCode ?? 0);
133-
var testLinesOfCode = _projects.Where(p => p.IsTestProject ?? false).Sum(p => p.TotalLinesOfCode ?? 0);
134133
var projectsWithNullable = _projects.Count(p => p.NullableEnabled ?? false);
135134
var projectsWithImplicitUsings = _projects.Count(p => p.ImplicitUsingsEnabled ?? false);
136135
var projectsWithDocumentation = _projects.Count(p => p.GeneratesDocumentation ?? false);
@@ -165,13 +164,6 @@ public ReportDocument GenerateReport(bool limitPackageLists = true)
165164
summaryKvList.Add("Test Projects", testProjectCount.ToString(),
166165
testProjectCount > 0 ? TextStyle.Success : TextStyle.Warning);
167166
summaryKvList.Add("Total Lines of Code", totalLinesOfCode.ToString());
168-
if (testProjectCount > 0)
169-
{
170-
summaryKvList.Add("Test Lines of Code", testLinesOfCode.ToString());
171-
var testCoverageRatio = totalLinesOfCode > 0 ? (double)testLinesOfCode / totalLinesOfCode : 0;
172-
summaryKvList.Add("Test/Code Ratio", $"{testCoverageRatio:P1}",
173-
testCoverageRatio >= 0.3 ? TextStyle.Success : TextStyle.Warning);
174-
}
175167
summaryKvList.Add("Total NuGet Packages", totalPackages.ToString());
176168
summaryKvList.Add("Known Vulnerabilities", allVulnerabilities.Count.ToString(),
177169
allVulnerabilities.Count == 0 ? TextStyle.Success : TextStyle.Warning);

0 commit comments

Comments
 (0)