Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(736)

Unified Diff: presubmit_support.py

Issue 118498: Make the presubmit output much more compact. (Closed)
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcl.py ('k') | tests/gcl_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index ccbca74052398e92d18aa41795cafdcf84ced66b..352c79ec00906d6c8f090a4322d0e28647d2ee80 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -91,7 +91,7 @@ class OutputApi(object):
for item in self._items:
output_stream.write(' %s\n' % item)
if self._long_text:
- output_stream.write('\n***************\n%s\n***************\n\n' %
+ output_stream.write('\n***************\n%s\n***************\n' %
self._long_text)
if self.ShouldPrompt() and may_prompt:
@@ -694,7 +694,8 @@ def DoPresubmitChecks(change_info,
verbose,
output_stream,
input_stream,
- default_presubmit):
+ default_presubmit,
+ may_prompt):
"""Runs all presubmit checks that apply to the files in the change.
This finds all PRESUBMIT.py files in directories enclosing the files in the
@@ -711,6 +712,7 @@ def DoPresubmitChecks(change_info,
output_stream: A stream to write output from presubmit tests to.
input_stream: A stream to read input from the user.
default_presubmit: A default presubmit script to execute in any case.
+ may_prompt: Enable (y/n) questions on warning or error.
Return:
True if execution can continue, False if not.
@@ -751,7 +753,7 @@ def DoPresubmitChecks(change_info,
('Warnings', warnings),
('ERRORS', errors)):
if items:
- output_stream.write('\n** Presubmit %s **\n\n' % name)
+ output_stream.write('** Presubmit %s **\n' % name)
for item in items:
if not item._Handle(output_stream, input_stream,
may_prompt=False):
@@ -805,7 +807,8 @@ def Main(argv):
options.verbose,
sys.stdout,
sys.stdin,
- default_presubmit=None)
+ None,
+ False)
if __name__ == '__main__':
« no previous file with comments | « gcl.py ('k') | tests/gcl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698