chore: enforce 7 more markdownlint rules, fix pre-existing violations - #174
Merged
Conversation
Re-enables the markdownlint rules that can be enforced without false
positives or churn, and clears their existing violations.
Enforced now (were disabled): MD009, MD012, MD031, MD032, MD047 (whitespace
hygiene, auto-fixed) and MD055, MD056 (table pipe style / column count).
- Fix the two malformed borderless tables in LinterCop/LC0090 — the only
MD055/MD056 offenders in the repo — to bordered pipes with correct column
counts (data preserved).
- Apply markdownlint --fix for the 5 whitespace rules across ~20 content
files (trailing spaces, blank-line normalization, final newline).
- rule-pages.md: document bordered pipe tables with consistent column counts.
Stays disabled, now categorized with reasons in .markdownlint.jsonc:
- Structural false positives — code lives in Hugo shortcodes ({{< highlight >}},
{{< tab >}}) that markdownlint parses as prose: MD033, MD018, MD025, MD026,
MD034, MD038 (the last would corrupt PowerShell backtick line-continuations).
- Deliberate conventions: MD013 (long unwrapped prose), MD001 (### under the
front-matter title).
- Deferred manual debt: MD022, MD040, MD046, MD036, MD060.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #171. Resolves the markdownlint debt that shipped disabled to get the gate green, and re-evaluates the "deliberate convention" disables. Stacked on
ci/pr-build(base will move tomainonce #171 merges).Result: 20 disabled → 13 disabled, 7 now enforced
Enforced now (were disabled):
MD009,MD012,MD031,MD032,MD047— whitespace hygiene, cleared viamarkdownlint --fixacross ~20 files (trailing spaces, blank-line normalization, final newline). All changes verified prose-safe.MD055,MD056— table pipe style / column count. The only offenders repo-wide were two malformed borderless tables inLinterCop/LC0090; reformatted to bordered pipes with correct column counts (data preserved, renders as 3 correct tables).The key finding
115 content files author code with Hugo shortcodes (
{{< highlight >}},{{< tab >}},{{< tabpane >}}), which markdownlint parses as prose. That makes a whole class of rules structural false positives, not fixable debt — there's no config to make markdownlint read shortcode bodies. Verified with the exact CI tool (markdownlint-cli2@0.23.2).A concrete example caught during implementation:
--fixwithMD038enabled corrupted a PowerShell backtick line-continuation ingithub.md(stripped indentation, reading the backticks as a code span). MD038 was reverted and moved to the disabled set.Stays disabled — now categorized with reasons in
.markdownlint.jsoncMD033,MD018,MD025,MD026,MD034,MD038.MD013(prose authored as long unwrapped lines),MD001(rule pages open at### Exampleunder the front-matter title; cli2 counts the title as H1 → h1→h3).MD022,MD040,MD046,MD036,MD060.Docs sync
.claude/rules/rule-pages.mdnow documents bordered pipe tables with consistent column counts (supports MD055/MD056). The/new-ruleskill already emits compliant tables and clean Markdown — no change needed.Verification (local, current tree)
markdownlint-cli2@0.23.2 "content/**/*.md"→ 0 issues, 148 files.hugo --gc --minify --panicOnWarning --printPathWarnings→ clean.#compensating-usagesanchor intact).Out of scope (noted for later)
{hl_lines}would unlock MD018/MD025/MD026/MD033/MD034 but touches 115 files,rule-pages.md, and/new-rule— a separate initiative..htmltest.yml) remain their own follow-ups.🤖 Generated with Claude Code