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

Function validateMaxLen

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

Source from the content-addressed store, hash-verified

76}
77
78func validateMaxLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
79 if expectedLen < 0 {
80 return nil, true
81 }
82
83 if len(toCheck) <= expectedLen {
84 return nil, true
85 }
86
87 desc := formMaxLenDesc(typ, len(toCheck), expectedLen)
88 return lint.NewIssue(desc), false
89}
90
91func validateMaxLineLength(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
92 lines := strings.Split(toCheck, "\n")

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