mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-03 08:03:38 +08:00
CI: pin clang-format-18/clang-tidy-18, suppress cppcheck cross-version false positives
This commit is contained in:
@@ -16,16 +16,16 @@ jobs:
|
||||
- name: Install deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libsqlite3-dev zlib1g-dev cppcheck clang-tidy clang-format
|
||||
sudo apt-get install -y libsqlite3-dev zlib1g-dev cppcheck
|
||||
|
||||
- name: clang-format
|
||||
run: make -f Makefile.cbm lint-format
|
||||
run: make -f Makefile.cbm lint-format CLANG_FORMAT=clang-format-18
|
||||
|
||||
- name: cppcheck
|
||||
run: make -f Makefile.cbm lint-cppcheck
|
||||
|
||||
- name: clang-tidy
|
||||
run: make -f Makefile.cbm lint-tidy
|
||||
run: make -f Makefile.cbm lint-tidy CLANG_TIDY=clang-tidy-18
|
||||
|
||||
# ── Step 2: Unit tests (ASan + UBSan) ────────────────────────
|
||||
test:
|
||||
|
||||
+7
-5
@@ -408,11 +408,12 @@ clean-c:
|
||||
|
||||
# ── Linting ─────────────────────────────────────────────────────
|
||||
|
||||
# clang-tidy and clang-format from Homebrew LLVM (keg-only on macOS)
|
||||
LLVM_BIN = $(shell brew --prefix llvm 2>/dev/null)/bin
|
||||
CLANG_TIDY = $(shell [ -x "$(LLVM_BIN)/clang-tidy" ] && echo "$(LLVM_BIN)/clang-tidy" || echo clang-tidy)
|
||||
CLANG_FORMAT = $(shell [ -x "$(LLVM_BIN)/clang-format" ] && echo "$(LLVM_BIN)/clang-format" || echo clang-format)
|
||||
CPPCHECK = cppcheck
|
||||
# clang-tidy and clang-format: use Homebrew LLVM on macOS, overridable via make args
|
||||
# e.g. make lint-format CLANG_FORMAT=clang-format-18
|
||||
LLVM_BIN := $(shell brew --prefix llvm 2>/dev/null)/bin
|
||||
CLANG_TIDY ?= $(shell [ -x "$(LLVM_BIN)/clang-tidy" ] && echo "$(LLVM_BIN)/clang-tidy" || echo clang-tidy)
|
||||
CLANG_FORMAT ?= $(shell [ -x "$(LLVM_BIN)/clang-format" ] && echo "$(LLVM_BIN)/clang-format" || echo clang-format)
|
||||
CPPCHECK ?= cppcheck
|
||||
|
||||
# macOS SDK sysroot (needed for Homebrew LLVM to find system headers)
|
||||
SYSROOT = $(shell xcrun --show-sdk-path 2>/dev/null)
|
||||
@@ -442,6 +443,7 @@ lint-cppcheck:
|
||||
--quiet \
|
||||
--suppress=varFuncNullUB \
|
||||
--suppress=intToPointerCast \
|
||||
--suppress=unusedStructMember \
|
||||
--suppress=nullPointerOutOfMemory \
|
||||
--suppress=nullPointerArithmeticOutOfMemory \
|
||||
--suppress=ctunullpointerOutOfMemory \
|
||||
|
||||
Reference in New Issue
Block a user