MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / TestHeadMaxLen_NegativeDisables

Function TestHeadMaxLen_NegativeDisables

test/rule_test.go:89–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func 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

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected