Test for missing newlines at end of file in tidy.py.

This commit is contained in:
Ms2ger 2014-07-11 13:16:07 +02:00
parent b1493519c9
commit 4ff4b5833d
4 changed files with 6 additions and 3 deletions

View file

@ -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")