diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-09-23 04:17:16 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-09-23 04:17:16 -0600 |
commit | 8f1469eb08a437bcc6cfb510334be2b6430b4a8f (patch) | |
tree | 348241591eb4ef91e36cae31dde1adff87419a54 | |
parent | eca448363de576cf0108ac4d37fbbe1aeb659598 (diff) | |
parent | 705d8f7a1c3dccaa4205a8c1aa353433320823bc (diff) | |
download | servo-8f1469eb08a437bcc6cfb510334be2b6430b4a8f.tar.gz servo-8f1469eb08a437bcc6cfb510334be2b6430b4a8f.zip |
Auto merge of #7692 - ddrmanxbxfr:TidyMaxLineOver120, r=nox
Raise max length error over 120 chars not at 120 chars. python/tidy.py
This is a follow up of issue : Tidy has an off-by-one error #7686
It allows to raise the max length error when line is over than 120 not at 120 specifically.
Thanks for looking into it.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7692)
<!-- Reviewable:end -->
-rw-r--r-- | python/tidy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/tidy.py b/python/tidy.py index 87e1cf142a7..eed16f41f15 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -76,7 +76,7 @@ def check_length(file_name, idx, line): if file_name.endswith(".lock"): raise StopIteration max_length = 120 - if len(line) >= max_length: + if len(line.rstrip('\n')) > max_length: yield (idx + 1, "Line is longer than %d characters" % max_length) |