aboutsummaryrefslogtreecommitdiff
path: root/tools/lint_project.py
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-10-28 11:45:11 +0100
committercirakg <cirakg@cirakg.xyz>2026-10-28 11:45:11 +0100
commit09ef21af399a60ceb2e45526fe1a7dd94c53819c (patch)
tree7992abb501f75dfe393b2bfd424227d1fc06b5b6 /tools/lint_project.py
parent3096eb7d366683caec24ed5d0a70ac5dae6f624d (diff)
chore: prepare repository for open-source release
Diffstat (limited to 'tools/lint_project.py')
-rw-r--r--tools/lint_project.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/lint_project.py b/tools/lint_project.py
index c1c225a..3fe7717 100644
--- a/tools/lint_project.py
+++ b/tools/lint_project.py
@@ -55,6 +55,8 @@ SKIP_DIRS = {
}
# Written by a tool that would drop a hand-added header on the next run.
GENERATED = {Path("docker/docs/package-lock.json")}
+# License texts must retain their upstream wording without project headers.
+VERBATIM_LICENSES = {Path("LICENSE"), Path("LICENSES/segno.txt"), Path("LICENSES/pdf417gen.txt")}
BASE32_SECRET_RE = re.compile(r'"[^"\n]*[A-Z2-7]{16,}[^"\n]*"')
HEX_SECRET_RE = re.compile(r'"[^"\n]*[0-9a-fA-F]{32,}[^"\n]*"')
@@ -141,7 +143,7 @@ def project_files(root: Path) -> list[Path]:
def check_header(path: Path, rel: Path) -> Iterable[Problem]:
"""HDR001 for one file, by file type."""
- if rel in GENERATED:
+ if rel in GENERATED or rel in VERBATIM_LICENSES:
return
suffix = path.suffix.lower()
if suffix == ".png":