fix: improve architecture validation report messaging
Change the validation report output to show a breakdown by severity (errors, warnings, info) instead of a confusing "Total violations" count that included info-level items. Before: "Total violations: 4" followed by "VALIDATION PASSED" After: "Findings: 0 errors, 0 warnings, 4 info" with "VALIDATION PASSED" Also improve the failure/warning messages to include counts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2509,18 +2509,18 @@ class ArchitectureValidator:
|
||||
print("📊 ARCHITECTURE VALIDATION REPORT")
|
||||
print("=" * 80 + "\n")
|
||||
|
||||
print(f"Files checked: {self.result.files_checked}")
|
||||
print(f"Total violations: {len(self.result.violations)}\n")
|
||||
|
||||
# Print file summary table if we have file results
|
||||
if self.result.file_results:
|
||||
self._print_summary_table()
|
||||
|
||||
# Group by severity
|
||||
errors = [v for v in self.result.violations if v.severity == Severity.ERROR]
|
||||
warnings = [v for v in self.result.violations if v.severity == Severity.WARNING]
|
||||
infos = [v for v in self.result.violations if v.severity == Severity.INFO]
|
||||
|
||||
print(f"Files checked: {self.result.files_checked}")
|
||||
print(f"Findings: {len(errors)} errors, {len(warnings)} warnings, {len(infos)} info\n")
|
||||
|
||||
# Print file summary table if we have file results
|
||||
if self.result.file_results:
|
||||
self._print_summary_table()
|
||||
|
||||
if errors:
|
||||
print(f"\n❌ ERRORS ({len(errors)}):")
|
||||
print("-" * 80)
|
||||
@@ -2542,14 +2542,14 @@ class ArchitectureValidator:
|
||||
# Summary
|
||||
print("\n" + "=" * 80)
|
||||
if self.result.has_errors():
|
||||
print("❌ VALIDATION FAILED - Fix errors before committing")
|
||||
print(f"❌ VALIDATION FAILED - {len(errors)} error(s) must be fixed before committing")
|
||||
print("=" * 80)
|
||||
return 1
|
||||
if self.result.has_warnings():
|
||||
print("⚠️ VALIDATION PASSED WITH WARNINGS")
|
||||
print(f"⚠️ VALIDATION PASSED WITH {len(warnings)} WARNING(S)")
|
||||
print("=" * 80)
|
||||
return 0
|
||||
print("✅ VALIDATION PASSED - No violations found")
|
||||
print("✅ VALIDATION PASSED")
|
||||
print("=" * 80)
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user