Add number of presubmit errors/warnings in header
Headers currently have the format: `** Presubmit ${name} **`. Make these
more helpful by including the number of total errors there are.
Bug: 1341987
Change-Id: Ib41a133c31568d4264d73c14350f0bbd9590356a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3756169
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
diff --git a/presubmit_support.py b/presubmit_support.py
index bb327ac..ef42f12 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -1792,7 +1792,7 @@
for name in ['Messages', 'Warnings', 'ERRORS']:
if name in messages:
items = messages[name]
- sys.stdout.write('** Presubmit %s **\n' % name)
+ sys.stdout.write('** Presubmit %s: %d **\n' % (name, len(items)))
for item in items:
item.handle()
sys.stdout.write('\n')