conventional-commits (BTPROC003)¶
Added in 0.14.0 · Preview · Off by default (error)
Family: process · Standard: CES-75 · Languages: all
This rule is unstable and in preview. It runs only with preview = true, and only when it is selected.
Directive¶
The subject of each commit message, its first line, is <type>(<scope>)!: <description>: a type of
the option types, a scope in lowercase letters, digits, ., _ and - between parentheses, a
! for a breaking change, : and the description. The scope and the ! are optional. A subject
that starts with an entry of exempt is not checked. An error by default.
The rule reads messages, never files: botica lint --commit-msg <file> in a commit-msg hook,
botica lint --commits <range> in CI, and botica lint --pr-title="$PR_TITLE" for the title of a
pull request, which a squash merge takes as the subject.
Why¶
A history whose subjects say the kind of each change lets a release tool pick the next version and
write the changelog, and lets a reader find the fixes and the breaking changes in git log.
Do¶
Don't¶
Options¶
Suppression¶
A message has no comments that botica reads, so only the configuration silences the rule:
ignore = ["conventional-commits"], or a subject start added to exempt.