(t *testing.T)
| 450 | } |
| 451 | |
| 452 | func TestDescMinLen_Fail(t *testing.T) { |
| 453 | r := &rule.DescriptionMinLenRule{} |
| 454 | if err := r.Apply(lint.RuleSetting{Argument: 20}); err != nil { |
| 455 | t.Fatal(err) |
| 456 | } |
| 457 | _, ok := r.Validate(&mockCommit{description: "short"}) |
| 458 | if ok { |
| 459 | t.Error("desc len < 20 should fail") |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | func TestDescMaxLen_NegativeDisables(t *testing.T) { |
| 464 | r := &rule.DescriptionMaxLenRule{} |