summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-12 14:29:28 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-13 23:32:07 +0300
commitfe09510c1bca4d71e196314dca83f6b5ece26b5a (patch)
treec2a648d09e836464e569bc5860da7c89459f71fc /scripts
parenta40ff5188b94767fe1ac7b867b779e6bbbca624c (diff)
downloadqtlocation-mapboxgl-fe09510c1bca4d71e196314dca83f6b5ece26b5a.tar.gz
[build] Re-enable tidy checks
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/clang-tidy.sh17
1 files changed, 6 insertions, 11 deletions
diff --git a/scripts/clang-tidy.sh b/scripts/clang-tidy.sh
index 76773e475a..e6bb3794a2 100755
--- a/scripts/clang-tidy.sh
+++ b/scripts/clang-tidy.sh
@@ -3,24 +3,19 @@
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 || {
- echo "Can't find ${CLANG_TIDY:-clang-tidy} in PATH."
+CLANG_TIDY=${CLANG_TIDY:-$(mason prefix clang-tidy 3.8)/bin/clang-tidy}
+
+command -v ${CLANG_TIDY} >/dev/null 2>&1 || {
+ echo "Can't find ${CLANG_TIDY} in PATH."
if [ -z ${CLANG_TIDY} ]; then
echo "Alternatively, you can set CLANG_TIDY to point to clang-tidy."
fi
- if [ `uname -s` = 'Linux' ]; then
- echo "On Debian-based distros, you can install them via 'apt-get install clang-tidy'"
- elif [ `uname -s` = 'Darwin' ]; then
- echo "On OS X, you can install them via 'brew install llvm --with-clang --with-clang-extra-tools'"
- fi
exit 1
}
-cd "${directory}"
+cd $1
git ls-files '../../../src/mbgl/*.cpp' '../../../platform/*.cpp' '../../../test/*.cpp' | \
- xargs -I{} -P ${JOBS} ${CLANG_TIDY:-clang-tidy} -header-filter='\/mbgl\/' {}
+ xargs -I{} -P ${JOBS} ${CLANG_TIDY} {} -p=. -header-filter='mbgl' || exit 1