summaryrefslogtreecommitdiff
path: root/buildscripts/utils.py
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2021-02-24 17:35:11 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-06 13:29:10 +0000
commit982db36aae245c4cac674587bde741604748fc27 (patch)
tree731afb9c95f228d7048653475701ec10eed0f54b /buildscripts/utils.py
parent94236461bc1dc7b23812f37196229cb2fb6d6388 (diff)
downloadmongo-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.py40
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"):