(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestHeadMaxLen_NegativeDisables(t *testing.T) { |
| 90 | r := &rule.HeadMaxLenRule{} |
| 91 | if err := r.Apply(lint.RuleSetting{Argument: -1}); err != nil { |
| 92 | t.Fatal(err) |
| 93 | } |
| 94 | _, ok := r.Validate(&mockCommit{header: "extremely long header that normally fails"}) |
| 95 | if !ok { |
| 96 | t.Error("max=-1 should disable check") |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | // --- Body length rules --- |
| 101 |