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

Method Apply

lint/rule/length_rules.go:37–39  ·  view source on GitHub ↗
(s lint.RuleSetting)

Source from the content-addressed store, hash-verified

35
36func (r *HeadMinLenRule) Name() string { return "header-min-length" }
37func (r *HeadMinLenRule) Apply(s lint.RuleSetting) error {
38 return applyIntArg(&r.CheckLen, r.Name(), s)
39}
40
41func (r *HeadMinLenRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
42 return validateMinLen("header", r.CheckLen, msg.Header())

Callers 4

TestHeadMinLen_PassFunction · 0.95
TestHeadMinLen_ExactFunction · 0.95
TestHeadMinLen_FailFunction · 0.95
TestHeadMinLen_BadArgFunction · 0.95

Calls 2

NameMethod · 0.95
applyIntArgFunction · 0.85

Tested by 4

TestHeadMinLen_PassFunction · 0.76
TestHeadMinLen_ExactFunction · 0.76
TestHeadMinLen_FailFunction · 0.76
TestHeadMinLen_BadArgFunction · 0.76