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

Method Validate

rule/empty_rules.go:45–50  ·  view source on GitHub ↗
(msg lint.Commit)

Source from the content-addressed store, hash-verified

43func (r *BodyEmptyRule) Name() string { return "body-empty" }
44func (r *BodyEmptyRule) Apply(_ lint.RuleSetting) error { return nil }
45func (r *BodyEmptyRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
46 if msg.Body() != "" {
47 return nil, true
48 }
49 return lint.NewIssue("body must not be empty"), false
50}
51
52// FooterEmptyRule validates that the commit footer is not empty.
53type FooterEmptyRule struct{}

Callers 2

Calls 2

NewIssueFunction · 0.92
BodyMethod · 0.65

Tested by 2