(msg lint.Commit)
| 43 | func (r *BodyEmptyRule) Name() string { return "body-empty" } |
| 44 | func (r *BodyEmptyRule) Apply(_ lint.RuleSetting) error { return nil } |
| 45 | func (r *BodyEmptyRule) Validate(msg lint.Commit) (*lint.Issue, bool) { |
| 46 | if msg.Body() != "" { |
| 47 | return nil, true |
| 48 | } |
| 49 | return lint.NewIssue("body must not be empty"), false |
| 50 | } |
| 51 | |
| 52 | // FooterEmptyRule validates that the commit footer is not empty. |
| 53 | type FooterEmptyRule struct{} |