diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2021-02-24 17:35:11 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-06 13:29:10 +0000 |
commit | 982db36aae245c4cac674587bde741604748fc27 (patch) | |
tree | 731afb9c95f228d7048653475701ec10eed0f54b /buildscripts/utils.py | |
parent | 94236461bc1dc7b23812f37196229cb2fb6d6388 (diff) | |
download | mongo-982db36aae245c4cac674587bde741604748fc27.tar.gz |
SERVER-54031 Include .py and .idl files in the errorcodes.py scan
Diffstat (limited to 'buildscripts/utils.py')
-rw-r--r-- | buildscripts/utils.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/buildscripts/utils.py b/buildscripts/utils.py index ccd311ce8e0..e8af6fd8fd5 100644 --- a/buildscripts/utils.py +++ b/buildscripts/utils.py @@ -8,46 +8,6 @@ import subprocess import sys -def get_all_source_files(arr=None, prefix="."): - """Return source files.""" - if arr is None: - arr = [] - - if not os.path.isdir(prefix): - # assume a file - arr.append(prefix) - return arr - - for fx in os.listdir(prefix): - # pylint: disable=too-many-boolean-expressions - if (fx.startswith(".") or fx.startswith("pcre-") or fx.startswith("32bit") - or fx.startswith("mongodb-") or fx.startswith("debian") - or fx.startswith("mongo-cxx-driver") or "gotools" in fx or fx.find("mozjs") != -1): - continue - # pylint: enable=too-many-boolean-expressions - - def is_followable_dir(prefix, full): - """Return True if 'full' is a followable directory.""" - if not os.path.isdir(full): - return False - if not os.path.islink(full): - return True - # Follow softlinks in the modules directory (e.g: enterprise). - if os.path.split(prefix)[1] == "modules": - return True - return False - - full = prefix + "/" + fx - if is_followable_dir(prefix, full): - get_all_source_files(arr, full) - else: - if full.endswith(".cpp") or full.endswith(".h") or full.endswith(".c"): - full = full.replace("//", "/") - arr.append(full) - - return arr - - def get_git_branch(): """Return the git branch version.""" if not os.path.exists(".git") or not os.path.isdir(".git"): |