Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 32 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ below and to the page that documents the feature properly.

| Version | What changed | Documented in |
|---|---|---|
| [2.14.0](#v2140) | CC003 judges imperative mood by a word's form, not by a list of verbs | [CC003](rules.md#cc003) |
| [2.13.1](#v2131) | JSON output reports the checked value for passing checks | [Output for scripts and CI](example.md#output-for-scripts-and-ci) |
| [2.13.0](#v2130) | Stable rule IDs in terminal output and JSON | [Rules reference](rules.md) |
| [2.12.0](#v2120) | Author name and email patterns became configurable | [CC101](rules.md#cc101) · [CC102](rules.md#cc102) |
Expand All @@ -23,6 +24,37 @@ below and to the page that documents the feature properly.
| [2.5.0](#v250) | Organization-wide config with `inherit_from` | [Integrations](guides/integrations.md#across-an-organization) |
| [2.0.0](#v200) | Configuration moved from YAML to TOML — breaking | [Migrating from v1](migration.md) |

## v2.14.0 (unreleased) { #v2140 }

### Changed

* **CC003 judges the word's form, not its membership in a list** — the rule
used to accept a subject only when its first word appeared in a list of
known imperative verbs, so any verb the list had not heard of was reported
as a mood error. Growing the list never fixed that; each release recognised
a few more verbs and the next contributor found the next gap.

It now works the other way round. A first word is rejected only when it
carries non-imperative morphology — a past tense (`fixed`), a gerund
(`adding`) or a third person singular (`fixes`) — and accepted otherwise.
Measured across 59,140 subjects from `git.git`, a project that writes
strictly imperative subjects, the old list rejected 45.5% of them; the new
rule rejects 0.97%.

Nothing that passed before fails now. Two things that used to fail now pass:

* Subjects led by a correct verb no list contained — `reword the report
format`, `dedupe the helper`, `backfill an absent value`.
* Subjects led by a noun — `parser improvements`. CC003 checks mood, and a
noun phrase has none to get wrong.

The practical consequence is that **`IMPERATIVES` no longer needs additions**.
A verb missing from it can no longer cause a failure, so there is no reason
to send a patch adding the verb you just used.

See PR [#540](https://github.com/commit-check/commit-check/pull/540), which
closes issue [#526](https://github.com/commit-check/commit-check/issues/526).

## v2.13.1 (2026-08-05) { #v2131 }

### New Features
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ the same thing twice, so read the description rather than the cell:
| commit | conventional_commits | bool | true | Enforce Conventional Commits specification. |
| commit | message_pattern | str | "" (no custom pattern) | Custom regex pattern for commit message validation. When set, this pattern replaces the auto-generated Conventional Commits regex entirely, making it possible to enforce custom formats such as JIRA smart commits (e.g., `"^PROJ-\\d+: .+"`). When `message_pattern` is set (non-empty) it takes precedence over `conventional_commits`. |
| commit | subject_capitalized | bool | false | Subject must start with a capital letter. |
| commit | subject_imperative | bool | false | Subject must be in imperative mood. Forms of verbs can be found at [imperatives.py](https://github.com/commit-check/commit-check/blob/main/commit_check/imperatives.py) |
| commit | subject_imperative | bool | false | Subject must be in imperative mood. Judged on the first word's form, so a verb no list contains is still accepted — see [CC003](rules.md#cc003). |
| commit | subject_max_length | int | 80 | Maximum length of the subject line. |
| commit | subject_min_length | int | 5 | Minimum length of the subject line. |
| commit | allow_commit_types | list[str] | ["feat", "fix", "docs", "style", "refactor", "test", "chore", "perf", "build", "ci"] | Allowed commit types when conventional_commits is true. |
Expand Down
16 changes: 13 additions & 3 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,23 @@ Use instead:
fix: handle an empty config file
```

**What it does not do**

The rule reads the *form* of the first word, not a vocabulary, so it does not
need to recognise your verb. Anything that is not a past tense, a gerund or a
third-person singular is accepted — including verbs no word list contains, and
subjects that lead with a noun (`fix: parser improvements`), which have no mood
to get wrong.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

The trade is that a word's form does not always tell you how it is being used.
`fix: spelling in the docs` is reported: `spelling` is a noun there, but it
wears the `-ing` of a gerund, and a rule that reads the ending cannot tell the
two apart.

**Options**

* `commit.subject_imperative` — set to `true` to enable this rule.

The list of recognised non-imperative verb forms lives in
[imperatives.py](https://github.com/commit-check/commit-check/blob/main/commit_check/imperatives.py).

### subject-max-length (CC004) { #cc004 }

**What it does**
Expand Down