You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce markdownlint-cli2 to lint Markdown files under docs/ (and project-root *.md files), and add a CI workflow that runs on PRs to:
Lint Markdown with markdownlint-cli2.
Build the Sphinx docs (make docs) to catch broken references, syntax errors, or other build failures before merge.
Currently the docs build only runs on push to master via .github/workflows/docs.yaml, so syntax or reference errors in docs PRs are only caught after merge.
Proposal
Tool: markdownlint-cli2
Node-based, no Python dev-deps impact.
Mature ruleset, widely used.
Config via .markdownlint-cli2.jsonc at repo root.
CI workflow: .github/workflows/docs-lint.yaml
Triggered on PRs only when docs change (the inverse of the test workflow's paths-ignore):
Branch protection currently has no required status check contexts, so this won't immediately block merges. Once stable, we may want to mark docs-lint and docs-build as required for docs-only PRs.
Summary
Introduce
markdownlint-cli2to lint Markdown files underdocs/(and project-root*.mdfiles), and add a CI workflow that runs on PRs to:markdownlint-cli2.make docs) to catch broken references, syntax errors, or other build failures before merge.Currently the docs build only runs on
pushtomastervia.github/workflows/docs.yaml, so syntax or reference errors in docs PRs are only caught after merge.Proposal
Tool:
markdownlint-cli2.markdownlint-cli2.jsoncat repo root.CI workflow:
.github/workflows/docs-lint.yamlTriggered on PRs only when docs change (the inverse of the test workflow's
paths-ignore):Scope of files
docs/**/*.md— primary targetREADME.md,CLAUDE.md— include if violations are minordocs/_build/**,.github/**/*.md(PR template etc.)Initial config
Suggested rule overrides (to be discussed):
MD013(line-length): disable, or set to ~120MD033(no inline HTML): allow specific tags used in MyST (<details>,<summary>)MD041(first line must be H1): keep enabledMD024(no duplicate headings): allowsiblings_onlysince cursor docs reuse subsection namesDefinition of Done
.markdownlint-cli2.jsonccommitted with a reasonable ruleset..github/workflows/docs-lint.yamlruns on docs-touching PRs and runs both lint + Sphinx build.CLAUDE.mdhow to run markdownlint locally (e.g.npx markdownlint-cli2 'docs/**/*.md').Notes
paths-ignore(added in PR docs: note Result Reuse semantic-equivalence behavior change (2025-11) #714) and this workflow'spathsfilter are deliberately complementary — one fires when the other doesn't.docs-lintanddocs-buildas required for docs-only PRs.