From 712f7a804e391737b0e9d2593abe291f4ccb0303 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 21 Aug 2019 03:34:00 -0400 Subject: [PATCH] Add a check for double underscores in identifiers in check-names.sh --- tests/scripts/check-names.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/scripts/check-names.sh b/tests/scripts/check-names.sh index 7d2302cb2b..68e8c74bf2 100755 --- a/tests/scripts/check-names.sh +++ b/tests/scripts/check-names.sh @@ -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