diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-10-30 07:33:38 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-10-30 07:33:38 -0400 |
commit | 9d6abb08c303e6a0cc2c08f71067c0b84977e4e6 (patch) | |
tree | 05d38d550b84904b6be4876496ff3b416496cbac /igor.py | |
parent | 9790c911ffcd9936f399ea830e669f6241a38fd2 (diff) | |
download | python-coveragepy-git-9d6abb08c303e6a0cc2c08f71067c0b84977e4e6.tar.gz |
One more way to be picky: no final blank lines.
Diffstat (limited to 'igor.py')
-rw-r--r-- | igor.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -64,6 +64,7 @@ def do_check_eol(args): return checked.add(fname) + line = None for n, line in enumerate(open(fname, "rb")): if crlf: if "\r" in line: @@ -77,6 +78,9 @@ def do_check_eol(args): print("%s@%d: trailing whitespace found" % (fname, n+1)) return + if line is not None and not line.strip(): + print("%s: final blank line" % (fname,)) + def check_files(root, patterns, **kwargs): for root, dirs, files in os.walk(root): for f in files: |