From 988a4d75f89473cbf76e09852a03f21658859710 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 24 Oct 2024 23:10:09 +0200 Subject: Makefile: Exclude qrap.c from clang-tidy checks We'll deprecate qrap(1) soon, and warnings reported by clang-tidy as of LLVM versions 16 and later would need a bunch of changes there to be addressed, mostly around CERT C rule ERR33-C and checking return code from snprintf(). It makes no sense to fix warnings in qrap just for the sake of it, so officially declare the bitrotting season open. Signed-off-by: Stefano Brivio Reviewed-by: David Gibson --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4c2d020..01f0cc1 100644 --- a/Makefile +++ b/Makefile @@ -256,7 +256,7 @@ docs: README.md # weird for cases like standalone constants, and causes other # awkwardness for a bunch of cases we use -clang-tidy: $(SRCS) $(HEADERS) +clang-tidy: $(filter-out qrap.c,$(SRCS)) $(HEADERS) clang-tidy -checks=*,-modernize-*,\ -clang-analyzer-valist.Uninitialized,\ -cppcoreguidelines-init-variables,\ @@ -283,7 +283,7 @@ clang-tidy: $(SRCS) $(HEADERS) -misc-include-cleaner,\ -cppcoreguidelines-macro-to-enum \ -config='{CheckOptions: [{key: bugprone-suspicious-string-compare.WarnOnImplicitComparison, value: "false"}]}' \ - --warnings-as-errors=* $(SRCS) -- $(filter-out -pie,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) -DCLANG_TIDY_58992 + --warnings-as-errors=* $(filter-out qrap.c,$(SRCS)) -- $(filter-out -pie,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) -DCLANG_TIDY_58992 SYSTEM_INCLUDES := /usr/include $(wildcard /usr/include/$(TARGET)) ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version"),1) -- cgit v1.2.3