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

Method Validate

rule/trailer_rules.go:30–37  ·  view source on GitHub ↗
(msg lint.Commit)

Source from the content-addressed store, hash-verified

28}
29
30func (r *SignedOffByRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
31 for _, note := range msg.Notes() {
32 if note.Token() == r.Value {
33 return nil, true
34 }
35 }
36 return lint.NewIssue("message must contain trailer " + r.Value), false
37}
38
39// TrailerExistsRule checks that at least one footer note has a token matching
40// the configured value.

Calls 3

NewIssueFunction · 0.92
NotesMethod · 0.65
TokenMethod · 0.65