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

Function TestLint_BodyWithinLimit

test/lint_test.go:265–274  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Body edge cases ---------------------------------------------------------------------------

(t *testing.T)

Source from the content-addressed store, hash-verified

263// ---------------------------------------------------------------------------
264
265func TestLint_BodyWithinLimit(t *testing.T) {
266 linter := newDefaultLinter(t)
267 result, err := linter.ParseAndLint("feat: add feature\n\nShort body line.")
268 if err != nil {
269 t.Fatal(err)
270 }
271 if len(result.Issues()) != 0 {
272 t.Error("body within 72 chars should pass")
273 }
274}
275
276func TestLint_BodyMultiLineAllWithin(t *testing.T) {
277 linter := newDefaultLinter(t)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected