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-release.git


The following commit(s) were added to refs/heads/main by this push:
     new 7cb6908  Exclude some automatically generated files from license checks
7cb6908 is described below

commit 7cb6908a1e329fbc99e168d7a47daf87ffee3207
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Sep 15 16:17:04 2025 +0100

    Exclude some automatically generated files from license checks
---
 atr/tasks/checks/license.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/atr/tasks/checks/license.py b/atr/tasks/checks/license.py
index 911aea1..fdaf93a 100644
--- a/atr/tasks/checks/license.py
+++ b/atr/tasks/checks/license.py
@@ -175,6 +175,14 @@ async def headers(args: checks.FunctionArguments) -> 
results.Results | None:
 
 def headers_validate(content: bytes, _filename: str) -> tuple[bool, str | 
None]:
     """Validate that the content contains the Apache License header."""
+    generated_by_patterns = [
+        b"Generated By:JJTree",
+        b"Generated By:JavaCC",
+    ]
+    for pattern in generated_by_patterns:
+        if pattern in content:
+            return True, None
+
     r_span = re.compile(rb"Licensed to the.*?under the License", re.MULTILINE)
     r_words = re.compile(rb"[A-Za-z0-9]+")
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to