4 from common.header_checker import HeaderChecker
6 #--------------------------------------------------------------------------------------------------
8 #--------------------------------------------------------------------------------------------------
9 KERNEL_IGNORED_FILES = [
13 KERNEL_IGNORED_EXTENSIONS = [
37 KERNEL_IGNORED_PATTERNS = [
39 r'.*portable.*Xtensa_ESP32\/include\/portmacro\.h',
40 r'.*portable.*Xtensa_ESP32.*port\.c',
41 r'.*portable.*Xtensa_ESP32.*portasm\.S',
42 r'.*portable.*Xtensa_ESP32.*xtensa_.*',
43 r'.*portable.*Xtensa_ESP32.*portmux_impl.*',
44 r'.*portable.*Xtensa_ESP32.*xt_asm_utils\.h'
49 ' * FreeRTOS Kernel V10.4.3\n',
50 ' * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n',
52 ' * Permission is hereby granted, free of charge, to any person obtaining a copy of\n',
53 ' * this software and associated documentation files (the "Software"), to deal in\n',
54 ' * the Software without restriction, including without limitation the rights to\n',
55 ' * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n',
56 ' * the Software, and to permit persons to whom the Software is furnished to do so,\n',
57 ' * subject to the following conditions:\n',
59 ' * The above copyright notice and this permission notice shall be included in all\n',
60 ' * copies or substantial portions of the Software.\n',
62 ' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n',
63 ' * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n',
64 ' * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n',
65 ' * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n',
66 ' * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n',
67 ' * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',
69 ' * https://www.FreeRTOS.org\n',
70 ' * https://github.com/FreeRTOS\n',
77 parser = HeaderChecker.configArgParser()
78 args = parser.parse_args()
80 # Configure the checks then run
81 checker = HeaderChecker(KERNEL_HEADER)
82 checker.ignoreExtension(*KERNEL_IGNORED_EXTENSIONS)
83 checker.ignorePattern(*KERNEL_IGNORED_PATTERNS)
84 checker.ignoreFile(*KERNEL_IGNORED_FILES)
85 checker.ignoreFile(os.path.split(__file__)[-1])
87 rc = checker.processArgs(args)
89 checker.showHelp(__file__)
93 if __name__ == '__main__':