From 349d8a87d4cacd3ab8f826d837d66400b8c0934c Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:25:28 +0530 Subject: [PATCH] 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 --- .github/scripts/common/header_checker.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/scripts/common/header_checker.py b/.github/scripts/common/header_checker.py index 57a5c2dcd1..68c1e9f4ee 100755 --- a/.github/scripts/common/header_checker.py +++ b/.github/scripts/common/header_checker.py @@ -216,6 +216,10 @@ class HeaderChecker: print("PASS") print("-" * 85) return True + elif self.customCheck(path): + print("PASS") + print("-" * 85) + return True elif self.isThirdPartyFile(path): print("FAIL") print("-" * 85) @@ -435,3 +439,6 @@ class HeaderChecker: else: error_count += 1 return error_count == 0 + + def customCheck(self, path): + return False