2 # clang-tidy is an utility to check that some c++ code good practices and patterns are respected. We use it at 1% of its possibilities (only when it suggests fixes).
5 CMP_BRANCH
="origin/master"
6 GIT_DIR
=`git rev-parse --show-toplevel`
8 if [ ! "$GIT_DIR" ]; then
9 echo "This must be run from a git repository."
13 if [ "$1" != "" ]; then
17 # "borrow" a 3rdparty file to dump header includes
18 BORROW
="src/3rdparty/adaptagrams/libcola/box.cpp"
20 git
diff $CMP_BRANCH --name-only -- '**.h' |
sed 's!.*!#include"../../../../&"!' |
tee $BORROW
21 git
diff $CMP_BRANCH --name-only -- '**.cpp' |
tee -a clang_tidy_files
22 bash buildtools
/clangtidy-helper.sh $
(cat clang_tidy_files
)