summaryrefslogtreecommitdiff
path: root/buildscripts/clang_format.py
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-03-03 09:11:29 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-03-03 09:12:39 -0500
commit98150643cacff860b8bd6a965b5fcff2786660cd (patch)
tree294f8ab5dbb8cfa9b2f7a46ac8d448bf812dfa2e /buildscripts/clang_format.py
parentf3dac8565e35184317717bdc46c2f5967d120be7 (diff)
downloadmongo-98150643cacff860b8bd6a965b5fcff2786660cd.tar.gz
SERVER-22339 Integrate JavaScript formatting into scons "lint" target
Diffstat (limited to 'buildscripts/clang_format.py')
-rwxr-xr-xbuildscripts/clang_format.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/buildscripts/clang_format.py b/buildscripts/clang_format.py
index b8a1f963719..384eb9b450c 100755
--- a/buildscripts/clang_format.py
+++ b/buildscripts/clang_format.py
@@ -482,9 +482,11 @@ class Repo(object):
# This allows us to pick all the interesting files
# in the mongo and mongo-enterprise repos
file_list = [line.rstrip()
- for line in gito.splitlines() if "src" in line and not "src/third_party" in line]
+ for line in gito.splitlines()
+ if (line.startswith("jstests") or line.startswith("src"))
+ and not line.startswith("src/third_party")]
- files_match = re.compile('\\.(h|cpp)$')
+ files_match = re.compile('\\.(h|cpp|js)$')
file_list = [a for a in file_list if files_match.search(a)]