MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / BodyLeadingBlankRule

Struct BodyLeadingBlankRule

rule/leading_blank_rules.go:20–20  ·  view source on GitHub ↗

BodyLeadingBlankRule checks that when a body is present, it begins with a blank line (i.e. the raw commit message has an empty line between header and body). Per the Conventional Commits spec the parser already trims the leading blank, but we can detect its presence via the full commit Message(): th

Source from the content-addressed store, hash-verified

18// can detect its presence via the full commit Message(): the body section should start
19// after two newlines (header + blank line + body).
20type BodyLeadingBlankRule struct{}
21
22func (r *BodyLeadingBlankRule) Name() string { return "body-leading-blank" }
23func (r *BodyLeadingBlankRule) Apply(_ lint.RuleSetting) error { return nil }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected