From ebb3dc48bf3cb3e460cd4eef1645425b8565f6b4 Mon Sep 17 00:00:00 2001 From: Eric Wald Date: Sun, 22 Mar 2015 20:46:46 -0600 Subject: [PATCH] Allowing whitespace-only lines. --- travis/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/lint.py b/travis/lint.py index 5d16eca70..23c30449e 100644 --- a/travis/lint.py +++ b/travis/lint.py @@ -74,7 +74,7 @@ class TrailingWhitespaceLinter(Linter): msg = 'Contains trailing whitespace' def check_line(self, line): line = line.replace('\r', '') - return not line.endswith(' ') and not line.endswith('\t') + return not line.strip() or not line.endswith(' ') and not line.endswith('\t') def fix_line(self, line): return line.rstrip('\t ')