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 <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
ba38e67cf4
commit
988a4d75f8
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -256,7 +256,7 @@ docs: README.md
|
||||||
# weird for cases like standalone constants, and causes other
|
# weird for cases like standalone constants, and causes other
|
||||||
# awkwardness for a bunch of cases we use
|
# 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-tidy -checks=*,-modernize-*,\
|
||||||
-clang-analyzer-valist.Uninitialized,\
|
-clang-analyzer-valist.Uninitialized,\
|
||||||
-cppcoreguidelines-init-variables,\
|
-cppcoreguidelines-init-variables,\
|
||||||
|
@ -283,7 +283,7 @@ clang-tidy: $(SRCS) $(HEADERS)
|
||||||
-misc-include-cleaner,\
|
-misc-include-cleaner,\
|
||||||
-cppcoreguidelines-macro-to-enum \
|
-cppcoreguidelines-macro-to-enum \
|
||||||
-config='{CheckOptions: [{key: bugprone-suspicious-string-compare.WarnOnImplicitComparison, value: "false"}]}' \
|
-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))
|
SYSTEM_INCLUDES := /usr/include $(wildcard /usr/include/$(TARGET))
|
||||||
ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version"),1)
|
ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version"),1)
|
||||||
|
|
Loading…
Reference in a new issue