(msg lint.Commit)
| 101 | } |
| 102 | |
| 103 | func (r *BodyCaseRule) Validate(msg lint.Commit) (*lint.Issue, bool) { |
| 104 | body := msg.Body() |
| 105 | if body == "" { |
| 106 | return nil, true |
| 107 | } |
| 108 | if casing.Check(body, r.Case) { |
| 109 | return nil, true |
| 110 | } |
| 111 | return caseIssue("body", r.Case), false |
| 112 | } |
| 113 | |
| 114 | // HeaderCaseRule validates that the commit header matches a given case format. |
| 115 | // Argument: one of the casing.* constants. |