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

Function validateMinLen

rule/rule.go:68–76  ·  view source on GitHub ↗
(typ string, expectedLen int, toCheck string)

Source from the content-addressed store, hash-verified

66}
67
68func validateMinLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
69 actualLen := len(toCheck)
70 if actualLen >= expectedLen {
71 return nil, true
72 }
73
74 desc := formMinLenMsg(typ, actualLen, expectedLen)
75 return lint.NewIssue(desc), false
76}
77
78func validateMaxLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
79 if expectedLen < 0 {

Callers 6

ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85

Calls 2

NewIssueFunction · 0.92
formMinLenMsgFunction · 0.85

Tested by

no test coverage detected