X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=.ci%2Ftidy%2Frun.sh;h=a2439f7dd6beb0bfcab7023728fc9fab67524654;hb=72091d5c770856870bb8cd51bcc5641078c7562c;hp=8af4767a9622175edcbe44c6702d25e4dfec4cb9;hpb=7619f84393f824a84e20e03167304b27d3581ac0;p=tinc diff --git a/.ci/tidy/run.sh b/.ci/tidy/run.sh index 8af4767a..a2439f7d 100755 --- a/.ci/tidy/run.sh +++ b/.ci/tidy/run.sh @@ -2,8 +2,10 @@ set -eu +./.ci/build.sh build "$@" + # Which paths to ignore. -paths='src/solaris src/mingw' +paths='src/solaris src/windows src/gcrypt' case "$(uname -s)" in Linux) @@ -11,7 +13,7 @@ Linux) ;; FreeBSD) - paths="$paths src/linux src/bsd/tunemu.c" + paths="$paths src/linux src/bsd/darwin src/bsd/openbsd" ;; Darwin) @@ -26,12 +28,6 @@ for path in $paths; do path_filters=" $path_filters ! ( -path $path -prune ) " done -if ! [ -f compile_commands.json ]; then - # Running compiledb directly on this doesn't work on FreeBSD for some reason. - make -j2 all extra - compiledb -n make check -fi - echo >&2 "Running clang-tidy without $paths" # This is fine, our paths are relative and do not contain any whitespace. @@ -39,4 +35,4 @@ echo >&2 "Running clang-tidy without $paths" find src \ $path_filters \ -name '*.c' \ - -exec clang-tidy --header-filter='.*' '{}' + + -exec clang-tidy -p build --header-filter='.*' '{}' +