(msg lint.Commit)
| 46 | } |
| 47 | |
| 48 | func (r *TypeCaseRule) Validate(msg lint.Commit) (*lint.Issue, bool) { |
| 49 | if casing.Check(msg.Type(), r.Case) { |
| 50 | return nil, true |
| 51 | } |
| 52 | return caseIssue("type", r.Case), false |
| 53 | } |
| 54 | |
| 55 | // ScopeCaseRule validates that commit scope matches a given case format. |
| 56 | // An empty scope is always accepted (scope is optional by convention). |