Repository navigation
Report headless files as one section in section mode - #89
Conversation
Blank-line splits ran even when paragraph mode was off, so a page with no headings was counted and dated per paragraph, including frontmatter.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughHeaderless Markdown files now produce one ChangesHeaderless section parsing
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Headerless files now produce one chunk in section mode, as the linked issue requests. Section IDs for these files change once, which the changelog documents. No merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 3 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. I’m a rabbit; I thump at the page, Comment |
Summary
In section mode, a file with no headings is one
(no header)chunk covering the body after frontmatter. Its date still comes from git blame on those body lines, so a frontmatter-only edit does not refresh a page that also has body content. A frontmatter-only stub stays in the report.--paragraph-levelis unchanged.The surviving section id is the old first paragraph's id (
[]:preamble:1). Later paragraph ids are dropped, and that id's fingerprint and span change.Closes #88
Checklist
gofmt -l .prints nothinggo vet ./...passesgo test ./...passesCHANGELOG.md[Unreleased]updated (for user-facing changes)Notes for reviewers
Section mode now calls
parseHeaderlessinstead ofparseParagraphs. The chunk uses the same frontmatter rules as the preamble: a closed---or+++block at the top is skipped unless it is the whole file. Blame lines outside that span are not folded into the date.Test plan
gofmt -lon the touched parser files is emptygo test ./internal/parser/ ./internal/analyzer/ ./internal/report/ ./cmd/rustydocs/(no header)row in section mode and still splits under--paragraph-levelSummary by CodeRabbit