Skip to content

Commit

Permalink
Suppress Cppcheck checking level
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.

This commit is aiming for fixing commit #3aa0d55's misinformed title.
We just add comments to explain why this changes.
  • Loading branch information
25077667 committed Feb 29, 2024
1 parent 3aa0d55 commit cec5179
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/pre-commit.hook
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ for f in *.c; do
CPPCHECK_unmatched="$CPPCHECK_unmatched --suppress=unmatchedSuppression:$f"
done

# We suppress the checkLevelNormal warning for Cppcheck versions 2.11 and above.
# Please refer to issues/153 for more details.
CPPCHECK_suppresses="--inline-suppr harness.c \
--suppress=missingIncludeSystem \
--suppress=noValidConfiguration \
Expand Down

0 comments on commit cec5179

Please sign in to comment.