Skip to content
This repository was archived by the owner on Apr 5, 2026. It is now read-only.

Commit a78ad5d

Browse files
HerbHallclaude
andauthored
docs(rules): ingest KG#167 -- markdownlint false positives on non-.md files (#440)
Found during DevKit audit session (2026-03-18). Running markdownlint against .gitignore or other non-.md files triggers spurious MD022/MD025/MD032 errors because # comment lines are parsed as H1 headings. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 608106a commit a78ad5d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

claude/rules/known-gotchas.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Known gotchas and platform-specific issues. Read when debugging unexpected behavior.
33
tier: 2
4-
entry_count: 46
4+
entry_count: 47
55
last_updated: "2026-03-18"
66
---
77

@@ -593,3 +593,11 @@ Diagnose manually: `ssh root@host 'lsof /usr/local/bin/<binary>'` then kill list
593593
```
594594
595595
Note: reference the binary directly (`$HOME/.local/bin/trivy`) in the install step since `$GITHUB_PATH` is not applied to PATH until the **next** step.
596+
597+
## 167. markdownlint-cli2 False Positives on Non-.md Files
598+
599+
**Added:** 2026-03-18 | **Source:** DevKit | **Status:** active
600+
601+
**Platform:** markdownlint-cli2 (all)
602+
**Issue:** Running `npx markdownlint-cli2` with a glob that accidentally includes non-`.md` files (e.g. `.gitignore`, `.sh` scripts) produces false positives. `#` comment lines are parsed as H1 headings, triggering MD022 (no blank line around headings), MD025 (multiple H1), and MD032 (no blank line around lists).
603+
**Fix:** Always scope markdownlint globs to `**/*.md` only. CI lint job already does this correctly — the issue only appears in manual local runs where a non-md file is passed directly or included via a broad glob.

0 commit comments

Comments
 (0)