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

Method Validate

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

Source from the content-addressed store, hash-verified

63}
64
65func (r *ScopeCaseRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
66 // scope is optional; skip the check when absent
67 if msg.Scope() == "" {
68 return nil, true
69 }
70 if casing.Check(msg.Scope(), r.Case) {
71 return nil, true
72 }
73 return caseIssue("scope", r.Case), false
74}
75
76// DescriptionCaseRule validates that the commit description (subject) matches a
77// given case format.

Calls 3

CheckFunction · 0.92
caseIssueFunction · 0.85
ScopeMethod · 0.65