summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-12-03 14:42:28 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-12-03 15:38:36 +0100
commite12cd6aef4858b09c8ca449e779a58d15e878932 (patch)
tree9d6ad9acc6eae9075e03f09dcffbef8a02f88d4b /scripts
parent673e87f6516917d5c45a1c96c7a9c56ed6fef2cc (diff)
downloadqtlocation-mapboxgl-e12cd6aef4858b09c8ca449e779a58d15e878932.tar.gz
[build] Add clang-tidy to Travis
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/linux/tidy.sh17
-rw-r--r--scripts/main.mk2
2 files changed, 19 insertions, 0 deletions
diff --git a/scripts/linux/tidy.sh b/scripts/linux/tidy.sh
new file mode 100755
index 0000000000..424c82c3cd
--- /dev/null
+++ b/scripts/linux/tidy.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+
+# Ensure mason is on the PATH
+export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
+
+BUILDTYPE=${BUILDTYPE:-Release}
+
+export CLANG_TIDY=clang-tidy-3.8
+
+mapbox_time "config" \
+make config
+
+mapbox_time "tidy" \
+make tidy
diff --git a/scripts/main.mk b/scripts/main.mk
index eab78ef626..aefd2690ed 100644
--- a/scripts/main.mk
+++ b/scripts/main.mk
@@ -65,6 +65,8 @@ config/%.gypi: $(SUBMODULES) configure $(CONFIGURE_FILES)
@printf "$(TEXT_BOLD)$(COLOR_GREEN)* Recreating project...$(FORMAT_END)\n"
$(QUIET)$(ENV) ./scripts/flock.py build/Configure.lock ./configure config/$*.gypi
+.PHONY: config
+config: config/$(HOST_SLUG).gypi
#### Build files ###############################################################