--- Description length rules ---
(t *testing.T)
| 439 | // --- Description length rules --- |
| 440 | |
| 441 | func TestDescMinLen_Pass(t *testing.T) { |
| 442 | r := &rule.DescriptionMinLenRule{} |
| 443 | if err := r.Apply(lint.RuleSetting{Argument: 5}); err != nil { |
| 444 | t.Fatal(err) |
| 445 | } |
| 446 | _, ok := r.Validate(&mockCommit{description: "add new feature"}) |
| 447 | if !ok { |
| 448 | t.Error("desc len >= 5 should pass") |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | func TestDescMinLen_Fail(t *testing.T) { |
| 453 | r := &rule.DescriptionMinLenRule{} |