(msg lint.Commit)
| 32 | } |
| 33 | |
| 34 | func (r *HeaderFullStopRule) Validate(msg lint.Commit) (*lint.Issue, bool) { |
| 35 | if !strings.HasSuffix(msg.Header(), r.Char) { |
| 36 | return nil, true |
| 37 | } |
| 38 | return lint.NewIssue(fmt.Sprintf("header must not end with %q", r.Char)), false |
| 39 | } |
| 40 | |
| 41 | // BodyFullStopRule checks that the body does NOT end with a given character. |
| 42 | type BodyFullStopRule struct{ Char string } |