mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-06-26 14:12:15 +08:00
Use Regex for Copyright Year in Header Check (#1002)
This commit is contained in:
6
.github/scripts/kernel_checker.py
vendored
6
.github/scripts/kernel_checker.py
vendored
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
#/*
|
#/*
|
||||||
# * FreeRTOS Kernel <DEVELOPMENT BRANCH>
|
# * FreeRTOS Kernel <DEVELOPMENT BRANCH>
|
||||||
# * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
# * Copyright (C) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
# *
|
# *
|
||||||
# * SPDX-License-Identifier: MIT
|
# * SPDX-License-Identifier: MIT
|
||||||
# *
|
# *
|
||||||
@ -135,12 +135,16 @@ KERNEL_HEADER = [
|
|||||||
' */\n',
|
' */\n',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
FREERTOS_COPYRIGHT_REGEX = r"^(;|#)?( *(\/\*|\*|#|\/\/))? Copyright \(C\) 20\d\d Amazon.com, Inc. or its affiliates. All Rights Reserved\.( \*\/)?$"
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = HeaderChecker.configArgParser()
|
parser = HeaderChecker.configArgParser()
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Configure the checks then run
|
# Configure the checks then run
|
||||||
checker = HeaderChecker(KERNEL_HEADER,
|
checker = HeaderChecker(KERNEL_HEADER,
|
||||||
|
copyright_regex=FREERTOS_COPYRIGHT_REGEX,
|
||||||
ignored_files=KERNEL_IGNORED_FILES,
|
ignored_files=KERNEL_IGNORED_FILES,
|
||||||
ignored_ext=KERNEL_IGNORED_EXTENSIONS,
|
ignored_ext=KERNEL_IGNORED_EXTENSIONS,
|
||||||
ignored_patterns=KERNEL_IGNORED_PATTERNS,
|
ignored_patterns=KERNEL_IGNORED_PATTERNS,
|
||||||
|
Reference in New Issue
Block a user