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