feat: heading-jump and unused-import rules (#13 P2) #16

Merged
cflmy merged 1 commits from codex/issue-13-doc-rules-p2 into main 2026-11-30 16:45:10 +08:00
1 Commits
Author SHA1 Message Date
cflmy 8a15f2be9b feat: add heading-jump and unused-import structure rules
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/main Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/main Pipeline was successful
Continue marqdo-lint#13 with two more Analysis-3-only document-architecture
rules (catalog 27, both info, default gate unchanged):

- MQD-STRUCT-002: a heading skips more than one level below a real parent
  unit; top-level H2 under the document root is deliberately exempt.
- MQD-REL-002: an explicit import's resolved module is never named by a call
  target or a Markdown reference target.

Rules + unit tests in src/rules/structure.rs, RULES.md catalog, rule count in
tests/cli.rs. Evidence: docs/evidence/2026-11-30-doc-rules-p2.md (66 tests,
package-tool, real CLI install/lint/remove, 0 diagnostics on the inventory
example). No parser copy, no document language, no new dependency.
2026-11-30 16:35:39 +08:00