(t *testing.T)
| 193 | } |
| 194 | |
| 195 | func TestFooterMaxLen_NegativeDisables(t *testing.T) { |
| 196 | r := &rule.FooterMaxLenRule{} |
| 197 | if err := r.Apply(lint.RuleSetting{Argument: -1}); err != nil { |
| 198 | t.Fatal(err) |
| 199 | } |
| 200 | _, ok := r.Validate(&mockCommit{footer: "Very long footer text"}) |
| 201 | if !ok { |
| 202 | t.Error("max=-1 should disable check") |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | func TestFooterMaxLineLen_Pass(t *testing.T) { |
| 207 | r := &rule.FooterMaxLineLenRule{} |