Skip to content

Commit 712f7a8

Browse files
committed
Add a check for double underscores in identifiers in check-names.sh
1 parent e2e1995 commit 712f7a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/scripts/check-names.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ for THING in actual-macros enum-consts; do
5757
printf "Names of $THING: "
5858
test -r $THING
5959
BAD=$( grep -E -v '^(MBEDTLS|PSA)_[0-9A-Z_]*[0-9A-Z]$' $THING || true )
60-
if [ "x$BAD" = "x" ]; then
60+
UNDERSCORES=$( grep -E '.*__.*' $THING || true )
61+
62+
if [ "x$BAD" = "x" ] && [ "x$UNDERSCORES" = "x" ]; then
6163
echo "PASS"
6264
else
6365
echo "FAIL"
6466
echo "$BAD"
67+
echo "$UNDERSCORES"
6568
FAIL=1
6669
fi
6770
done

0 commit comments

Comments
 (0)