diff options
Diffstat (limited to 'tools/ci/jobs/clang_tidy.sh')
-rwxr-xr-x | tools/ci/jobs/clang_tidy.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/ci/jobs/clang_tidy.sh b/tools/ci/jobs/clang_tidy.sh new file mode 100755 index 000000000..593d986f4 --- /dev/null +++ b/tools/ci/jobs/clang_tidy.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +export LOGFILE=tidy.log + +source ./tools/ci/scripts/init.sh + +rm "logs/clang_tidy.txt" + +cd src + +find . -type f -name "*.cpp" -exec ../tools/ci/scripts/clang_tidy.sh "${FLAGS}" "" {} \; >>../logs/clang_tidy.txt +check_error $? +find . -type f -name "*.cc" -exec ../tools/ci/scripts/clang_tidy.sh "${FLAGS}" "-DUNITTESTS -DUNITTESTS_CATCH" {} \; >>../logs/clang_tidy.txt +check_error $? +find . -type f -name "*.h" -exec ../tools/ci/scripts/clang_tidy.sh "${FLAGS}" "" {} \; >>../logs/clang_tidy.txt +check_error $? + +cd .. + +grep "warning:" logs/clang_tidy.txt \ +| grep -v "src/test/doctest.h" \ +| grep -v "src/test/catch.hpp" \ +| grep -v "src/sdl2gfx/" \ +>${ERRFILE} + +run_check_warnings + +echo ok |