From b6837761815e1a8f6f475be4575824fc386a08dd Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 21 Apr 2021 18:45:08 +0200 Subject: [PATCH] Per-line opt-out of check-names typo check Signed-off-by: Gilles Peskine --- tests/scripts/check-names.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/scripts/check-names.sh b/tests/scripts/check-names.sh index 70c64b928..9492896f6 100755 --- a/tests/scripts/check-names.sh +++ b/tests/scripts/check-names.sh @@ -97,8 +97,9 @@ LIBRARY="$( ls library/*.c )" LIBRARY="$LIBRARY 3rdparty/everest/library/everest.c 3rdparty/everest/library/x25519.c" NL=' ' -sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \ - $HEADERS $LIBRARY \ +cat $HEADERS $LIBRARY \ + | grep -v -e '//no-check-names' -e '#error' \ + | sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \ | grep MBEDTLS | sort -u > _MBEDTLS_XXX TYPOS=$( diff _caps _MBEDTLS_XXX | sed -n 's/^> //p' \ | egrep -v 'XXX|__|_$|^MBEDTLS_.*CONFIG_FILE$' || true )