X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=.ci%2Fwarn%2Frun.sh;h=2add1a5ccfcc754331bdc213d969e9467c1d46f7;hb=1aa8ac8c41ab8580fce1956086d7e6c7e84a09ee;hp=a4b3d9dcd4a778470bd667b0450553ee125a229e;hpb=09dda64ce99668c918fada04b9ad6bf9cd2ab104;p=tinc diff --git a/.ci/warn/run.sh b/.ci/warn/run.sh index a4b3d9dc..2add1a5c 100755 --- a/.ci/warn/run.sh +++ b/.ci/warn/run.sh @@ -6,12 +6,25 @@ test -n "$CC" result=0 +clang_tidy() { + rm -f compile_commands.json + ln -s "$1"/compile_commands.json . + run-clang-tidy || result=$? +} + check_warnings() { - git clean -dfx - ./.ci/build.sh -Dwerror=true "$@" || result=$? + flavor="$1" + dir="${CC}_${flavor}" + + ./.ci/build.sh "$dir" -Dwerror=true || result=$? + + case "$CC" in + clang*) clang_tidy "$dir" ;; + esac } -check_warnings -check_warnings -Dcrypto=nolegacy +check_warnings default +check_warnings nolegacy +check_warnings gcrypt exit $result