Make 'no newline at end of file' lint error more actionable.

There's a handy sed command to fix this, so we might as well document
it.
This commit is contained in:
Tim Abbott 2016-04-14 10:50:53 -07:00
parent e71d8bb4b6
commit 2b76f6223e
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ def custom_check_file(fn, rules, skip_rules=[]):
traceback.print_exc()
lastLine = line
if lineFlag and '\n' not in lastLine:
print("No new line at the end of %s" % (fn,))
print("No newline at the end of file. Fix with `sed -i '$a\\' %s`" % (fn,))
failed = True
return failed