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

Method Apply

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

Source from the content-addressed store, hash-verified

47
48func (r *HeadMaxLenRule) Name() string { return "header-max-length" }
49func (r *HeadMaxLenRule) Apply(s lint.RuleSetting) error {
50 return applyIntArg(&r.CheckLen, r.Name(), s)
51}
52
53func (r *HeadMaxLenRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
54 return validateMaxLen("header", r.CheckLen, msg.Header())

Callers 4

TestHeadMaxLen_PassFunction · 0.95
TestHeadMaxLen_ExactFunction · 0.95
TestHeadMaxLen_FailFunction · 0.95

Calls 2

NameMethod · 0.95
applyIntArgFunction · 0.85

Tested by 4

TestHeadMaxLen_PassFunction · 0.76
TestHeadMaxLen_ExactFunction · 0.76
TestHeadMaxLen_FailFunction · 0.76