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

Method Validate

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

Source from the content-addressed store, hash-verified

66}
67
68func (r *DescriptionFullStopRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
69 desc := msg.Description()
70 if desc == "" {
71 return nil, true
72 }
73 if !strings.HasSuffix(desc, r.Char) {
74 return nil, true
75 }
76 return lint.NewIssue(fmt.Sprintf("description must not end with %q", r.Char)), false
77}

Calls 2

NewIssueFunction · 0.92
DescriptionMethod · 0.65