mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
meson: Rework clang-tidy integration to be done via unit tests
Instead of using run-clang-tidy.py with its own scheduling, let's just gather a list of source files ourselves and then use that to add a unit test for each source file that runs clang-tidy on the source file. We also add a bit of logic to run clang-tidy on most header files as well for extra coverage. This uncovered various header files that were not standalone so this commit also includes fixes to make sure the clang-tidy tests are all green. We can also use this in a later commit to run clang-include-cleaner on each source file in the same way.
This commit is contained in:
2
.github/workflows/linter.yml
vendored
2
.github/workflows/linter.yml
vendored
@@ -74,4 +74,4 @@ jobs:
|
||||
run: mkosi sandbox -- env CC=clang CXX=clang++ meson setup build
|
||||
|
||||
- name: Run clang-tidy
|
||||
run: mkosi sandbox -- ninja -C build clang-tidy
|
||||
run: mkosi sandbox -- meson test -C build --suite=clang-tidy --print-errorlogs --no-stdsplit
|
||||
|
||||
Reference in New Issue
Block a user