Lint My Headers¶
Check copyright and license headers across nine languages. Refresh stale years with small, reviewable changes.
For maintainers who already keep headers in their source files. Declare the owner, license, and languages in one policy. Run a read-only check, review the findings, and update eligible stale years.
What it does¶
- Nine languages: Python, JavaScript, TypeScript, Rust, Go, Swift, Bash, C, and C++.
- Read-only checks:
lmh checkreports what needs attention without writing source files. - Limited repairs:
lmh fixupdates one recognized stale year for your configured owner, or inserts a missing header with a declared creation year.
Version 0.8.0
Missing-header insertion, additional header layouts, and the wheel hook join
all nine supported languages. Select languages in your policy; the default
is Python. See the
installation options.
One year, one small diff¶
For a recognized header ending in 2025, lmh check reports LMH004. With source
changes authorized, run lmh fix to refresh the year in 2026:
-# Copyright (C) 2024-2025, Example Organization.
+# Copyright (C) 2024-2026, Example Organization.
The creation year, owner, and every other byte stay intact.
From policy to pull request¶
- Declare your policy. Set the owner, earliest creation year, license notice, and source paths.
- Run a check. Use
lmh checklocally, in CI, or from a coding agent. Review each finding. - Review the diff. Run
lmh fixfor eligible stale years, recheck, and inspect the changes.
Documentation¶
- Compare header tools: compare features, check latency, throughput, memory, disk use, and installation steps.
- Getting started: install the CLI, declare a first policy, and check your existing headers.
- Configuration: configuration files, language selectors, and header layouts.
- Integrations: pre-commit, prek, the GitHub Action, and an annual review workflow.
- Diagnostics & agents: findings, JSON output, and coding-agent repair boundaries.
- Performance: check overhead, full-codebase repair time, memory, and a reproducible HawkEye comparison.
Repair boundaries¶
Existing-header repairs preserve the creation year, body bytes, and file mode. Ambiguous layouts, unsafe links, and concurrently changed targets are refused. Missing headers without a creation year, wrong owners, malformed notices, and future years require manual review.
Ownership and licensing always come from your declared policy. Lint My Headers
does not establish legal, SPDX, or REUSE compliance. Version 0.8.0 can
insert a missing header with a declared creation year.
Both lmh and lint-my-headers expose the same commands, with no language
toolchain or Node.js runtime needed by the installed native CLI.
The project is licensed under Apache-2.0. Report an issue or read the contributor guide.