Repository navigation
Releases: frgfm/lint-my-headers
Release list
v0.7.0: Header checks for nine languages
Version 0.7.0 brings multilingual header checks to the published PyPI package.
What changed
- Check Python, JavaScript, TypeScript, Rust, Go, Swift, Bash, C, and C++ files.
- Read project policy from
.lmh.toml,pyproject.toml,Cargo.toml, orpackage.json. - Run faster checks on large projects.
- Reject blank custom license notices and report incomplete notice lines.
- Update installation and integration examples.
Install or update
uv tool install --force lint-my-headers==0.7.0Or use pip:
python -m pip install --upgrade lint-my-headers==0.7.0Python 3.11+ is required for installation through PyPI. Native wheels include the CLI.
Upgrade notes
Python remains the default language. Select other languages in your project policy.
check stays read-only. fix still changes only recognized stale copyright years. Missing headers need manual insertion.
Update the GitHub Action to frgfm/lint-my-headers@v0.7.0.
For an immutable pin, use commit 212e4f9d0b863ea869c41ae315b5c6cc5cf6ad2e.
Changelog
New Features 🚀
- feat: support JavaScript and TypeScript headers by @frgfm in #92
- feat: support Rust source headers by @frgfm in #94
- feat: support Go source headers by @frgfm in #95
- feat: support Swift source headers by @frgfm in #96
- feat: support Bash and shell source headers by @frgfm in #100
- feat: support C and C++ source headers by @frgfm in #101
Improvements
- ci: document annual copyright PR automation by @frgfm in #93
- ci: scope workflows to relevant changes by @frgfm in #99
- ci(deps): bump PyO3/maturin-action from 423a6347767a8b16e65c2a7a7042e4a921528da8 to e83996d129638aa358a18fbd1dfb82f0b0fb5d3b in the actions group by @dependabot[bot] in #90
Full Changelog: v0.6.0...v0.7.0
Benchmark snapshot (PR #103)
Recorded native benchmarks from PR #103. Data and environment are in the attached files. This is a benchmark snapshot, not a software release.
Lint My Headers 0.6.0
Lint My Headers 0.6.0 is the stable release of the renamed, native Rust CLI. It checks Python copyright/license headers and conservatively refreshes recognized stale years.
Install
uv tool install --only-binary lint-my-headers 'lint-my-headers==0.6.0'
lmh --version
lmh check --output-format jsonPython 3.11+ is required for PyPI installation. Eight native wheels cover Linux (glibc 2.28+ and musl 1.2+), macOS, and Windows on x86-64 and ARM64. Source builds require Rust 1.93.
GitHub Action
Declare [tool.lint-my-headers] in your project's pyproject.toml with its exact owner, starting year, and license or custom notice. Use the immutable release commit:
- uses: frgfm/lint-my-headers@b2cbf9115943aa4b1407c3c944cc7c51250e7673 # v0.6.0The Action defaults to read-only checks and the exact published version. Wheels are required; missing releases or unsupported wheel platforms fail without an implicit source build.
pre-commit and prek
repos:
- repo: local
hooks:
- id: lmh
name: Lint My Headers
entry: lmh check
language: python
types: [python]
additional_dependencies:
- --only-binary=lint-my-headers
- lint-my-headers==0.6.0Changes and migration
- Native
lmhandlint-my-headersexecutables, with optional Python launchers. - JSON schema version 1, stable LMH diagnostic codes, and exit codes 0 clean / 1 findings / 2 invocation, configuration, or I/O failure.
- Read-only
check;fixupdates recognized stale years only and refuses ambiguous, linked, or concurrently changed targets. - Python preamble and supported-encoding preservation, and SPDX v3.28.0 data with legacy notice compatibility.
This is an intentional breaking rename. GitHub does not redirect old Action references. Change frgfm/validate-python-headers to frgfm/lint-my-headers, [tool.validate-python-headers] to [tool.lint-my-headers], and old commands/imports to lmh, lint-my-headers, and lint_my_headers.
This release supports Python source files. It does not choose ownership or licensing, insert missing headers, or establish legal compliance.
The RC passed live artifact hash verification, clean installation smokes, and the published CLI/remote Action/pre-commit/prek checks on Linux, macOS, and Windows with Python 3.11 and 3.14. Runtime code is unchanged from that RC.
Lint My Headers 0.6.0rc1
Lint My Headers 0.6.0rc1 is the first release candidate of the renamed, native Rust CLI. This prerelease is intended for validation before 0.6.0.
Install and check
uv tool install --only-binary lint-my-headers 'lint-my-headers==0.6.0rc1'
lmh --version
lmh check --output-format jsonConfigure [tool.lint-my-headers] in pyproject.toml with your exact owner, starting year, and license or custom notice. Python 3.11+ is required for PyPI installation; native wheels are built for Linux, macOS, and Windows on x86-64 and ARM64. Source builds require Rust 1.93.
Changes
- Rust implementation with native
lmhandlint-my-headersexecutables and optional Python launchers. - JSON schema version 1, stable LMH diagnostic codes, and exit codes 0 clean / 1 findings / 2 invocation, configuration, or I/O failure.
- Read-only
check; conservativefixupdates recognized stale years only and refuses ambiguous, linked, or concurrently changed targets. - Python preamble and supported-encoding preservation, and SPDX v3.28.0 data with legacy notice compatibility.
- Exact-version, wheel-only Action and pre-commit/prek integrations.
Required migration
This is an intentional breaking rename. GitHub does not redirect old Action references. Change frgfm/validate-python-headers to frgfm/lint-my-headers, [tool.validate-python-headers] to [tool.lint-my-headers], and old commands/imports to lmh, lint-my-headers, and lint_my_headers.
For this RC, pin the Action to its immutable release commit and set version: '0.6.0rc1'. The RC commit is 9665cb9607eefd4cba2de1ae43963f905c60fdd1.
This release supports Python source files. It does not choose ownership or licensing, insert missing headers, or establish legal compliance.
v0.5.1
This patch release removes unnecessary dependencies from the image which speeds up workflow initialization, and reduce memory footprint.
What's Changed
Improvements
- build(deps-dev): bump ruff from 0.5.5 to 0.5.6 by @dependabot in #29
- build(deps-dev): switched from poetry to uv by @frgfm in #46
- build(deps): bump actions/labeler from 4 to 5 by @dependabot in #47
- ci(push): fix GHCR docker push by @frgfm in #49
- build(deps): remove unnecessary deps by @frgfm in #50
New Contributors
- @dependabot made their first contribution in #23
Full Changelog: v0.5.0...v0.5.1
v0.5.0
This minor release improves the remediation message and speeds up the action.
Highlights
Better remediation 🔈
When any header was invalid, we were showing you one of the accepted headers. Let's say you created a file in 2020, your organization is named Pyronear and you picked the Apache 2 license. Now we're in 2024, you would have received this message:
Your header should look like:
# Copyright (C) 2023-2024, Pyronear.
# This program is licensed under the Apache License 2.0.
this is not correctly updated to:
Your header should look like:
# Copyright (C) <FILE_CREATION_YEAR>-2024, Pyronear.
# This program is licensed under the Apache License 2.0.
Python 3.11 ⚡
We upgrade the python version from 3.8 to 3.11 for the action's docker which should save you some CI minutes!
What's Changed
New Features 🚀
Improvements
- fix(src): update the suggestion when headers are invalid by @frgfm in #20
- perf(docker): bump python from 3.8 to 3.11 by @frgfm in #21
- docs(readme): update the message example by @frgfm in #22
Full Changelog: v0.4...v0.5.0
v0.4: Adds a new option for custom license notice
This minor release adds the possibility to have a custom license notice.
Highlights
Custom license notice 🤫
When developing software, you might sometimes not be able to share your work in open source. This is understandable and implies that you have a custom license notice. This release allows you to do so:
uses: frgfm/validate-python-headers@main
with:
owner: 'François-Guillaume Fernandez'
starting-year: 2022
license-notice: '.github/license-notice.txt'
ignore-folders: '.github/'
Enjoy!
What's Changed
New Features 🚀
Improvements
Full Changelog: v0.3...v0.4
v0.3: Adds a new option to ignore folders
This minor release adds the possibility to ignore folders & renames a previous option.
Highlights
Folder ignoring 🙈
Until now you could ignore files, but let's be honest: most tools allow you to ignore folders. While patterns are not supported yet, one feature was added to ignore entire folders:
uses: frgfm/validate-python-headers@main
with:
license: 'Apache-2.0'
owner: 'François-Guillaume Fernandez'
starting-year: 2022
ignore-folders: '.github/'
Enjoy!
Tighter cleaning 🧹
In order to improve the quality of the project, the following tools were added:
Additionally, precommit hooks were added to minimize the forth-and-forth with the CI and have clean commits upfront 😄
Breaking changes
Renamed parameter
The ignores option was renamed into ignore-files to have a more explicit naming and better align with new features. The following action:
uses: frgfm/validate-python-headers@main
with:
license: 'Apache-2.0'
owner: 'François-Guillaume Fernandez'
starting-year: 2022
ignores: '__init__.py,version.py'
now needs to be modified as follows if you use the latest version:
uses: frgfm/validate-python-headers@main
with:
license: 'Apache-2.0'
owner: 'François-Guillaume Fernandez'
starting-year: 2022
ignore-files: '__init__.py,version.py'
What's Changed
Breaking Changes 🛠
New Features 🚀
Bug Fixes 🐛
Improvements
Full Changelog: v0.2...v0.3
v0.2: Added support for all SPDX licenses
This minor release fixes the Docker orchestration of the action and adds support for all SPDX-referenced licenses.
Highlights
Broad support of licenses 📖
Instead of manually adding the reference for all licenses, this release adds support for all SPDX-referenced licenses using their identifier. This should help for various projects with their own license requirements.
Minimal effort, insightful report 🤓
The action was designed to have minimal input from the user, as shown below:
uses: frgfm/validate-python-headers@main
with:
license: 'Apache-2.0'
owner: 'François-Guillaume Fernandez'
starting-year: 2022
ignores: 'version.py,__init__.py'
Using this in your workflow will allow you to have a wary assistant for your headers 🙌
What's Changed
New Features 🚀
Bug Fixes 🐛
- docs: Updated README by @frgfm in #2
- fix: Fixed the Dockerfile and updated README by @frgfm in #3
- fix: Fixed entrypoint by @frgfm in #4
- fix: Fixed Dockerfile orchestration by @frgfm in #5
- fix: Fixed entrypoint of the action Docker by @frgfm in #6
- fix: Fixed validation script path by @frgfm in #7
- fix: Fixed workdir access to the script by @frgfm in #8
Improvements
Full Changelog: v0.1...v0.2
v0.1: Header validator for your Python files
This minor release provides a light GitHub action to check your Python headers for copyright and license notices.
Highlights
License check ✔️
Using the license identifier, the action will automatically fetch the full license name and its URL so that your headers include all necessary mentions for your project to be correctly licensed.
Dynamic copyright year ⏳
Complex projects have parts that have been designed years apart. This means that your code may have different starting copyright years and needs to be incorporated as such in the header. You only have to specific the starting year of your project, the action will take care of the rest 👍
What's Changed
New Features 🚀
New Contributors
Full Changelog: https://github.com/frgfm/validate-python-headers/commits/v0.1.0