MDS036: add per-heading fixtures and correct plan 51 wording - #149
Conversation
Add good/per-heading.md and bad/per-heading.md to exercise the regex-based override path end-to-end through fixture YAML decoding. Correct plan task 3 to say "by lines" — the implementation is line-based only, not tokens.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #149 +/- ##
==========================================
+ Coverage 86.70% 86.76% +0.05%
==========================================
Files 95 96 +1
Lines 10387 10446 +59
==========================================
+ Hits 9006 9063 +57
- Misses 899 900 +1
- Partials 482 483 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Follow-up to #143 that adds end-to-end integration fixtures for MDS036’s per-heading override path and corrects plan 51 wording to match the line-based implementation.
Changes:
- Add
good/per-heading.mdandbad/per-heading.mdfixtures to exercise regex-basedper-headingsettings via YAML front matter decoding. - Update plan 51 task wording from “by lines or tokens” to “by lines”.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plan/51_section-level-size-limits.md | Aligns plan wording with the implemented line-based section length counting. |
| internal/rules/MDS036-max-section-length/good/per-heading.md | Adds a passing fixture verifying per-heading limits apply only to matching headings with max: 0 disabling the global default. |
| internal/rules/MDS036-max-section-length/bad/per-heading.md | Adds a failing fixture asserting the expected diagnostic for an over-limit section matched by a per-heading regex. |
|
🟢 Merge Queue — picked up This PR is in the queue and will be batched with other Next: No action needed — you'll get another comment when CI starts on the batch. View merge queue run. |
|
🔵 Merge Queue — CI running Merged into batch branch Next: No action needed — you'll be notified when CI completes. |
|
✅ Merge Queue — merged This PR landed on Next: Done — nothing more to do here. |
Follow-up to #143 addressing the last two Copilot review comments that arrived after that PR entered the merge queue.
Summary
good/per-heading.mdandbad/per-heading.mdfixtures so the regex-based override path is exercised end-to-end through fixture YAML decoding (not just unit tests).Test plan
go test ./internal/integration/... ./internal/rules/maxsectionlength/...go tool golangci-lint run ./...go run ./cmd/mdsmith check .