Add a check for double underscores in identifiers in check-names.sh
This commit is contained in:
parent
e2e19959d7
commit
712f7a804e
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue