aboutsummaryrefslogtreecommitdiff
path: root/tools/lint_project.py
diff options
context:
space:
mode:
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":