]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson: Define our own clang-tidy target
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 24 Apr 2025 09:58:45 +0000 (11:58 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 24 Apr 2025 10:36:36 +0000 (12:36 +0200)
commit44e86153d175e336ebd9b916fd31c87770a2198c
tree0404a88f5d439f8e277b65207bf9c4564f10e391
parent10594762c7c26f944d038ed87258d997eb98079c
meson: Define our own clang-tidy target

meson's target has a few issues:
- Runs on all source files regardless if they're included in the
  build or not
- Doesn't have any dependencies on generated sources which means we
  have to do a full build first before we can run clang-tidy
- Doesn't allow us to pass any extra arguments

To work around these, let's define our own clang-tidy target instead
using llvm's run-clang-tidy script. Alongside the clang-tidy target,
let's start keeping track of all generated sources which we make the
clang-tidy target depend on. We also add a new target which will only
generate source files which is useful for setting up the source tree
for running code analysis against it.
24 files changed:
.clang-tidy-ignore [deleted file]
.github/workflows/linter.yml
docs/HACKING.md
meson.build
src/basic/meson.build
src/boot/meson.build
src/core/bpf/restrict_fs/meson.build
src/core/bpf/restrict_ifaces/meson.build
src/core/bpf/socket_bind/meson.build
src/core/meson.build
src/home/meson.build
src/journal/meson.build
src/libsystemd/meson.build
src/libsystemd/sd-bus/test-bus-marshal.c
src/login/meson.build
src/network/bpf/sysctl_monitor/meson.build
src/network/meson.build
src/nspawn/meson.build
src/nsresourced/bpf/userns_restrict/meson.build
src/resolve/meson.build
src/shared/meson.build
src/test/meson.build
src/timesync/meson.build
src/udev/meson.build