(msg lint.Commit)
| 44 | } |
| 45 | |
| 46 | func (r *ScopeCharsetRule) Validate(msg lint.Commit) (*lint.Issue, bool) { |
| 47 | invalidChars, isValid := validateCharset(r.Charset, msg.Scope()) |
| 48 | if isValid { |
| 49 | return nil, true |
| 50 | } |
| 51 | return lint.NewIssue( |
| 52 | "scope can only have these chars ["+r.Charset+"]", |
| 53 | "invalid characters ["+invalidChars+"]", |
| 54 | ), false |
| 55 | } |