mirror of https://github.com/zulip/zulip.git
Run Python custom RE checks in parallel with non-python.
This saves about 1s (out of originally 3.3s) of time running all the linters in my development environment.
This commit is contained in:
parent
01c9bb2d5e
commit
267a71cf20
|
@ -265,12 +265,16 @@ json_rules = [] # just fix newlines at ends of files
|
|||
markdown_rules = whitespace_rules
|
||||
txt_rules = whitespace_rules
|
||||
|
||||
def check_custom_checks():
|
||||
def check_custom_checks_py():
|
||||
failed = False
|
||||
|
||||
for fn in by_lang['py']:
|
||||
if custom_check_file(fn, python_rules):
|
||||
failed = True
|
||||
return failed
|
||||
|
||||
def check_custom_checks_nonpy():
|
||||
failed = False
|
||||
|
||||
for fn in by_lang['js']:
|
||||
if custom_check_file(fn, js_rules):
|
||||
|
@ -354,8 +358,13 @@ try:
|
|||
return result
|
||||
|
||||
@lint
|
||||
def custom():
|
||||
failed = check_custom_checks()
|
||||
def custom_py():
|
||||
failed = check_custom_checks_py()
|
||||
return 1 if failed else 0
|
||||
|
||||
@lint
|
||||
def custom_nonpy():
|
||||
failed = check_custom_checks_nonpy()
|
||||
return 1 if failed else 0
|
||||
|
||||
@lint
|
||||
|
|
Loading…
Reference in New Issue