1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Update clang-tidy configuration and scripts

This commit is contained in:
sfan5 2020-03-11 13:33:54 +01:00
parent 7908b20dd9
commit 8546d6089a
3 changed files with 260 additions and 211 deletions

View file

@ -7,8 +7,6 @@ if [ -z "${CLANG_TIDY}" ]; then
CLANG_TIDY=clang-tidy
fi
files_to_analyze="$(find src/ -name '*.cpp' -or -name '*.h')"
mkdir -p cmakebuild && cd cmakebuild
cmake -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
@ -20,11 +18,11 @@ make GenerateVersion
cd ..
echo "Performing clang-tidy checks..."
./util/travis/run-clang-tidy.py -clang-tidy-binary=${CLANG_TIDY} -p cmakebuild \
-checks='-*,modernize-use-emplace,modernize-avoid-bind,performance-*' \
-warningsaserrors='-*,modernize-use-emplace,performance-type-promotion-in-math-fn,performance-faster-string-find,performance-implicit-cast-in-loop' \
-no-command-on-stdout -quiet \
files 'src/.*'
./util/travis/run-clang-tidy.py \
-clang-tidy-binary=${CLANG_TIDY} -p cmakebuild \
-quiet -config="$(cat .clang-tidy)" \
'src/.*'
RET=$?
echo "Clang tidy returned $RET"
exit $RET