From 68005e0ffcc50c9260a162b717aaa5c2225096da Mon Sep 17 00:00:00 2001 From: Jonathan Abrahams Date: Wed, 11 Apr 2018 16:20:54 -0400 Subject: SERVER-23312 Enable Python formatting/linting for buildscripts & pytests files --- buildscripts/pylinters.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'buildscripts/pylinters.py') diff --git a/buildscripts/pylinters.py b/buildscripts/pylinters.py index 9ddce0a2c30..87d785d7231 100755 --- a/buildscripts/pylinters.py +++ b/buildscripts/pylinters.py @@ -57,9 +57,12 @@ def get_py_linter(linter_filter): def is_interesting_file(file_name): # type: (str) -> bool """Return true if this file should be checked.""" - return file_name.endswith(".py") and (file_name.startswith("buildscripts/idl") - or file_name.startswith("buildscripts/linter") - or file_name.startswith("buildscripts/pylinters.py")) + file_blacklist = ["buildscripts/cpplint.py"] + directory_blacklist = ["src/third_party"] + if file_name in file_blacklist or file_name.startswith(tuple(directory_blacklist)): + return False + directory_list = ["buildscripts", "pytests"] + return file_name.endswith(".py") and file_name.startswith(tuple(directory_list)) def _lint_files(linters, config_dict, file_names): -- cgit v1.2.1