(msg lint.Commit)
| 19 | func (r *TypeEmptyRule) Name() string { return "type-empty" } |
| 20 | func (r *TypeEmptyRule) Apply(_ lint.RuleSetting) error { return nil } |
| 21 | func (r *TypeEmptyRule) Validate(msg lint.Commit) (*lint.Issue, bool) { |
| 22 | if msg.Type() != "" { |
| 23 | return nil, true |
| 24 | } |
| 25 | return lint.NewIssue("type must not be empty"), false |
| 26 | } |
| 27 | |
| 28 | // ScopeEmptyRule validates that the commit scope is not empty. |
| 29 | type ScopeEmptyRule struct{} |