mirror of https://github.com/zulip/zulip.git
Extract tools/linter_lib/exclude.py
This commit is contained in:
parent
40a2ffad98
commit
29affda956
14
tools/lint
14
tools/lint
|
@ -15,19 +15,6 @@ sanity_check.check_venv(__file__)
|
||||||
import lister
|
import lister
|
||||||
from typing import cast, Any, Callable, Dict, Iterator, List, Optional, Tuple
|
from typing import cast, Any, Callable, Dict, Iterator, List, Optional, Tuple
|
||||||
|
|
||||||
# Exclude some directories and files from lint checking
|
|
||||||
EXCLUDED_FILES = [
|
|
||||||
# Third-party code that doesn't match our style
|
|
||||||
"api/integrations/perforce/git_p4.py",
|
|
||||||
"puppet/apt/.forge-release",
|
|
||||||
"puppet/apt/README.md",
|
|
||||||
"static/third",
|
|
||||||
# Transifex syncs translation.json files without trailing
|
|
||||||
# newlines; there's nothing other than trailing newlines we'd be
|
|
||||||
# checking for in these anyway.
|
|
||||||
"static/locale",
|
|
||||||
]
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def bright_red_output():
|
def bright_red_output():
|
||||||
# type: () -> Iterator[None]
|
# type: () -> Iterator[None]
|
||||||
|
@ -232,6 +219,7 @@ def run():
|
||||||
sys.path.insert(0, root_dir)
|
sys.path.insert(0, root_dir)
|
||||||
|
|
||||||
from tools.linter_lib.custom_check import build_custom_checkers
|
from tools.linter_lib.custom_check import build_custom_checkers
|
||||||
|
from tools.linter_lib.exclude import EXCLUDED_FILES
|
||||||
|
|
||||||
from tools.lib.test_script import (
|
from tools.lib.test_script import (
|
||||||
get_provisioning_status,
|
get_provisioning_status,
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
# Exclude some directories and files from lint checking
|
||||||
|
EXCLUDED_FILES = [
|
||||||
|
# Third-party code that doesn't match our style
|
||||||
|
"api/integrations/perforce/git_p4.py",
|
||||||
|
"puppet/apt/.forge-release",
|
||||||
|
"puppet/apt/README.md",
|
||||||
|
"static/third",
|
||||||
|
# Transifex syncs translation.json files without trailing
|
||||||
|
# newlines; there's nothing other than trailing newlines we'd be
|
||||||
|
# checking for in these anyway.
|
||||||
|
"static/locale",
|
||||||
|
]
|
Loading…
Reference in New Issue