Skip to content

Commit f36b336

Browse files
committed
docs: document the conventional-commit format for new commits
1 parent 1bceb7f commit f36b336

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,29 @@ Most open work on this crate is hardening against malformed input. If you are ad
183183
A counter that persists makes the API start failing spuriously after enough calls.
184184
- **Charge the budget before any early return**, or an attacker gets the cheap paths free.
185185

186+
## Commit messages
187+
188+
Commits follow [Conventional Commits](https://www.conventionalcommits.org/):
189+
190+
```text
191+
type(scope): subject
192+
193+
Body explaining why, if the subject is not self-evident.
194+
```
195+
196+
- **Types**: `fix`, `feat`, `docs`, `test`, `refactor`, `perf`, `build`, `ci`, `chore`.
197+
Given the crate is in maintenance mode, nearly everything is `fix`, `docs`, `test` or `chore`.
198+
- **Scope** is the table or module the change belongs to, matching how the changelog groups
199+
entries: `fix(cmap):`, `fix(CFF2):`, `fix(gvar):`. Omit it for changes that span the crate.
200+
- **Subject** is imperative mood, no trailing period, first line under 72 characters.
201+
- The body explains *why*, not what — the diff already says what. Reference an issue by number
202+
when one exists.
203+
- A breaking change gets a `!` after the type (`feat(cff)!:`) and a note in the changelog under
204+
`### Changed`.
205+
206+
History before 0.25.1 predates this convention and is not being rewritten, so `git log` mixes
207+
both styles. New commits use the convention.
208+
186209
## Pull requests
187210

188211
- Add a `## [Unreleased]` entry to `CHANGELOG.md`. Contributed changes are credited in the

0 commit comments

Comments
 (0)