X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=.ci%2Fwarn%2Frun.sh;h=2add1a5ccfcc754331bdc213d969e9467c1d46f7;hb=c789d94e0508c8d61219b2b042954209166b84a1;hp=b84bc2ecf1ff919a1e40d5484af1109b6efe24e3;hpb=72091d5c770856870bb8cd51bcc5641078c7562c;p=tinc diff --git a/.ci/warn/run.sh b/.ci/warn/run.sh index b84bc2ec..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 build -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