lint: Fix long lines not being treated as actual errors.

This led to Travis CI not reporting on line-too-long errors.
This commit is contained in:
Tim Abbott 2017-01-08 22:42:19 -08:00
parent 464411833d
commit 3a64857a4c
1 changed files with 1 additions and 0 deletions

View File

@ -166,6 +166,7 @@ def build_custom_checkers(by_lang):
not re.match("\[[a-z0-9_-]*\]: http.*", line) and
"#ignorelongline" not in line and 'migrations' not in fn):
print("Line too long (%s) at %s line %s: %s" % (len(line), fn, i+1, line_newline_stripped))
failed = True
lastLine = line
if lineFlag and '\n' not in lastLine:
print("No newline at the end of file. Fix with `sed -i '$a\\' %s`" % (fn,))