P0006 commit-prose¶
Rule: Commit messages use no filler, narration or emoji and do not describe the diff.
| Code | P0006 (stable, never reused) |
| Id | commit-prose |
| Category | commits |
| Source | spirit_level |
| Fix | by hand |
| Needs | git installed |
Level per tier¶
| Tier | Level | Reason |
|---|---|---|
| small | off | |
| small-workspace | off | |
| medium | off | |
| big | off | |
| ai | warn |
commit messages follow the prose rules of the docs |
| embedded | off | |
| ui | off | |
| egui | off | |
| units-strict | off | |
| units-paranoid | off |
Parameters¶
| Name | Type | Default | Meaning |
|---|---|---|---|
base |
string | "main" |
the branch work merges into; commits in base..HEAD are checked |
Why¶
Commit messages are prose read long after the conversation that produced them. They follow the same rules as docs:
- no phrase from
filler-phrasesornarration(their lists are used); - no emoji outside the
allowlist ofemoji; - no subject that describes the diff, as
changelog-describes-diffdefines it.
Updated function parse in lexer.rs as requested 🚀 <- four findings
Lexer: accept raw strings with hashes
How to fix¶
Say what changed and why, as a statement.
Configure¶
[lints.commit-prose]
level = "deny"
base = "main"
reason = "why this project wants it at this level"
Allow one finding in the code with // spirit-level: allow(commit-prose) <reason> (waivers); the code works there too, as in [lints.P0006].