MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / Validate

Method Validate

lint/rule/empty_rules.go:33–38  ·  view source on GitHub ↗
(msg lint.Commit)

Source from the content-addressed store, hash-verified

31func (r *ScopeEmptyRule) Name() string { return "scope-empty" }
32func (r *ScopeEmptyRule) Apply(_ lint.RuleSetting) error { return nil }
33func (r *ScopeEmptyRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
34 if msg.Scope() != "" {
35 return nil, true
36 }
37 return lint.NewIssue("scope must not be empty"), false
38}
39
40// BodyEmptyRule validates that the commit body is not empty.
41type BodyEmptyRule struct{}

Calls 2

NewIssueFunction · 0.92
ScopeMethod · 0.65

Tested by 2