forked from mapbox/mapbox-gl-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] add make target "tidy" for running clang-tidy
- Loading branch information
Showing
4 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Checks: '-clang-analyzer-security.insecureAPI.rand' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -o pipefail | ||
|
||
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." | ||
if [ -z ${CLANG_TIDY} ]; then | ||
echo "Alternatively, you can set CLANG_TIDY to point to clang-tidy." | ||
fi | ||
exit 1 | ||
} | ||
|
||
cd build/${HOST}-${HOST_VERSION}/${BUILDTYPE} | ||
|
||
git ls-files '../../../src/mbgl/*.cpp' '../../../platform/*.cpp' '../../../test/*.cpp' | \ | ||
xargs -I{} -P ${JOBS} ${CLANG_TIDY:-clang-tidy} -header-filter='\/mbgl\/' {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters