diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-05-12 15:52:52 +1000 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-05-16 15:47:01 +0200 |
| commit | a2a2f404a7b6aa44f166006dbd85207b2727248d (patch) | |
| tree | 22d35950a801c1d4981a9745c966cea04260723b | |
| parent | b356b62e04d4b5b862c5561229e00425f1ca3dd9 (diff) | |
| download | passt-a2a2f404a7b6aa44f166006dbd85207b2727248d.tar passt-a2a2f404a7b6aa44f166006dbd85207b2727248d.tar.gz passt-a2a2f404a7b6aa44f166006dbd85207b2727248d.tar.bz2 passt-a2a2f404a7b6aa44f166006dbd85207b2727248d.tar.lz passt-a2a2f404a7b6aa44f166006dbd85207b2727248d.tar.xz passt-a2a2f404a7b6aa44f166006dbd85207b2727248d.tar.zst passt-a2a2f404a7b6aa44f166006dbd85207b2727248d.zip | |
Makefile: Split static checker targets
Currently we have a single 'cppcheck' and 'clang-tidy' target which checks
passt. However, it doesn't check the additional binaries, qrap and
passt-repair. In preparation for running the static checkers on those as
well, split the targets into a top-level rule and a pattern rule which we
will be able to reuse.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | Makefile | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -193,8 +193,13 @@ docs: README.md CLANG_TIDY = clang-tidy CLANG_TIDY_FLAGS = -DCLANG_TIDY_58992 -clang-tidy: $(PASST_SRCS) - $(CLANG_TIDY) $^ -- $(BASE_CPPFLAGS) $(CPPFLAGS) $(CLANG_TIDY_FLAGS) +clang-tidy: passt.clang-tidy + +.PHONY: %.clang-tidy +%.clang-tidy: + $(CLANG_TIDY) $(filter %.c,$^) -- $(BASE_CPPFLAGS) $(CPPFLAGS) $(CLANG_TIDY_FLAGS) + +passt.clang-tidy: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h CPPCHECK = cppcheck CPPCHECK_FLAGS = --std=c11 --error-exitcode=1 --enable=all --force \ @@ -209,5 +214,10 @@ CPPCHECK_FLAGS = --std=c11 --error-exitcode=1 --enable=all --force \ --suppress=unusedStructMember \ -D CPPCHECK_6936 -cppcheck: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h +cppcheck: passt.cppcheck + +.PHONY: %.cppcheck +%.cppcheck: $(CPPCHECK) $(CPPCHECK_FLAGS) $(BASE_CPPFLAGS) $^ + +passt.cppcheck: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h |
