mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Use Regex for Copyright Year in Header Check (#1002)
This commit is contained in:
parent
2fcb0f48b1
commit
839ccb719b
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,
|
||||||
|
|
Loading…
Reference in a new issue