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

Method Validate

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

Source from the content-addressed store, hash-verified

55}
56
57func (r *TrailerExistsRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
58 for _, note := range msg.Notes() {
59 if note.Token() == r.Value {
60 return nil, true
61 }
62 }
63 return lint.NewIssue("message must contain trailer " + r.Value), false
64}

Callers 2

Calls 3

NewIssueFunction · 0.92
NotesMethod · 0.65
TokenMethod · 0.65

Tested by 2