Fix weight comparison in edge BFS
[tinc] / .ci / tidy / run.sh
index d196975..a2439f7 100755 (executable)
@@ -2,8 +2,10 @@
 
 set -eu
 
+./.ci/build.sh build "$@"
+
 # Which paths to ignore.
-paths='src/solaris src/mingw src/gcrypt'
+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,11 +28,6 @@ for path in $paths; do
   path_filters=" $path_filters ! ( -path $path -prune ) "
 done
 
-if ! [ -f compile_commands.json ]; then
-  make clean
-  compiledb make all extra
-fi
-
 echo >&2 "Running clang-tidy without $paths"
 
 # This is fine, our paths are relative and do not contain any whitespace.
@@ -38,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='.*' '{}' +