mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Test for missing newlines at end of file in tidy.py.
This commit is contained in:
parent
b1493519c9
commit
4ff4b5833d
4 changed files with 6 additions and 3 deletions
|
@ -31,6 +31,9 @@ def do_whitespace_check(name, contents):
|
|||
for idx, line in enumerate(contents):
|
||||
if line[-1] == "\n":
|
||||
line = line[:-1]
|
||||
else:
|
||||
report_error_name_no(name, idx + 1, "No newline at EOF")
|
||||
|
||||
if line.endswith(' '):
|
||||
report_error_name_no(name, idx + 1, "trailing whitespace")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue