(t *testing.T)
| 461 | } |
| 462 | |
| 463 | func TestDescMaxLen_NegativeDisables(t *testing.T) { |
| 464 | r := &rule.DescriptionMaxLenRule{} |
| 465 | if err := r.Apply(lint.RuleSetting{Argument: -1}); err != nil { |
| 466 | t.Fatal(err) |
| 467 | } |
| 468 | _, ok := r.Validate(&mockCommit{description: "very long description text"}) |
| 469 | if !ok { |
| 470 | t.Error("max=-1 should disable check") |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | // --- Footer enum rule --- |
| 475 |