Skip to content
Merged
Changes from all commits
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
8 changes: 0 additions & 8 deletions src/CodeMedic/Plugins/HealthAnalysis/RepositoryScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public ReportDocument GenerateReport(bool limitPackageLists = true)
var nonTestProjects = totalProjects - testProjectCount;
var totalPackages = _projects.Sum(p => p.PackageDependencies.Count);
var totalLinesOfCode = _projects.Sum(p => p.TotalLinesOfCode ?? 0);
var testLinesOfCode = _projects.Where(p => p.IsTestProject ?? false).Sum(p => p.TotalLinesOfCode ?? 0);
var projectsWithNullable = _projects.Count(p => p.NullableEnabled ?? false);
var projectsWithImplicitUsings = _projects.Count(p => p.ImplicitUsingsEnabled ?? false);
var projectsWithDocumentation = _projects.Count(p => p.GeneratesDocumentation ?? false);
Expand Down Expand Up @@ -165,13 +164,6 @@ public ReportDocument GenerateReport(bool limitPackageLists = true)
summaryKvList.Add("Test Projects", testProjectCount.ToString(),
testProjectCount > 0 ? TextStyle.Success : TextStyle.Warning);
summaryKvList.Add("Total Lines of Code", totalLinesOfCode.ToString());
if (testProjectCount > 0)
{
summaryKvList.Add("Test Lines of Code", testLinesOfCode.ToString());
var testCoverageRatio = totalLinesOfCode > 0 ? (double)testLinesOfCode / totalLinesOfCode : 0;
summaryKvList.Add("Test/Code Ratio", $"{testCoverageRatio:P1}",
testCoverageRatio >= 0.3 ? TextStyle.Success : TextStyle.Warning);
}
summaryKvList.Add("Total NuGet Packages", totalPackages.ToString());
summaryKvList.Add("Known Vulnerabilities", allVulnerabilities.Count.ToString(),
allVulnerabilities.Count == 0 ? TextStyle.Success : TextStyle.Warning);
Expand Down
Loading