summaryrefslogtreecommitdiff
path: root/scripts/clang-tidy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/clang-tidy.sh')
-rwxr-xr-xscripts/clang-tidy.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/clang-tidy.sh b/scripts/clang-tidy.sh
index ee3c1193ea..9420518747 100755
--- a/scripts/clang-tidy.sh
+++ b/scripts/clang-tidy.sh
@@ -3,6 +3,8 @@
set -e
set -o pipefail
+directory=$1
+
export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
command -v ${CLANG_TIDY:-clang-tidy} >/dev/null 2>&1 || {
@@ -13,7 +15,7 @@ command -v ${CLANG_TIDY:-clang-tidy} >/dev/null 2>&1 || {
exit 1
}
-cd build/${PLATFORM}-${SUBPLATFORM}/${BUILDTYPE}
+cd "${directory}"
git ls-files '../../../src/mbgl/*.cpp' '../../../platform/*.cpp' '../../../test/*.cpp' | \
xargs -I{} -P ${JOBS} ${CLANG_TIDY:-clang-tidy} -header-filter='\/mbgl\/' {}