mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Per-line opt-out of typo check: Python port of b683776181
Signed-off-by: Yuto Takano <yuto.takano@arm.com>
This commit is contained in:
@ -173,6 +173,10 @@ class NameCheck(object):
|
|||||||
for filename in files:
|
for filename in files:
|
||||||
with open(filename, "r") as fp:
|
with open(filename, "r") as fp:
|
||||||
for line in fp:
|
for line in fp:
|
||||||
|
# Ignore any names that are deliberately opted-out
|
||||||
|
if re.search(r"// *no-check-names", line):
|
||||||
|
continue
|
||||||
|
|
||||||
for name in re.finditer(r"\bMBED.+?_[A-Z0-9_]*", line):
|
for name in re.finditer(r"\bMBED.+?_[A-Z0-9_]*", line):
|
||||||
MBED_names.append(Match(
|
MBED_names.append(Match(
|
||||||
filename,
|
filename,
|
||||||
|
Reference in New Issue
Block a user