Skip to content

Commit 42a5a9d

Browse files
authored
docs: release notes and install pins for commit-check 2.17.0 (#34)
1 parent c701e72 commit 42a5a9d

6 files changed

Lines changed: 111 additions & 8 deletions

File tree

‎docs/changelog.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ below and to the page that documents the feature properly.
1111

1212
| Version | What changed | Documented in |
1313
|---|---|---|
14+
| [2.17.0](#v2170) | Concrete corrections for mechanical slips; a `warn` level per rule | [Reading the JSON](example.md#reading-the-json) · [Report without enforcing](configuration.md#report-a-rule-without-enforcing-it) |
1415
| [2.16.0](#v2160) | Tag name validation, and file size, path and pattern policies | [CC401](rules.md#cc401) · [CC302–CC304](rules.md#push-rules) |
1516
| [2.15.1](#v2151) | Color and rule-ID links appear only where they render; `NO_COLOR` honoured | [Color and links](example.md#color-and-links) |
1617
| [2.15.0](#v2150) | `--rev` names the commit under test; skipped checks are named on stderr | [Command-line recipes](example.md#checking-a-range-of-commits) |
@@ -27,6 +28,49 @@ below and to the page that documents the feature properly.
2728
| [2.5.0](#v250) | Organization-wide config with `inherit_from` | [Across an organization](guides/organization.md) |
2829
| [2.0.0](#v200) | Configuration moved from YAML to TOML — breaking | [Migrating from v1](migration.md) |
2930

31+
## v2.17.0 (2026-09-06) { #v2170 }
32+
33+
### Added
34+
35+
* **A failed check names its correction when there is exactly one** — a type
36+
written `Fix` where `fix` is allowed, a letter out of place (`feta`), a
37+
missing colon after a recognised type, a `WIP:` marker, a missing
38+
`Signed-off-by` trailer, a branch typed `Feature/x`, an AI attribution line
39+
under `ai_attribution = "forbid"`: the suggestion now says what to use
40+
(`Use "fix: add x"`) instead of restating the rule, and `--format json` and
41+
the Python API carry the corrected value in a new `fix` field. `fix` stays
42+
empty whenever the correction takes a judgment — a subject with no type, one
43+
over the length limit, a verb that is not imperative — so a tool can apply a
44+
non-empty `fix` as it stands. The pre-commit hook, the Action and the App
45+
show the better suggestion with no change on their side; the MCP server
46+
passes `fix` through to agents.
47+
See PR [#564](https://github.com/commit-check/commit-check/pull/564) and
48+
[Reading the JSON](example.md#reading-the-json).
49+
50+
* **A rule can be reported without being enforced** — a top-level
51+
`warn = ["branch", "CC003"]` runs the named rules, prints their findings in
52+
full, and never fails the run. A warned rule prints `warning` in place of
53+
`failed`, no rejection banner, and one closing line saying the run is not
54+
failed by it; `--compact` prints one `[WARN]` line. The exit code counts
55+
only enforced rules. In `--format json` the check's `status` is `warn`, the
56+
top-level `status` stays `pass`, and a `warnings` count is added. A name
57+
that matches no rule is a configuration error, so a typo cannot leave a rule
58+
silently enforced. This is how a team adopts a rule gradually: turn it on
59+
as a warning, watch what it catches, drop it from `warn` when the history
60+
is clean.
61+
See PR [#565](https://github.com/commit-check/commit-check/pull/565) and
62+
[Report a rule without enforcing it](configuration.md#report-a-rule-without-enforcing-it).
63+
64+
### Fixed
65+
66+
* **CC002 reads a plain subject from its first word** — the capitalisation
67+
check treated any first word as a Conventional Commits type, so
68+
`Add feature` failed on the `f` of `feature`, `Update` alone failed, and
69+
`add Feature` passed. Only a prefix that ends in a colon is a type now:
70+
the first two pass, the third fails. See PR
71+
[#564](https://github.com/commit-check/commit-check/pull/564) and
72+
[CC002](rules.md#cc002).
73+
3074
## v2.16.0 (2026-08-31) { #v2160 }
3175

3276
### Added

‎docs/configuration.md‎

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,51 @@ the head branch.
130130
pre-commit hook and the Action, which have no pull request to read. The
131131
setting is read by the App only.
132132

133+
## Report a rule without enforcing it
134+
135+
A rule is normally on or off. `warn` gives it a third setting: run, report the
136+
finding in full, and never fail the run. It is a top-level key, so it goes
137+
before the first section, and it names a check or its rule ID in any case:
138+
139+
```toml title="cchk.toml"
140+
warn = ["branch", "CC003"]
141+
142+
[commit]
143+
subject_imperative = true
144+
145+
[branch]
146+
conventional_branch = true
147+
```
148+
149+
A warned rule prints the same block as a failure with `warning` in place of
150+
`failed`, no rejection banner, and one closing line saying the run is not
151+
failed by it; with `--compact` it is one `[WARN]` line. A one-line notice on
152+
stderr names the warned rules, so a hook that exits `0` after red-looking
153+
output is not mistaken for a broken hook. The exit code counts only enforced
154+
rules. In `--format json` the check's `status` is `warn`, the top-level
155+
`status` stays `pass` unless an enforced rule failed, and `warnings` counts
156+
them — see [Reading the JSON](example.md#reading-the-json).
157+
158+
A name that matches no rule is a configuration error that lists the known
159+
rules, so a typo cannot leave a rule silently enforced. Rules not listed
160+
behave as before.
161+
162+
This is how a team adopts a rule gradually: turn it on as a warning, watch
163+
what it catches for a week, then drop it from `warn` once the history is
164+
clean. It is also how a [shared config](guides/organization.md) carries both
165+
kinds of rule at once — the ones every repository must satisfy, and the ones
166+
it is asking teams to move towards. A repository's own `warn` list replaces
167+
the shared one, as any inherited key does.
168+
133169
## A worked example
134170

135171
Every line below that differs from the built-in default is marked, so it is
136172
clear what this file is actually changing:
137173

138174
```toml title="cchk.toml"
175+
# changed: report the branch rule without enforcing it (nothing is warned by default)
176+
warn = ["branch"]
177+
139178
[commit]
140179
# https://www.conventionalcommits.org
141180
conventional_commits = true
@@ -201,7 +240,7 @@ Used from a hook definition, with no config file anywhere in the repository:
201240
```yaml title=".pre-commit-config.yaml"
202241
repos:
203242
- repo: https://github.com/commit-check/commit-check
204-
rev: v2.16.0
243+
rev: v2.17.0
205244
hooks:
206245
- id: check-message
207246
args:

‎docs/example.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pushed:
131131
```yaml title=".pre-commit-config.yaml"
132132
repos:
133133
- repo: https://github.com/commit-check/commit-check
134-
rev: v2.16.0
134+
rev: v2.17.0
135135
hooks:
136136
- id: check-no-force-push
137137
stages: [pre-push]
@@ -303,3 +303,17 @@ $ echo "Fix: add streaming support" | commit-check -m --format json | jq '.check
303303
type at all, one over the length limit, a verb that is not imperative — and
304304
`suggest` then keeps the rule's general advice. A tool can apply a non-empty
305305
`fix` as it stands; a person only ever needs `suggest`.
306+
307+
A rule listed under [`warn`](configuration.md#report-a-rule-without-enforcing-it)
308+
reports with `"status": "warn"` instead of `"fail"`. The top-level `status` is
309+
`fail` only when an enforced rule failed, and a top-level `warnings` counts
310+
the warned checks, so a tool that tests `status == "fail"` is unaffected and
311+
one that wants the warnings knows where to look:
312+
313+
```console
314+
$ commit-check -m -b --format json | jq '{status, warnings}'
315+
{
316+
"status": "pass",
317+
"warnings": 1
318+
}
319+
```

‎docs/guides/organization.md‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,15 @@ inherit_from = "github:my-org/.github@v1:cchk.toml"
107107
Turning on a strict policy across an organization at once produces a wall of
108108
red. A gentler sequence:
109109

110-
1. Ship the org config with [`dry-run`](github-actions.md#reporting-without-failing) enabled in
111-
CI, so violations are reported but nothing blocks.
110+
1. Ship the org config with the new rules listed under
111+
[`warn`](../configuration.md#report-a-rule-without-enforcing-it), so
112+
violations are reported in every hook, Action run and App check, and
113+
nothing blocks. (The Action's
114+
[`dry-run`](github-actions.md#reporting-without-failing) does the same
115+
for every rule at once, in the Action only.)
112116
2. Look at what actually fails. Some rules will turn out to be wrong for some
113117
teams — that is information, not an obstacle.
114-
3. Turn off `dry-run` for repositories whose history is already clean.
118+
3. Drop a rule from `warn` once the repositories are clean. A repository that
119+
is already clean can drop it early with a `warn` list of its own, which
120+
replaces the shared one.
115121
4. Tighten the shared config over time.

‎docs/guides/pre-commit.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Add Commit Check to `.pre-commit-config.yaml`:
88
```yaml title=".pre-commit-config.yaml"
99
repos:
1010
- repo: https://github.com/commit-check/commit-check
11-
rev: v2.16.0
11+
rev: v2.17.0
1212
hooks:
1313
- id: check-message
1414
- id: check-branch
@@ -55,7 +55,7 @@ Options can be passed as hook arguments, which keeps everything in one file:
5555
```yaml title=".pre-commit-config.yaml"
5656
repos:
5757
- repo: https://github.com/commit-check/commit-check
58-
rev: v2.16.0
58+
rev: v2.17.0
5959
hooks:
6060
- id: check-message
6161
args:

‎docs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ whatever your AI agent is committing on your behalf.
3636
```yaml title=".pre-commit-config.yaml"
3737
repos:
3838
- repo: https://github.com/commit-check/commit-check
39-
rev: v2.16.0
39+
rev: v2.17.0
4040
hooks:
4141
- id: check-message
4242
- id: check-branch

0 commit comments

Comments
 (0)