Skip to content

Commit 46d0c24

Browse files
committed
fix: support GCC flags in clang-tidy 22
1 parent 67a9ff3 commit 46d0c24

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎Makefile.cbm‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,7 @@ clean-c:
11041104
# Pinned lint toolchain; callers may override either binary explicitly.
11051105
CLANG_TIDY ?= clang-tidy-22
11061106
CLANG_FORMAT ?= clang-format-20
1107+
CLANG_TIDY_FLAGS ?= -Wno-unknown-warning-option
11071108
CPPCHECK ?= cppcheck
11081109
# Cppcheck is the long pole in the CI lint gate. Its own worker pool is safer
11091110
# than partitioning LINT_SRCS across separate invocations because diagnostics,
@@ -1125,13 +1126,13 @@ LINT_TEST_SRCS = $(ALL_TEST_SRCS)
11251126
# clang-tidy: deep static analysis (config in .clang-tidy)
11261127
lint-tidy:
11271128
@echo "=== clang-tidy ==="
1128-
@$(CLANG_TIDY) --quiet $(LINT_SRCS) -- $(CFLAGS_COMMON) $(SYSROOT_FLAG)
1129+
@$(CLANG_TIDY) --quiet $(LINT_SRCS) -- $(CFLAGS_COMMON) $(CLANG_TIDY_FLAGS) $(SYSROOT_FLAG)
11291130

11301131
# clang-tidy, scoped to this commit's staged changes only (scripts/lint-tidy-diff.sh).
11311132
# The pre-commit hook runs this instead of the full lint-tidy sweep above, so a
11321133
# clean commit is not blocked by pre-existing findings elsewhere in the tree.
11331134
lint-tidy-diff:
1134-
@scripts/lint-tidy-diff.sh "$(CLANG_TIDY)" $(LINT_SRCS) -- $(CFLAGS_COMMON) $(SYSROOT_FLAG)
1135+
@scripts/lint-tidy-diff.sh "$(CLANG_TIDY)" $(LINT_SRCS) -- $(CFLAGS_COMMON) $(CLANG_TIDY_FLAGS) $(SYSROOT_FLAG)
11351136

11361137
# cppcheck: complementary analysis (config in .cppcheck)
11371138
lint-cppcheck:

0 commit comments

Comments
 (0)