Sort summary output of errors and warnings by file path

This commit is contained in:
OMGeeky
2025-07-28 22:00:24 +02:00
parent fd169e9f40
commit 11d5966a51

View File

@@ -242,7 +242,7 @@ def main():
if file_error_counts or file_warning_counts:
print("\nSummary of errors and warnings per file:")
for file_path in set(list(file_error_counts.keys()) + list(file_warning_counts.keys())):
for file_path in sorted(set(list(file_error_counts.keys()) + list(file_warning_counts.keys()))):
error_str = f"{file_error_counts.get(file_path, 0)} error(s)"
warning_str = f"{file_warning_counts.get(file_path, 0)} warning(s)"
print(f"{file_path}:\t {error_str:>5}, {warning_str:>5}")