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

Function validateCharset

lint/rule/rule.go:48–60  ·  view source on GitHub ↗
(allowedCharset, toCheck string)

Source from the content-addressed store, hash-verified

46}
47
48func validateCharset(allowedCharset, toCheck string) (string, bool) {
49 invalidRunes := ""
50 for _, ch := range toCheck {
51 if !strings.ContainsRune(allowedCharset, ch) {
52 invalidRunes += string(ch)
53 }
54 }
55
56 if invalidRunes == "" {
57 return "", true
58 }
59 return invalidRunes, false
60}
61
62func validateMinLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) {
63 actualLen := len(toCheck)

Callers 2

ValidateMethod · 0.85
ValidateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected