diff --git a/README.md b/README.md index 1908df36..33705fdc 100644 --- a/README.md +++ b/README.md @@ -247,7 +247,7 @@ Git. This uses [pre-commit](https://pre-commit.com/). Once you ```yaml repos: - repo: https://github.com/fsfe/reuse-tool - rev: v3.0.2 + rev: v4.0.3 hooks: - id: reuse ``` @@ -256,6 +256,17 @@ Then run `pre-commit install`. Now, every time you commit, `reuse lint` is run in the background, and will prevent your commit from going through if there was an error. +If you instead want to only lint files that were changed in your commit, you can +use the following configuration: + +```yaml +repos: + - repo: https://github.com/fsfe/reuse-tool + rev: v4.0.3 + hooks: + - id: reuse-lint-file +``` + ## Maintainers - Carmen Bianca Bakker diff --git a/pyproject.toml b/pyproject.toml index 02c3df14..9d462379 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,6 +118,7 @@ push = false "pyproject.toml" = [ '^version = "{pep440_version}"$', '^current_version = "{version}"$', + '^rev: {version}$', ] "src/reuse/__init__.py" = [ '__version__ = "{pep440_version}"$',