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

Function TestLint_BodyMultiLineAllWithin

test/lint_test.go:276–287  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

274}
275
276func TestLint_BodyMultiLineAllWithin(t *testing.T) {
277 linter := newDefaultLinter(t)
278 result, err := linter.ParseAndLint("feat: add feature\n\nLine one.\nLine two.\nLine three.")
279 if err != nil {
280 t.Fatal(err)
281 }
282 for _, iss := range result.Issues() {
283 if iss.RuleName() == "body-max-line-length" {
284 t.Error("all body lines <= 72 should not trigger body-max-line-length")
285 }
286 }
287}
288
289func TestLint_EmptyBodyAllowed(t *testing.T) {
290 linter := newDefaultLinter(t)

Callers

nothing calls this directly

Calls 5

newDefaultLinterFunction · 0.85
ParseAndLintMethod · 0.80
IssuesMethod · 0.80
RuleNameMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected