Repository navigation
Treat a Tool Directive Line as No Previous Sentence in the Comment Wrap Rule - #2893
Conversation
…ap Rule Fixes #2885. comment_wrap_findings no longer keeps a line is_tool_directive matches as the previous body, so the comment line after a directive is not read as its continuation. Tests are in their own class; the issue's case and the directive-after-directive case fail with the fix reverted.
…nd Reverse-Wrap Outcomes Edits the existing design note above TOOL_DIRECTIVE, hence PROSE_ALLOW_COMMENTS=1. A lowercase line after a directive is judged for comment-case, and a sentence wrapping into a directive still draws comment-wrap.
…Directive Case The note over-claimed an exemption: comment-wrap only declines to read a directive as a wrapping sentence.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2893 +/- ##
==========================================
Coverage ? 59.63%
==========================================
Files ? 16
Lines ? 8683
Branches ? 0
==========================================
Hits ? 5178
Misses ? 3505
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The only remaining comment is a minor docstring nit and does not block approval.
1 open finding
What changed in this PR
Updates prose linting so tool-directive lines do not become preceding wrapped sentences.
Changes:
- Reset wrap tracking after tool directives.
- Add regression tests for directive and wrapping cases.
- Clarify directive handling documentation.
| File | Description |
|---|---|
tests/test_prose_lint.py |
Adds regression coverage for directive wrapping behavior. |
.github/actions/prose-gate/prose_lint.py |
Updates wrap-state handling and documentation. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
A recorded local strict-review pass covers head |
…ge Rows, and Directive Comment Wrap to Main (#2894) - #2890 documents the dispatch guard for a schedule that never publishes, in D4.1 and the catalog snippet notes - #2891 skips file-table rows when reading partial coverage markers - #2893 treats a tool directive line as no previous sentence in the comment-wrap rule Closes #2849 Closes #2886 Closes #2885 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Fixes #2885.
comment_wrap_findingsno longer keeps a lineis_tool_directivematches as the previous body, so the comment line after# nosec B404is not reported as that line's wrapped continuation (sibling of #2828 / #2878).Behavior: a lowercase line after a directive is now judged by
comment-case(capitalizing passes), a directive followed by a directive draws nothing, a plain two-line wrap and a sentence wrapping into a directive still drawcomment-wrap. Four of the five new tests fail with the fix reverted. One existing comment edit (the note aboveTOOL_DIRECTIVE), hence thecommentslabel.Local review findings (7 raised, two rounds): fixed the over-claiming
TOOL_DIRECTIVEnote, the missing case/reverse-wrap/trailing-directive tests. Acceptedpre-existing/by issue shape: a directive whose written reason wraps onto a lowercase line now drawscomment-caseinstead ofcomment-wrap, and capitalizing it clears the gate;RUN_ONstill reads directive bodies; "exempt" in the note elides theis_tool_directiveno-full-stop condition (wording predates this change).🤖 Generated with Claude Code