check_copyright_config.yaml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. # This file configures the check_copyright pre-commit hook
  2. #
  3. # Values from the DEFAULT section are used, when the particular option is not set in a section.
  4. # The DEFAULT section also contains all options with description
  5. #
  6. # Section name is just an identifier, keep it unique.
  7. # Section must contain the option 'include' and at least one other option
  8. #
  9. # The sections are matched in the order they are in this config file, the last section which matches is used.
  10. # This means that the order of the sections should be from broad to specific.
  11. # For example:
  12. # sections:
  13. # tools/
  14. # tools/ci/file.c
  15. # tools/ci/
  16. # files:
  17. # tools/file.c -> section tools/
  18. # tools/ci/file.c -> section tools/ci/
  19. #
  20. # don't modify this section!
  21. DEFAULT:
  22. perform_check: yes # should the check be performed?
  23. # Sections setting this to 'no' don't need to include any other options as they are ignored
  24. # When a file is using a section with the option set to 'no', no checks are performed.
  25. # what licenses (or license expressions) are allowed for files in this section
  26. # when setting this option in a section, you need to list all the allowed licenses
  27. allowed_licenses:
  28. - Apache-2.0
  29. license_for_new_files: Apache-2.0 # license to be used when inserting a new copyright notice
  30. new_notice_c: | # notice for new C, CPP, H, HPP and LD files
  31. /*
  32. * SPDX-FileCopyrightText: {years} Espressif Systems (Shanghai) CO LTD
  33. *
  34. * SPDX-License-Identifier: {license}
  35. */
  36. new_notice_python: | # notice for new python files
  37. # SPDX-FileCopyrightText: {years} Espressif Systems (Shanghai) CO LTD
  38. # SPDX-License-Identifier: {license}
  39. # comment lines matching:
  40. # SPDX-FileCopyrightText: year[-year] Espressif Systems
  41. # or
  42. # SPDX-FileContributor: year[-year] Espressif Systems
  43. # are replaced with this template prefixed with the correct comment notation (# or // or *) and SPDX- notation
  44. espressif_copyright: '{years} Espressif Systems (Shanghai) CO LTD'
  45. # this section sets the default license for examples and unit tests of components
  46. examples_and_unit_tests:
  47. include:
  48. - 'examples/'
  49. - 'components/**/test/**'
  50. - 'components/**/test_apps/**'
  51. - 'tools/test_apps/**'
  52. - '**/pytest_*.py'
  53. allowed_licenses:
  54. - Apache-2.0
  55. - Unlicense
  56. - CC0-1.0
  57. license_for_new_files: Unlicense OR CC0-1.0
  58. lwip_component:
  59. include:
  60. - 'components/lwip/**'
  61. - 'components/esp_netif/lwip/**'
  62. - 'examples/common_components/protocol_examples_tapif_io/lwip'
  63. allowed_licenses:
  64. - Apache-2.0
  65. - BSD-3-Clause
  66. license_for_new_files: Apache-2.0
  67. newlib_component:
  68. include:
  69. - 'components/newlib/platform_include/**'
  70. - 'components/newlib/port/**'
  71. - 'components/newlib/priv_include/**'
  72. - 'components/newlib/*.c'
  73. - 'components/newlib/*.h'
  74. allowed_licenses:
  75. - Apache-2.0
  76. - BSD-2-Clause-FreeBSD AND Apache-2.0
  77. license_for_new_files: Apache-2.0
  78. asio_component:
  79. include:
  80. - 'components/asio/port/**'
  81. allowed_licenses:
  82. - Apache-2.0
  83. - BSL-1.0
  84. freertos_component:
  85. include:
  86. - 'components/freertos/**'
  87. allowed_licenses:
  88. - Apache-2.0 #Files added to the freertos added by us
  89. - MIT #FreeRTOS sources and port files
  90. ethernet_component:
  91. include:
  92. - 'components/esp_eth/include/**'
  93. - 'components/esp_eth/src/**'
  94. allowed_licenses:
  95. - Apache-2.0
  96. - MIT # To allow contributed drivers
  97. systemview:
  98. include:
  99. - 'components/app_trace/sys_view'
  100. allowed_licenses:
  101. - Apache-2.0
  102. - BSD-1-Clause
  103. license_for_new_files: Apache-2.0
  104. spiffs:
  105. include:
  106. - 'components/spiffs/include/'
  107. allowed_licenses:
  108. - MIT
  109. - Apache-2.0
  110. sdmmc:
  111. include:
  112. - 'components/esp_driver_sdmmc/include/driver/'
  113. - 'components/sdmmc/'
  114. allowed_licenses:
  115. - Apache-2.0
  116. - ISC
  117. argtable3:
  118. include:
  119. - 'components/console/argtable3/'
  120. allowed_licenses:
  121. - BSD-3-Clause
  122. - Apache-2.0
  123. md5_hash:
  124. include:
  125. - 'components/esp_rom/include/**/rom/md5_hash.h'
  126. allowed_licenses:
  127. - BSD-3-Clause
  128. - Apache-2.0
  129. xtensa:
  130. include:
  131. - 'components/xtensa/**'
  132. allowed_licenses:
  133. - Apache-2.0 #Files added to the xtensa component by us
  134. - MIT #Cadence sources
  135. tinyusb:
  136. include:
  137. - 'examples/peripherals/usb/device/tusb_midi/'
  138. allowed_licenses:
  139. - Apache-2.0
  140. - MIT # Example derived from TinyUSB code by HaThach
  141. - Unlicense
  142. - CC0-1.0
  143. # Portions of the USB stack in ROM are derived from Zephyr project,
  144. # with files licensed under a mix of Apache and BSD-3-Clause licenses.
  145. esp_rom_usb:
  146. include:
  147. - 'components/esp_rom/include/*/rom/usb/'
  148. allowed_licenses:
  149. - Apache-2.0
  150. - BSD-3-Clause
  151. protocol_examples_common_component:
  152. include:
  153. - 'examples/common_components/protocol_examples_common/'
  154. allowed_licenses:
  155. - Apache-2.0
  156. - BSD-2-Clause # Contains URI encoding/decoding code from nginx
  157. - Unlicense
  158. - CC0-1.0
  159. license_for_new_files: Unlicense OR CC0-1.0
  160. zigbee:
  161. include:
  162. - 'examples/zigbee/'
  163. allowed_licenses:
  164. - Apache-2.0
  165. - LicenseRef-Included
  166. # files matching this section do not perform the check
  167. # file patterns starting with ! are negated, meaning files matching them won't match the section.
  168. ignore:
  169. perform_check: no
  170. include:
  171. - components/bt/host/nimble/nimble/
  172. - components/bt/common/osi/
  173. - components/bt/porting/ext/
  174. - components/bt/porting/nimble/
  175. - components/http_parser/
  176. - components/wpa_supplicant/src/
  177. - '!components/wpa_supplicant/esp_supplicant/'
  178. - components/wpa_supplicant/esp_supplicant/src/crypto/fastpbkdf2*
  179. - components/bt/host/bluedroid/
  180. - '!components/bt/host/bluedroid/api/'
  181. - '!components/bt/host/bluedroid/btc/'
  182. - components/esp_local_ctrl/proto-c/
  183. - components/esp_local_ctrl/python/
  184. - components/protocomm/proto-c/
  185. - components/protocomm/python/
  186. - components/wifi_provisioning/proto-c/
  187. - components/wifi_provisioning/python/