MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / Validate

Method Validate

lint/rule/case_rules.go:103–112  ·  view source on GitHub ↗
(msg lint.Commit)

Source from the content-addressed store, hash-verified

101}
102
103func (r *BodyCaseRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
104 body := msg.Body()
105 if body == "" {
106 return nil, true
107 }
108 if casing.Check(body, r.Case) {
109 return nil, true
110 }
111 return caseIssue("body", r.Case), false
112}
113
114// HeaderCaseRule validates that the commit header matches a given case format.
115// Argument: one of the casing.* constants.

Calls 3

CheckFunction · 0.92
caseIssueFunction · 0.85
BodyMethod · 0.65