Rules
body-case
condition:
bodyis in casevaluerule:
alwaysvalue
text'lower-case'possible values
js[ "lower-case", // default "upper-case", // UPPERCASE "camel-case", // camelCase "kebab-case", // kebab-case "pascal-case", // PascalCase "sentence-case", // Sentence case "snake-case", // snake_case "start-case", // Start Case ];
body-empty
- condition:
bodyis empty - rule:
never
body-full-stop
condition:
bodyends withvaluerule:
nevervalue
text'.'
body-leading-blank
- condition:
bodybegins with blank line - rule:
always
body-max-length
condition:
bodyhasvalueor less charactersrule:
alwaysvalue
textInfinity
body-max-line-length
condition:
bodylines havevalueor less characters, or contain a URLrule:
alwaysvalue
textInfinity
body-min-length
condition:
bodyhasvalueor more charactersrule:
alwaysvalue
text0
breaking-change-exclamation-mark
- condition: Either both or neither
headerhas an exclamation mark before the:marker and a line infootermatches the regular expression^BREAKING[ -]CHANGE: - rule:
always
NOTE
This rule enforces that breaking changes are marked by both a ! in the header and BREAKING CHANGE in the footer. The behavior is that of an XNOR operation:
- It passes when either both are present or both are not.
- It fails when one is present and the other is not.
footer-empty
- condition:
footeris empty - rule:
never
footer-leading-blank
- condition:
footerbegins with blank line - rule:
always
footer-max-length
condition:
footerhasvalueor less charactersrule:
alwaysvalue
textInfinity
footer-max-line-length
condition:
footerlines havevalueor less charactersrule:
alwaysvalue
textInfinity
footer-min-length
condition:
footerhasvalueor more charactersrule:
alwaysvalue
text0
header-case
condition:
headeris in casevaluerule:
alwaysvalue
text'lower-case'possible values
js[ "lower-case", // default "upper-case", // UPPERCASE "camel-case", // camelCase "kebab-case", // kebab-case "pascal-case", // PascalCase "sentence-case", // Sentence case "snake-case", // snake_case "start-case", // Start Case ];
header-full-stop
condition:
headerends withvaluerule:
nevervalue
text'.'
header-max-length
condition:
headerhasvalueor less charactersrule:
alwaysvalue
text72
header-min-length
condition:
headerhasvalueor more charactersrule:
alwaysvalue
text0
header-trim
- condition:
headermust not have initial or trailing whitespaces - rule:
always
references-empty
- condition:
referenceshas at least one entry - rule:
never
scope-case
condition:
scopeis in casevaluerule:
alwaysvalue
text'lower-case'possible values
js[ "lower-case", // default "upper-case", // UPPERCASE "camel-case", // camelCase "kebab-case", // kebab-case "pascal-case", // PascalCase "sentence-case", // Sentence case "snake-case", // snake_case "start-case", // Start Case ];
scope-empty
- condition:
scopeis empty - rule:
never
scope-enum
condition:
scopeis found in valuerule:
alwaysvalue
text[]
NOTE
- This rule always passes if no scopes are provided in the message or the value > is an empty array.
- When set to
always, all message scopes must be found in the value. - When set to
never, none of the message scopes can be found in the value.
scope-max-length
condition:
scopehasvalueor less charactersrule:
alwaysvalue
textInfinity
scope-min-length
condition:
scopehasvalueor more charactersrule:
alwaysvalue
text0
signed-off-by
condition:
messagehasvaluerule:
alwaysvalue
text'Signed-off-by:'
subject-case
condition:
subjectis in casevaluerule:
alwaysvalue
js["sentence-case", "start-case", "pascal-case", "upper-case"];possible values
js[ "lower-case", // lower case "upper-case", // UPPERCASE "camel-case", // camelCase "kebab-case", // kebab-case "pascal-case", // PascalCase "sentence-case", // Sentence case "snake-case", // snake_case "start-case", // Start Case ];
subject-empty
- condition:
subjectis empty - rule:
never
subject-exclamation-mark
- condition:
subjecthas exclamation before the:marker - rule:
never
subject-full-stop
condition:
subjectends withvaluerule:
nevervalue
text'.'
subject-max-length
condition:
subjecthasvalueor less charactersrule:
alwaysvalue
textInfinity
subject-min-length
condition:
subjecthasvalueor more charactersrule:
alwaysvalue
text0
trailer-exists
condition:
messagehas trailervaluerule:
alwaysvalue
text'Signed-off-by:'
type-case
description:
typeis in casevaluerule:
alwaysvalue
text'lower-case'possible values
js[ "lower-case", // default "upper-case", // UPPERCASE "camel-case", // camelCase "kebab-case", // kebab-case "pascal-case", // PascalCase "sentence-case", // Sentence case "snake-case", // snake_case "start-case", // Start Case ];
type-empty
- condition:
typeis empty - rule:
never
type-enum
condition:
typeis found in valuerule:
alwaysvalue
js[ "build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", ];
type-max-length
condition:
typehasvalueor less charactersrule:
alwaysvalue
textInfinity
type-min-length
condition:
typehasvalueor more charactersrule:
alwaysvalue
text0