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

Function validateMaxLen

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

Source from the content-addressed store, hash-verified

70}
71
72func validateMaxLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
73 if expectedLen < 0 {
74 return nil, true
75 }
76
77 if len(toCheck) <= expectedLen {
78 return nil, true
79 }
80
81 desc := formMaxLenDesc(typ, len(toCheck), expectedLen)
82 return lint.NewIssue(desc), false
83}
84
85func validateMaxLineLength(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
86 if expectedLen < 0 || toCheck == "" {

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
formMaxLenDescFunction · 0.85

Tested by

no test coverage detected