From 213ff11c9866e87371714d637eb1e2ca701eab9e Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Fri, 12 Dec 2025 23:04:47 +0100 Subject: [PATCH] fix: improve architecture validation report messaging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- scripts/validate_architecture.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/validate_architecture.py b/scripts/validate_architecture.py index 8217d385..61f886ba 100755 --- a/scripts/validate_architecture.py +++ b/scripts/validate_architecture.py @@ -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