2026-03-26 13:26:32 +01:00
|
|
|
|
// Commitlint config tuned for Linux kernel-style commit messages.
|
|
|
|
|
|
//
|
|
|
|
|
|
// Expected format:
|
|
|
|
|
|
// subsystem: short description (max 72 chars)
|
|
|
|
|
|
// <blank line>
|
2026-07-13 18:07:21 +02:00
|
|
|
|
// Body text wrapped at 75 chars.
|
2026-03-26 13:26:32 +01:00
|
|
|
|
// <blank line>
|
|
|
|
|
|
// Signed-off-by: Name <email>
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
// Subject line limit (Linux kernel style uses up to 72)
|
|
|
|
|
|
'header-max-length': [2, 'always', 72],
|
|
|
|
|
|
|
2026-07-13 18:07:21 +02:00
|
|
|
|
// Body and footer lines wrapped at 75 chars.
|
2026-03-26 13:26:32 +01:00
|
|
|
|
// Footer limit is relaxed to 200 to accommodate long Signed-off-by
|
|
|
|
|
|
// addresses without false positives.
|
2026-07-13 18:07:21 +02:00
|
|
|
|
'body-max-line-length': [2, 'always', 75],
|
2026-03-26 13:26:32 +01:00
|
|
|
|
'footer-max-line-length': [2, 'always', 200],
|
|
|
|
|
|
|
|
|
|
|
|
// Require a blank line between subject and body, and before footers
|
|
|
|
|
|
'body-leading-blank': [2, 'always'],
|
|
|
|
|
|
'footer-leading-blank': [2, 'always'],
|
|
|
|
|
|
|
|
|
|
|
|
// Disable Conventional Commits type rules - this project uses
|
|
|
|
|
|
// Linux kernel–style "subsystem: description" subjects instead.
|
|
|
|
|
|
'type-enum': [0],
|
|
|
|
|
|
'type-case': [0],
|
|
|
|
|
|
'type-empty': [0],
|
|
|
|
|
|
'scope-empty': [0],
|
|
|
|
|
|
'subject-case': [0],
|
|
|
|
|
|
},
|
2026-05-06 11:01:30 +02:00
|
|
|
|
|
|
|
|
|
|
// Teach the parser which trailers terminate the body and start the
|
|
|
|
|
|
// footer. Without this, kernel-style trailers like `Fixes:` are
|
|
|
|
|
|
// classified as body lines and trip body-max-line-length, while the
|
|
|
|
|
|
// relaxed footer-max-line-length (200) never gets a chance to apply.
|
|
|
|
|
|
parserPreset: {
|
|
|
|
|
|
parserOpts: {
|
|
|
|
|
|
noteKeywords: [
|
|
|
|
|
|
'BREAKING CHANGE', 'BREAKING-CHANGE',
|
2026-09-01 17:14:29 +02:00
|
|
|
|
'Fixes', 'Closes', 'Signed-off-by', 'Co-authored-by',
|
2026-05-06 11:01:30 +02:00
|
|
|
|
'Reviewed-by', 'Tested-by', 'Acked-by',
|
|
|
|
|
|
'Reported-by', 'Suggested-by',
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2026-03-26 13:26:32 +01:00
|
|
|
|
};
|