mirror of https://github.com/zulip/zulip.git
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:
parent
14b5e265c2
commit
1b84617771
|
@ -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']:
|
||||||
|
|
Loading…
Reference in New Issue