Don't skip running python custom linters inside comments.

This fixes an issue where we weren't checking for trailing whitespace
in comments.
This commit is contained in:
Tim Abbott 2016-04-08 11:36:08 -07:00
parent 14b5e265c2
commit 1b84617771
1 changed files with 1 additions and 4 deletions

View File

@ -142,9 +142,6 @@ python_rules = [
{'pattern': '% [a-zA-Z0-9_.]*\)?$', {'pattern': '% [a-zA-Z0-9_.]*\)?$',
'description': 'Used % comprehension without a tuple'}, 'description': 'Used % comprehension without a tuple'},
] + whitespace_rules ] + whitespace_rules
python_line_skip_rules = [
'\s*[*#]', # comments
]
bash_rules = [ bash_rules = [
{'pattern': '#!.*sh [-xe]', {'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'}, '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 failed = False
for fn in by_lang['py']: 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 failed = True
for fn in by_lang['js']: for fn in by_lang['js']: