Skip to content

Commit 3aa0d55

Browse files
authored
Suppress Cppcheck constant check (sysprog21#154)
Refine the pre-commit hook to enforce a minimum Cppcheck version of 1.90, alerting users with an error message and providing guidance on compiling Cppcheck from source if their version is outdated. Additionally, upgrade the hook for "--check-level=exhaustive" option against Cppcheck versions 2.11 and above, ensuring a comprehensive analysis. This adjustment leverages the enhanced capabilities available from version 2.11, promoting more detailed code quality checks.
1 parent bbd4243 commit 3aa0d55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/pre-commit.hook

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ CPPCHECK_suppresses="--inline-suppr harness.c \
1616
--suppress=nullPointer:qtest.c \
1717
--suppress=returnDanglingLifetime:report.c \
1818
--suppress=constParameterCallback:console.c \
19-
--suppress=constParameterPointer:console.c"
19+
--suppress=constParameterPointer:console.c \
20+
--suppress=checkLevelNormal:log2_lshift16.h"
2021
CPPCHECK_OPTS="-I. --enable=all --error-exitcode=1 --force $CPPCHECK_suppresses $CPPCHECK_unmatched ."
2122

2223
RETURN=0

0 commit comments

Comments
 (0)