From 1b84617771dd670faa949c27ef281ad125b9e6d8 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 8 Apr 2016 11:36:08 -0700 Subject: [PATCH] Don't skip running python custom linters inside comments. This fixes an issue where we weren't checking for trailing whitespace in comments. --- tools/lint-all | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/lint-all b/tools/lint-all index dd6d1379c8..0706d28146 100755 --- a/tools/lint-all +++ b/tools/lint-all @@ -142,9 +142,6 @@ python_rules = [ {'pattern': '% [a-zA-Z0-9_.]*\)?$', 'description': 'Used % comprehension without a tuple'}, ] + whitespace_rules -python_line_skip_rules = [ - '\s*[*#]', # comments - ] bash_rules = [ {'pattern': '#!.*sh [-xe]', 'description': 'Fix shebang line with proper call to /usr/bin/env for Bash path, change -x|-e switches to set -x|set -e'}, @@ -154,7 +151,7 @@ def check_custom_checks(): failed = False for fn in by_lang['py']: - if custom_check_file(fn, python_rules, skip_rules=python_line_skip_rules): + if custom_check_file(fn, python_rules): failed = True for fn in by_lang['js']: