File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# cppcheck suppressions file
2- #
3- # Suppress false positives and checks not relevant to our codebase.
4- # Philosophy: suppress as little as possible.
2+ # Only universally-supported suppression IDs here.
3+ # Version-specific IDs go in Makefile.cbm as --suppress flags.
54
6- # We use _Thread_local extensively — cppcheck doesn't fully understand it
7- threadsafety:*
8-
9- # Vendored code (tree-sitter grammars, yyjson, sqlite3)
5+ # Vendored code
106*:internal/cbm/vendored/*
117*:vendored/*
128
13- # Test framework uses some patterns cppcheck doesn't like
9+ # Test framework patterns
1410unusedFunction:tests/*
1511
16- # We intentionally use variable-length printf format strings
17- formatStringUsedSafely
18-
19- # OOM handling: CLI tool — crash is acceptable on allocation failure.
20- # Real bugs (unsafe realloc) are fixed; these are about NULL deref after
21- # malloc/calloc which on modern systems means the process is dying anyway.
22- nullPointerOutOfMemory
23- nullPointerArithmeticOutOfMemory
24- ctunullpointerOutOfMemory
25-
26- # Intentional (void*)1 sentinel pattern for hash table presence checks
27- intToPointerCast
28-
29- # cbm_log_info() uses NULL sentinel — macro adds it automatically
30- varFuncNullUB
31-
32- # Const correctness for vendor API types (yyjson, sqlite) — adding const
33- # requires casts against their APIs. Low value, high churn.
12+ # Intentional patterns
3413constVariablePointer
3514constParameterPointer
3615constVariable
Original file line number Diff line number Diff line change @@ -440,6 +440,12 @@ lint-cppcheck:
440440 --error-exitcode=1 \
441441 --inline-suppr \
442442 --quiet \
443+ --suppress=varFuncNullUB \
444+ --suppress=intToPointerCast \
445+ --suppress=nullPointerOutOfMemory \
446+ --suppress=nullPointerArithmeticOutOfMemory \
447+ --suppress=ctunullpointerOutOfMemory \
448+ --suppress='nullPointer:internal/cbm/sqlite_writer.c' \
443449 -Isrc -Ivendored -Ivendored/sqlite3 \
444450 -I$(CBM_DIR) -I$(TS_INCLUDE) \
445451 $(LINT_SRCS)
You can’t perform that action at this time.
0 commit comments