summaryrefslogtreecommitdiff
path: root/tools/ci/jobs/clang_tidy.sh
blob: 593d986f4033b1f22ae9a81f1e47c17e0d3d70ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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