mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-16 09:47:44 -04:00
Fix issues in CI check for header files with directories and .gitmodules (#420)
This commit is contained in:
parent
98b8fcd89d
commit
aad429ba09
1 changed files with 7 additions and 1 deletions
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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue