mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-22 08:58:07 +08:00
Fix issues in CI check for header files with directories and .gitmodules (#420)
This commit is contained in:
8
.github/scripts/check-header.py
vendored
8
.github/scripts/check-header.py
vendored
@ -43,6 +43,11 @@ class HeaderChecker:
|
||||
if self.isIgnoredFile(path):
|
||||
return True
|
||||
|
||||
# Skip if entry is a directory.
|
||||
if os.path.isdir(path):
|
||||
print('Skipping valid file check on directory path: %s' % path)
|
||||
return True
|
||||
|
||||
# Don't need entire file. Read sufficienly large chunk of file that should contain the header
|
||||
with open(path, encoding='utf-8', errors='ignore') as file:
|
||||
chunk = file.read(len(''.join(self.header)) + self.padding)
|
||||
@ -164,7 +169,8 @@ def main():
|
||||
checker.ignoreExtension('.vcxproj',
|
||||
'.vcxproj.filters',
|
||||
'.sln'
|
||||
'.md')
|
||||
'.md,'
|
||||
'.gitmodules')
|
||||
|
||||
checker.ignoreFile(os.path.split(__file__)[-1], # Add self
|
||||
'mbedtls_config.h')
|
||||
|
Reference in New Issue
Block a user