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

Function TestFooterMinLen_ZeroAllowsEmpty

test/rule_test.go:184–193  ·  view source on GitHub ↗

--- Footer length rules ---

(t *testing.T)

Source from the content-addressed store, hash-verified

182// --- Footer length rules ---
183
184func TestFooterMinLen_ZeroAllowsEmpty(t *testing.T) {
185 r := &rule.FooterMinLenRule{}
186 if err := r.Apply(lint.RuleSetting{Argument: 0}); err != nil {
187 t.Fatal(err)
188 }
189 _, ok := r.Validate(&mockCommit{footer: ""})
190 if !ok {
191 t.Error("empty footer with min=0 should pass")
192 }
193}
194
195func TestFooterMaxLen_NegativeDisables(t *testing.T) {
196 r := &rule.FooterMaxLenRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected