Add script to explicitly run clang-tidy on the whole code base
This commit is contained in:
parent
5b0fa8c2f7
commit
67c9129909
17
run-clang-tidy.sh
Executable file
17
run-clang-tidy.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Note: Call this from a cmake build directory (e.g. cmake/) for out-of-source builds
|
||||
# Examples:
|
||||
# mkdir cmake && cd cmake && ../run-clang-tidy.sh
|
||||
# mkdir cmake && cd cmake && ../run-clang-tidy.sh -fix
|
||||
# mkdir cmake && cd cmake && ../run-clang-tidy.sh -export-fixes fixes.yaml
|
||||
|
||||
set -e
|
||||
|
||||
NUMCORES=`nproc`
|
||||
|
||||
# Run cmake in current working directory, but on source that is in the same directory as this script file
|
||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON "${0%/*}"
|
||||
|
||||
run-clang-tidy.py -j${NUMCORES} -quiet -header-filter "$(realpath ${0%/*})/(src|test)/.*" $@
|
||||
|
Loading…
Reference in New Issue
Block a user