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

Method Validate

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

Source from the content-addressed store, hash-verified

47}
48
49func (r *BodyFullStopRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
50 body := msg.Body()
51 if body == "" {
52 return nil, true
53 }
54 if !strings.HasSuffix(body, r.Char) {
55 return nil, true
56 }
57 return lint.NewIssue(fmt.Sprintf("body must not end with %q", r.Char)), false
58}
59
60// DescriptionFullStopRule checks that the description does NOT end with a given character.
61type DescriptionFullStopRule struct{ Char string }

Calls 2

NewIssueFunction · 0.92
BodyMethod · 0.65