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

Method Validate

rule/fullstop_rules.go:34–39  ·  view source on GitHub ↗
(msg lint.Commit)

Source from the content-addressed store, hash-verified

32}
33
34func (r *HeaderFullStopRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
35 if !strings.HasSuffix(msg.Header(), r.Char) {
36 return nil, true
37 }
38 return lint.NewIssue(fmt.Sprintf("header must not end with %q", r.Char)), false
39}
40
41// BodyFullStopRule checks that the body does NOT end with a given character.
42type BodyFullStopRule struct{ Char string }

Calls 2

NewIssueFunction · 0.92
HeaderMethod · 0.65