pre-commit: skip some checks on idl2wrs.c.

Some checks intended for dissectors don't work well on dissector
*generators*, as they see stuff such as "value_string %s[]" in a format
string used to generate dissector code and get upset because the
purported value_string doesn't end with {0, NULL} (the generator *does*
put a {0, NULL} at the end, but the checker isn't clever enough to
figure that out).
This commit is contained in:
Guy Harris 2021-09-11 02:42:51 -07:00
parent 7f1f5b40b3
commit d4ed129727
1 changed files with 9 additions and 0 deletions

View File

@ -83,6 +83,15 @@ echo "$COMMIT_FILES" | $PYBIN "$bad_alloc_patterns"
CHECK_FILES=$( echo "$CHECK_FILES" | tr -d '\r' )
for FILE in $CHECK_FILES; do
# Skip some special cases
FILE_BASENAME="$( basename "$FILE" )"
# This should only be done on code that's part of one or more
# Wireshark programs; idl2wrs.c is a developer tool, not a
# Wireshark program, so these tests don't apply.
if test "$FILE_BASENAME" = "idl2wrs.c"
then
continue
fi
#Check if checkhf is good
./tools/checkhf.pl "$FILE" || exit_status=1