(msg lint.Commit)
| 31 | func (r *ScopeEmptyRule) Name() string { return "scope-empty" } |
| 32 | func (r *ScopeEmptyRule) Apply(_ lint.RuleSetting) error { return nil } |
| 33 | func (r *ScopeEmptyRule) Validate(msg lint.Commit) (*lint.Issue, bool) { |
| 34 | if msg.Scope() != "" { |
| 35 | return nil, true |
| 36 | } |
| 37 | return lint.NewIssue("scope must not be empty"), false |
| 38 | } |
| 39 | |
| 40 | // BodyEmptyRule validates that the commit body is not empty. |
| 41 | type BodyEmptyRule struct{} |