diff options
author | Ravi Shankar <wafflespeanut@gmail.com> | 2015-08-28 13:14:45 +0530 |
---|---|---|
committer | Ravi Shankar <wafflespeanut@gmail.com> | 2015-08-28 13:14:45 +0530 |
commit | 6ef5c8eec2b54e3a10def9231553ba1ab44f6714 (patch) | |
tree | 24b58c46a9b360b0e9fc2c41146dee1136a5157d /python/tidy.py | |
parent | 909429702972d53bf02dfe9a4aa93ea0cb588cf4 (diff) | |
download | servo-6ef5c8eec2b54e3a10def9231553ba1ab44f6714.tar.gz servo-6ef5c8eec2b54e3a10def9231553ba1ab44f6714.zip |
tidy will now show its expectation of uses
Diffstat (limited to 'python/tidy.py')
-rw-r--r-- | python/tidy.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/tidy.py b/python/tidy.py index 43ff23aeff5..9ea9de24f30 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -253,7 +253,10 @@ def check_rust(file_name, contents): sorted_uses = sorted(uses) for i in range(len(uses)): if sorted_uses[i] != uses[i]: - yield (idx + 1 - len(uses) + i, "use statement is not in alphabetical order") + message = "use statement is not in alphabetical order" + expected = "\n\t\033[93mexpected: {}\033[0m".format(sorted_uses[i]) + found = "\n\t\033[91mfound: {}\033[0m".format(uses[i]) + yield (idx + 1 - len(uses) + i, message + expected + found) uses = [] |