Skip to content

lint(WH001): four-space-indented lines are skipped, so hard-wrapped nested list items are never reported or fixed #525

Description

@EricAndrechek

Area: infra · docs-lint — gap · found via codebase sweep (surfaced by #522's review)

Expected: CONTRIBUTING.md:97 and AGENTS.md:326make lint enforces WH001 / no-hard-wrapped-prose everywhere, and "a list item is joined as a unit."

Actual: scripts/markdownlint-rules/no-hard-wrapped-prose.mjs:139 classifies any line indented four or more spaces as an indented code block and skips it outright:

if (/^(\s{4,}\S|\t)/.test(line)) {
  kind[i] = "skip"; // indented code block
  continue;
}

A skip line is neither reported nor joined — the reporting loop takes only prose/list (:203), and a join run continues only while the next line is prose (:211). Four spaces is also the ordinary continuation indent for a nested bullet, so the hole is wider than "nested items":

  • a nested list item at ≥4 spaces — never classified, never reported, never fixed;
  • a top-level wrapped list item whose continuation lines sit at 4 spaces — classified list, but the run ends immediately because the continuation is skip, so it is silently not reported either.

Impact: #522 reflowed the repo and markdownlint-cli2 reported 0 issues — while three hard-wrapped nested bullets sat in .github/workflows/README.md, the very file being reflowed. They were found by a human reading the file, not by the rule. Every future hard-wrapped nested bullet is invisible to both make lint and make fix, so the "no exceptions" promise #521 and #522 just spent two PRs making true is now caveated instead: #522 documented the blind spot in AGENTS.md:342 and development.md:432 rather than closing it.

Note the four-space heuristic is load-bearing for genuine indented code blocks; telling those apart from list continuations needs list context this parser: "none" rule doesn't keep. scripts/markdownlint-rules/rules.test.mjs (37 fixtures driving the real CLI) is the safety net for any attempt.

Related: #521, #522, #499 (the MDX half of the same "lint what we promise" gap)


From the WaveHouse codebase TODO/lint sweep (pm-triage all routine); validated by code-read against 7b3c25e on 2026-08-27.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docsDocumentation, site/, READMEarea/infraCI, build, deploy, Docker, releasepolishImprovements to existing features

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions