GitHub CI: change build system to meson
[tinc] / .ci / tidy / run.sh
1 #!/bin/sh
2
3 set -eu
4
5 ./.ci/build.sh "$@"
6
7 # Which paths to ignore.
8 paths='src/solaris src/mingw src/gcrypt'
9
10 case "$(uname -s)" in
11 Linux)
12   paths="$paths src/bsd"
13   ;;
14
15 FreeBSD)
16   paths="$paths src/linux src/bsd/tunemu.c"
17   ;;
18
19 Darwin)
20   paths="$paths src/linux src/vde_device.c"
21   ;;
22
23 *) exit 1 ;;
24 esac
25
26 path_filters=''
27 for path in $paths; do
28   path_filters=" $path_filters ! ( -path $path -prune ) "
29 done
30
31 echo >&2 "Running clang-tidy without $paths"
32
33 # This is fine, our paths are relative and do not contain any whitespace.
34 # shellcheck disable=SC2086
35 find src \
36   $path_filters \
37   -name '*.c' \
38   -exec clang-tidy -p build --header-filter='.*' '{}' +