Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ commit-check --message --branch
```yaml
repos:
- repo: https://github.com/commit-check/commit-check
rev: v2.15.1
rev: v2.16.0
Comment thread
coderabbitai[bot] marked this conversation as resolved.
hooks:
- id: check-message
- id: check-branch
Expand Down Expand Up @@ -195,7 +195,7 @@ commit-check --message
# In pre-commit hooks (.pre-commit-config.yaml)
repos:
- repo: https://github.com/commit-check/commit-check
rev: v2.15.1
rev: v2.16.0
hooks:
- id: check-message
args:
Expand Down Expand Up @@ -225,7 +225,7 @@ commit-check --no-force-push
# In pre-commit hooks (.pre-commit-config.yaml)
repos:
- repo: https://github.com/commit-check/commit-check
rev: v2.15.1
rev: v2.16.0
hooks:
- id: check-no-force-push
stages: [pre-push]
Expand Down Expand Up @@ -257,16 +257,12 @@ commit-check --tag --tag-regex '^v\d+\.\d+\.\d+$'
# a push carries, from the pre-push ref metadata on stdin
repos:
- repo: https://github.com/commit-check/commit-check
rev: v2.15.1
rev: v2.16.0
hooks:
- id: check-tag
stages: [pre-push]
```

> [!NOTE]
> The `check-tag` hook ships in the first release after v2.15.1 — bump `rev`
> to that release once it is published.

### Check Committed Files

Use `--files` to police metadata about the files a commit touches — never
Expand Down Expand Up @@ -301,16 +297,12 @@ commit-check --files --rev abc1234
# (a tag on already-pushed history adds nothing, so it is skipped)
repos:
- repo: https://github.com/commit-check/commit-check
rev: v2.15.1
rev: v2.16.0
hooks:
- id: check-files
stages: [pre-push]
```

> [!NOTE]
> Like `check-tag`, the `check-files` hook ships in the first release after
> v2.15.1 — bump `rev` to that release once it is published.

A commit that only deletes files is reported as skipped — removing a file
adds nothing to police. Content scanning (entropy, token detection) is
deliberately out of scope: pair these checks with a scanner like gitleaks
Expand Down