MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / TestFooterMaxLineLen_Fail

Function TestFooterMaxLineLen_Fail

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

Source from the content-addressed store, hash-verified

215}
216
217func TestFooterMaxLineLen_Fail(t *testing.T) {
218 r := &rule.FooterMaxLineLenRule{}
219 if err := r.Apply(lint.RuleSetting{Argument: 10}); err != nil {
220 t.Fatal(err)
221 }
222 _, ok := r.Validate(&mockCommit{footer: "Fixes: #123456789012345"})
223 if ok {
224 t.Error("footer line > 10 should fail")
225 }
226}
227
228// --- Type rules ---
229

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected