Add a check for double underscores in identifiers in check-names.sh

This commit is contained in:
Unknown 2019-08-21 03:34:00 -04:00
parent e2e19959d7
commit 712f7a804e

View file

@ -57,11 +57,14 @@ for THING in actual-macros enum-consts; do
printf "Names of $THING: "
test -r $THING
BAD=$( grep -E -v '^(MBEDTLS|PSA)_[0-9A-Z_]*[0-9A-Z]$' $THING || true )
if [ "x$BAD" = "x" ]; then
UNDERSCORES=$( grep -E '.*__.*' $THING || true )
if [ "x$BAD" = "x" ] && [ "x$UNDERSCORES" = "x" ]; then
echo "PASS"
else
echo "FAIL"
echo "$BAD"
echo "$UNDERSCORES"
FAIL=1
fi
done