2018-06-10 18:33:33 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
. util/travis/common.sh
|
|
|
|
|
|
|
|
needs_compile || exit 0
|
|
|
|
|
2018-03-23 11:07:19 +01:00
|
|
|
if [ -z "${CLANG_TIDY}" ]; then
|
2018-04-01 23:57:55 +02:00
|
|
|
CLANG_TIDY=clang-tidy
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p cmakebuild && cd cmakebuild
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Debug \
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
|
|
-DRUN_IN_PLACE=TRUE \
|
|
|
|
-DENABLE_GETTEXT=TRUE \
|
|
|
|
-DENABLE_SOUND=FALSE \
|
|
|
|
-DBUILD_SERVER=TRUE ..
|
|
|
|
make GenerateVersion
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Performing clang-tidy checks..."
|
2020-03-11 13:33:54 +01:00
|
|
|
./util/travis/run-clang-tidy.py \
|
|
|
|
-clang-tidy-binary=${CLANG_TIDY} -p cmakebuild \
|
|
|
|
-quiet -config="$(cat .clang-tidy)" \
|
|
|
|
'src/.*'
|
|
|
|
|
2018-04-01 23:57:55 +02:00
|
|
|
RET=$?
|
|
|
|
echo "Clang tidy returned $RET"
|
|
|
|
exit $RET
|