mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
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.
This commit is contained in:
4
.github/workflows/linter.yml
vendored
4
.github/workflows/linter.yml
vendored
@@ -73,9 +73,5 @@ jobs:
|
||||
- name: Configure meson
|
||||
run: mkosi sandbox -- env CC=clang CXX=clang++ meson setup build
|
||||
|
||||
# Make sure all generated source files are actually generated by doing a full build.
|
||||
- name: Build systemd
|
||||
run: mkosi sandbox -- ninja -C build
|
||||
|
||||
- name: Run clang-tidy
|
||||
run: mkosi sandbox -- ninja -C build clang-tidy
|
||||
|
||||
Reference in New Issue
Block a user