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

Method Apply

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

Source from the content-addressed store, hash-verified

149
150func (r *TypeMaxLenRule) Name() string { return "type-max-length" }
151func (r *TypeMaxLenRule) Apply(s lint.RuleSetting) error {
152 return applyIntArg(&r.CheckLen, r.Name(), s)
153}
154
155func (r *TypeMaxLenRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
156 return validateMaxLen("type", r.CheckLen, msg.Type())

Callers 2

TestTypeMaxLen_PassFunction · 0.95
TestTypeMaxLen_FailFunction · 0.95

Calls 2

NameMethod · 0.95
applyIntArgFunction · 0.85

Tested by 2

TestTypeMaxLen_PassFunction · 0.76
TestTypeMaxLen_FailFunction · 0.76