summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bartell <pbartell@amazon.com>2022-08-18 11:24:11 -0700
committerGitHub <noreply@github.com>2022-08-18 23:54:11 +0530
commit3693b3e8c9c2e122977e509f45a7174fbac6a767 (patch)
tree78c40bcebcbbf5744a1f38b34c291729b735b963
parent2808e48079e9a1434ec32bf90f15f3435c0a0a28 (diff)
downloadfreertos-git-3693b3e8c9c2e122977e509f45a7174fbac6a767.tar.gz
Fix header checker when copyright regex is None (#843)
Allow header_checker.py to work as it did before when no copyright regex is defined.
-rwxr-xr-x.github/scripts/common/header_checker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/.github/scripts/common/header_checker.py b/.github/scripts/common/header_checker.py
index e84ffed91..26942ab17 100755
--- a/.github/scripts/common/header_checker.py
+++ b/.github/scripts/common/header_checker.py
@@ -72,7 +72,10 @@ class HeaderChecker:
self.padding = padding
self.header = header
- self.copyright_regex = re.compile(copyright_regex)
+ if copyright_regex:
+ self.copyright_regex = re.compile(copyright_regex)
+ else:
+ self.copyright_regex = None
# Construct mutated header for assembly files
self.asm_header = [";" + line for line in header]