Skip to content

Commit 530d247

Browse files
committed
report improvements
1 parent 2058c97 commit 530d247

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

src/ModVerify/Reporting/Reporters/Console/ConsoleReporter.cs

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Threading.Tasks;
@@ -24,6 +24,9 @@ private void PrintErrorStats(VerificationResult verificationResult, List<Verific
2424
Console.WriteLine(" Error Report ");
2525
Console.WriteLine("***********************");
2626
Console.WriteLine();
27+
28+
PrintResolvedStats(verificationResult);
29+
2730
if (verificationResult.Errors.NewErrors.Count == 0)
2831
{
2932
if (Settings.SummaryOnly)
@@ -62,4 +65,32 @@ private void PrintErrorStats(VerificationResult verificationResult, List<Verific
6265
foreach (var error in filteredErrors)
6366
Console.WriteLine($"[{error.Severity}] [{error.Id}] Message={error.Message}");
6467
}
68+
69+
private void PrintResolvedStats(VerificationResult verificationResult)
70+
{
71+
var resolvedErrors = verificationResult.Errors.ResolvedErrors;
72+
var resolvedCount = resolvedErrors.Sum(x => x.Value.Count);
73+
if (resolvedCount == 0)
74+
return;
75+
76+
Console.ForegroundColor = ConsoleColor.Green;
77+
Console.WriteLine(
78+
$"Reduced issues: {resolvedCount} error(s) present in the baseline are no longer reported.");
79+
Console.ResetColor();
80+
81+
if (Settings.Verbose
82+
#if DEBUG
83+
|| true
84+
#endif
85+
)
86+
{
87+
foreach (var baseline in resolvedErrors)
88+
{
89+
foreach (var error in baseline.Value)
90+
Console.WriteLine($" [Resolved] [{baseline.Key}] [{error.Id}] Message={error.Message}");
91+
}
92+
}
93+
94+
Console.WriteLine();
95+
}
6596
}

0 commit comments

Comments
 (0)