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

Method Apply

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

Source from the content-addressed store, hash-verified

137
138func (r *TypeMinLenRule) Name() string { return "type-min-length" }
139func (r *TypeMinLenRule) Apply(s lint.RuleSetting) error {
140 return applyIntArg(&r.CheckLen, r.Name(), s)
141}
142
143func (r *TypeMinLenRule) Validate(msg lint.Commit) (*lint.Issue, bool) {
144 return validateMinLen("type", r.CheckLen, msg.Type())

Callers 2

TestTypeMinLen_PassFunction · 0.95
TestTypeMinLen_FailFunction · 0.95

Calls 2

NameMethod · 0.95
applyIntArgFunction · 0.85

Tested by 2

TestTypeMinLen_PassFunction · 0.76
TestTypeMinLen_FailFunction · 0.76