Add support for custom check in header checker (#1285)

This allows derived classes to override customCheck method to inject
additional checks for some files. This is currently needed to accept
ARM copyright in ARMv8-M files - https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/1147.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
pull/1288/head
Gaurav-Aggarwal-AWS 4 months ago committed by GitHub
parent 28a20d5a69
commit 349d8a87d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -216,6 +216,10 @@ class HeaderChecker:
print("PASS") print("PASS")
print("-" * 85) print("-" * 85)
return True return True
elif self.customCheck(path):
print("PASS")
print("-" * 85)
return True
elif self.isThirdPartyFile(path): elif self.isThirdPartyFile(path):
print("FAIL") print("FAIL")
print("-" * 85) print("-" * 85)
@ -435,3 +439,6 @@ class HeaderChecker:
else: else:
error_count += 1 error_count += 1
return error_count == 0 return error_count == 0
def customCheck(self, path):
return False

Loading…
Cancel
Save