Skip to content

Commit

Permalink
Suppress Cppcheck constant check (sysprog21#154)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
25077667 authored Feb 27, 2024
1 parent bbd4243 commit 3aa0d55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/pre-commit.hook
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ CPPCHECK_suppresses="--inline-suppr harness.c \
--suppress=nullPointer:qtest.c \
--suppress=returnDanglingLifetime:report.c \
--suppress=constParameterCallback:console.c \
--suppress=constParameterPointer:console.c"
--suppress=constParameterPointer:console.c \
--suppress=checkLevelNormal:log2_lshift16.h"
CPPCHECK_OPTS="-I. --enable=all --error-exitcode=1 --force $CPPCHECK_suppresses $CPPCHECK_unmatched ."

RETURN=0
Expand Down

0 comments on commit 3aa0d55

Please sign in to comment.