Commit 4ca9e1c7 authored by Louis Romero's avatar Louis Romero Committed by LUCI CQ

Remove extraneous newlines from presubmit output

Prior to this CL, we have:

```
Running Python 2 presubmit upload checks ...

Python 2 presubmit checks passed.
Running Python 3 presubmit upload checks ...

Presubmit checks took 10.2s to calculate.

Python 3 presubmit checks passed.
 ios/chrome/browser/... | 20 +++++++++-----------
...
```

The first two checks are harder to parse with the newlines. This CL removes
them:

```
Running Python 2 presubmit upload checks ...
Python 2 presubmit checks passed.

Running Python 3 presubmit upload checks ...
Presubmit checks took 10.2s to calculate.
Python 3 presubmit checks passed.

 ios/chrome/browser/... | 20 +++++++++-----------
...
```

Change-Id: Iaf7ac4b203c401f60d74884fd9bdd3ba4ee12c20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3512873Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Louis Romero <lpromero@chromium.org>
parent 37db69d4
......@@ -1731,7 +1731,6 @@ def DoPresubmitChecks(change,
else:
messages.setdefault('Messages', []).append(result)
sys.stdout.write('\n')
for name, items in messages.items():
sys.stdout.write('** Presubmit %s **\n' % name)
for item in items:
......@@ -1741,10 +1740,10 @@ def DoPresubmitChecks(change,
total_time = time_time() - start_time
if total_time > 1.0:
sys.stdout.write(
'Presubmit checks took %.1fs to calculate.\n\n' % total_time)
'Presubmit checks took %.1fs to calculate.\n' % total_time)
if not should_prompt and not presubmits_failed:
sys.stdout.write('%s presubmit checks passed.\n' % python_version)
sys.stdout.write('%s presubmit checks passed.\n\n' % python_version)
elif should_prompt and not presubmits_failed:
sys.stdout.write('There were %s presubmit warnings. ' % python_version)
if may_prompt:
......
......@@ -902,7 +902,6 @@ def CheckChangeOnCommit(input_api, output_api):
text = (
RUNNING_PY_CHECKS_TEXT + 'Warning, no PRESUBMIT.py found.\n'
'Running default presubmit script.\n'
'\n'
'** Presubmit ERRORS **\n!!\n\n'
'Was the presubmit check useful? If not, run "git cl presubmit -v"\n'
'to figure out which PRESUBMIT.py was run, then run git blame\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment