From 29affda956ed47ad8c8c360a30fc0e298ef17450 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 5 Jun 2017 08:34:21 -0600 Subject: [PATCH] Extract tools/linter_lib/exclude.py --- tools/lint | 14 +------------- tools/linter_lib/exclude.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 tools/linter_lib/exclude.py diff --git a/tools/lint b/tools/lint index 61628ca139..15a775789c 100755 --- a/tools/lint +++ b/tools/lint @@ -15,19 +15,6 @@ sanity_check.check_venv(__file__) import lister 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 def bright_red_output(): # type: () -> Iterator[None] @@ -232,6 +219,7 @@ def run(): sys.path.insert(0, root_dir) from tools.linter_lib.custom_check import build_custom_checkers + from tools.linter_lib.exclude import EXCLUDED_FILES from tools.lib.test_script import ( get_provisioning_status, diff --git a/tools/linter_lib/exclude.py b/tools/linter_lib/exclude.py new file mode 100644 index 0000000000..cb9e3231b2 --- /dev/null +++ b/tools/linter_lib/exclude.py @@ -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", +]