This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 5f97f4d Make the NOTICE file checker match a wider range of files
5f97f4d is described below
commit 5f97f4dc0e6fa4113a0cac77fe041c401fa12ee9
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Jan 9 18:08:32 2026 +0000
Make the NOTICE file checker match a wider range of files
---
atr/tasks/checks/license.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/atr/tasks/checks/license.py b/atr/tasks/checks/license.py
index 629e414..fbde365 100644
--- a/atr/tasks/checks/license.py
+++ b/atr/tasks/checks/license.py
@@ -303,13 +303,12 @@ def _files_check_core_logic_notice(archive:
tarzip.Archive, member: tarzip.Membe
preamble = "".join(content.splitlines(keepends=True)[:3])
issues = []
- if not re.search(r"Apache\s+[\w\-\.]+", content, re.MULTILINE):
+ normalised = re.sub(r"\s+", " ", content)
+ if not re.search(r"Apache [\w\-\.]+", normalised):
issues.append("missing or invalid Apache product header")
- if not re.search(r"Copyright\s+(?:\d{4}|\d{4}-\d{4})\s+The Apache Software
Foundation", content, re.MULTILINE):
+ if not re.search(r"Copyright (\d{4}|\d{4}-\d{4}) The Apache Software
Foundation", normalised):
issues.append("missing or invalid copyright statement")
- if not re.search(
- r"This product includes software developed at\s*\nThe Apache Software
Foundation", content, re.DOTALL
- ):
+ if not re.search(r"This product includes software developed at The Apache
Software Foundation", normalised):
issues.append("missing or invalid foundation attribution")
return len(issues) == 0, issues, preamble
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]