Skip to content
Latchkey

markdownlint "MD013/line-length" line too long in CI

markdownlint rule MD013 flags any line longer than its configured limit (80 columns by default). It reports the file, line, expected width, and actual width, then exits non-zero, failing the job.

What this error means

markdownlint prints "MD013/line-length Line length [Expected: 80; Actual: 132]" for one or more lines and the docs-lint job fails.

markdownlint
README.md:14 MD013/line-length Line length [Expected: 80; Actual: 132]
docs/guide.md:7 MD013/line-length Line length [Expected: 80; Actual: 118]

Common causes

Prose lines exceed the default 80-column limit

MD013 is on by default with an 80-character limit. Long sentences, URLs, or tables trip it even though they render fine.

No project config raises or scopes the limit

Without a .markdownlint.json the default applies everywhere, including code blocks and tables that legitimately run wide.

How to fix it

Raise or scope the limit in .markdownlint.json

  1. Add a .markdownlint.json at the repo root.
  2. Set MD013 to a wider limit, or exempt code blocks and tables.
  3. Commit the config so CI and local runs agree.
.markdownlint.json
{
  "MD013": {
    "line_length": 120,
    "code_blocks": false,
    "tables": false
  }
}

Disable MD013 entirely for prose repos

If you wrap prose semantically rather than by column, turn MD013 off so line length never fails the build.

.markdownlint.json
{
  "MD013": false
}

How to prevent it

  • Commit a .markdownlint.json so the limit is explicit, not the default.
  • Exempt code blocks and tables from MD013 to avoid false positives.
  • Run markdownlint locally (or via pre-commit) before pushing.

Frequently asked questions

What causes ""MD013/line-length""?
MD013 is on by default with an 80-character limit. Long sentences, URLs, or tables trip it even though they render fine.
How do I fix "MD013/line-length"?
Raise or scope the limit in .markdownlint.json

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card