Browse Source

metadata: sort result summary

This CL makes scan.py to sort result summary (keyed on the type of
validation results), so the output summary will have a predictable
order for easier diffing.

Change-Id: I0eda8a439e159eae667729512424b813eb0f5e11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5390925
Auto-Submit: Jiewei Qian <qjw@chromium.org>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Anne Redulla <aredulla@google.com>
Jiewei Qian 1 year ago
parent
commit
77d30ab4f8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      metadata/scan.py

+ 1 - 1
metadata/scan.py

@@ -96,7 +96,7 @@ def main() -> None:
         count = len(results)
         plural = "s" if count > 1 else ""
         print(f"\n  {count} issue{plural}: {summary_key}")
-        for result in results:
+        for result in sorted(results):
             print(f"    {result}")
 
     print(f"\n\n{invalid_file_count} / {file_count} metadata files are "