diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-12-17 09:09:59 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-12-17 09:09:59 +0530 |
commit | 8c09154d5969ae628aeb5e5c8bc6ee6174a2efd0 (patch) | |
tree | c4adc9324e88025e506b184233c59aa9591fbec0 | |
parent | 0e4ae508e2c15c75aacc05d536e7c914e5a149d4 (diff) | |
parent | 75d64d3b3fc65a2d3ffcc4da1db3cb456b4c2fca (diff) | |
download | servo-8c09154d5969ae628aeb5e5c8bc6ee6174a2efd0.tar.gz servo-8c09154d5969ae628aeb5e5c8bc6ee6174a2efd0.zip |
Auto merge of #8977 - frewsxcv:immediate-tidy-errors, r=jdm
Print tidy errors as they happen instead of all-at-once
Related to #8969
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8977)
<!-- Reviewable:end -->
-rw-r--r-- | python/tidy.py | 14 |
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 |