Extend basic checks of files to framework files

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2024-04-25 12:24:00 +02:00
parent 72b980062d
commit 1e05debd60

View File

@ -373,7 +373,7 @@ class LicenseIssueTracker(LineIssueTracker):
r'3rdparty/(?!(p256-m)/.*)',
# Documentation explaining the license may have accidental
# false positives.
r'(ChangeLog|LICENSE|[-0-9A-Z_a-z]+\.md)\Z',
r'(ChangeLog|LICENSE|framework\/LICENSE|[-0-9A-Z_a-z]+\.md)\Z',
# Files imported from TF-M, and not used except in test builds,
# may be under a different license.
r'configs/ext/crypto_config_profile_medium\.h\Z',
@ -381,6 +381,7 @@ class LicenseIssueTracker(LineIssueTracker):
r'configs/ext/README\.md\Z',
# Third-party file.
r'dco\.txt\Z',
r'framework\/dco\.txt\Z',
]
path_exemptions = re.compile('|'.join(BINARY_FILE_PATH_RE_LIST +
LICENSE_EXEMPTION_RE_LIST))
@ -486,7 +487,8 @@ class IntegrityChecker:
These are the regular files commited into Git.
"""
bytes_output = subprocess.check_output(['git', 'ls-files', '-z'])
bytes_output = subprocess.check_output(['git', 'ls-files',
'--recurse-submodules', '-z'])
bytes_filepaths = bytes_output.split(b'\0')[:-1]
ascii_filepaths = map(lambda fp: fp.decode('ascii'), bytes_filepaths)
# Filter out directories. Normally Git doesn't list directories