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

@ -139,4 +139,4 @@ impl FromStr for ByteString {
fn from_str(s: &str) -> Option<ByteString> {
Some(ByteString::new(s.container_into_owned_bytes()))
}
}
}

View file

@ -50,4 +50,4 @@ impl Reflectable for File {
fn reflector<'a>(&'a self) -> &'a Reflector {
self.blob.reflector()
}
}
}

View file

@ -151,4 +151,4 @@ impl URLSearchParamsHelpers for URLSearchParams {
// XXXManishearth Implement this when the URL interface is implemented
// http://url.spec.whatwg.org/#concept-uq-update
}
}
}

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