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

Method Validate

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

Source from the content-addressed store, hash-verified

46}
47
48func (r *TypeCaseRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
49 if casing.Check(msg.Type(), r.Case) {
50 return nil, true
51 }
52 return caseIssue("type", r.Case), false
53}
54
55// ScopeCaseRule validates that commit scope matches a given case format.
56// An empty scope is always accepted (scope is optional by convention).

Calls 3

CheckFunction · 0.92
caseIssueFunction · 0.85
TypeMethod · 0.65