aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy.py
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2015-12-14 18:07:11 -0500
committerCorey Farwell <coreyf@rwell.org>2015-12-14 18:07:11 -0500
commit75d64d3b3fc65a2d3ffcc4da1db3cb456b4c2fca (patch)
tree22422a7cd22886bf443d66cbeb6475afd669064f /python/tidy.py
parent6032f8225b765dd5a0645118d7b43fa5913f9431 (diff)
downloadservo-75d64d3b3fc65a2d3ffcc4da1db3cb456b4c2fca.tar.gz
servo-75d64d3b3fc65a2d3ffcc4da1db3cb456b4c2fca.zip
Print tidy errors as they happen instead of all-at-once
Diffstat (limited to 'python/tidy.py')
-rw-r--r--python/tidy.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/python/tidy.py b/python/tidy.py
index 645749750aa..d974a89a1b8 100644
--- a/python/tidy.py
+++ b/python/tidy.py
@@ -587,12 +587,14 @@ def scan():
not_found_in_basic_list_errors = check_reftest_html_files_in_basic_list(reftest_dir)
wpt_lint_errors = check_wpt_lint_errors()
- errors = list(itertools.chain(errors, r_errors, not_found_in_basic_list_errors, wpt_lint_errors))
+ errors = itertools.chain(errors, r_errors, not_found_in_basic_list_errors, wpt_lint_errors)
- if errors:
- for error in errors:
- print "\033[94m{}\033[0m:\033[93m{}\033[0m: \033[91m{}\033[0m".format(*error)
- return 1
- else:
+ error = None
+ for error in errors:
+ print "\033[94m{}\033[0m:\033[93m{}\033[0m: \033[91m{}\033[0m".format(*error)
+
+ if error is None:
print "\033[92mtidy reported no errors.\033[0m"
return 0
+ else:
+ return 1