mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 00:37:44 -04:00
ci: core_checker: Match copyright line with regex
Allow for a variety of copyright dates by matching copyright statements with a regex.
This commit is contained in:
parent
8f21b61908
commit
0048a568c9
2 changed files with 12 additions and 2 deletions
4
.github/scripts/core_checker.py
vendored
4
.github/scripts/core_checker.py
vendored
|
@ -320,12 +320,14 @@ FREERTOS_HEADER = [
|
|||
' */\n',
|
||||
]
|
||||
|
||||
FREERTOS_COPYRIGHT_REGEX = r"^( *(\/\*|\*|#|\/\/))? Copyright \(C\) 20\d\d Amazon.com, Inc. or its affiliates. All Rights Reserved\.( \*\/)?$"
|
||||
|
||||
def main():
|
||||
parser = HeaderChecker.configArgParser()
|
||||
args = parser.parse_args()
|
||||
|
||||
# Configure the checks then run
|
||||
checker = HeaderChecker(FREERTOS_HEADER)
|
||||
checker = HeaderChecker(FREERTOS_HEADER, copyright_regex=FREERTOS_COPYRIGHT_REGEX)
|
||||
checker.ignoreExtension(*FREERTOS_IGNORED_EXTENSIONS)
|
||||
checker.ignorePattern(*FREERTOS_IGNORED_PATTERNS)
|
||||
checker.ignoreFile(*FREERTOS_IGNORED_FILES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue