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

Function validateMinLen

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

Source from the content-addressed store, hash-verified

60}
61
62func validateMinLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
63 actualLen := len(toCheck)
64 if actualLen >= expectedLen {
65 return nil, true
66 }
67
68 desc := formMinLenMsg(typ, actualLen, expectedLen)
69 return lint.NewIssue(desc), false
70}
71
72func validateMaxLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
73 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