Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/check_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@
# implementation), must not end with an underscore (for legibility),
# and must not consist of a single letter (because we've seen embedded
# platforms that claim single-uppercase-letter names for themselves).
INTERNAL_MACRO_PATTERN = re.compile("^[A-Z][0-9A-Z_]*[A-Z0-9]$")
#
# We make an exception for the helper macros that shadow the functions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to make the exception more specific and do it via to name_pattern_exception. Is there a reason why that wouldn't work?

# declared by mldsa-native.
INTERNAL_MACRO_PATTERN = re.compile(
"^([A-Z][0-9A-Z_]*[A-Z0-9]|tf_psa_crypto_pqcp_mldsa[a-zA-Z0-9_]*[a-zA-Z0-9])$"
)
CONSTANTS_PATTERN = PUBLIC_MACRO_PATTERN
IDENTIFIER_PATTERN = re.compile(r"^(mbedtls|psa|tf_psa_crypto)_[0-9a-z_]*[0-9a-z]$")

Expand Down