Skip to content

Commit

Permalink
Explain checking level flag in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
25077667 committed Feb 21, 2024
1 parent d882150 commit b9c9a02
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 @@ -44,7 +44,8 @@ if [ "$CPPCHECK_MAJOR_VERSION" -eq 1 ] && [ "$CPPCHECK_MINOR_VERSION" -lt 90 ];
exit 1
fi

# Append --check-level=exhaustive if the version is 2.11+
# We need to append the --check-level=exhaustive flag becuase cppcheck would complain:
# "log2_lshift16.h:15.1 ValueFlow analysis is limited in log2_lshift16. Use --check-level=exhaustive if full analysis is wanted."
if [ "$CPPCHECK_MAJOR_VERSION" -eq 2 ] && [ "$CPPCHECK_MINOR_VERSION" -ge 11 ]; then
CPPCHECK_OPTS="$CPPCHECK_OPTS --check-level=exhaustive"
fi
Expand Down

0 comments on commit b9c9a02

Please sign in to comment.