fix(tools): exclude a preceding slash from the glued-doc-comment guard - #104
Merged
Merged
Conversation
Cherry-picked from 2d84894 onto a branch that had already removed the end-of-line anchor by another route (d536a43, then b0a29ef dropped the `^.*` wrapper it left behind), so the two sides were parallel fixes of the same guard and each carried a piece the other lacked. The pattern that lands is `[^\s/]///`: HEAD's unanchored form, which is the cheap one -- `^.*` matches to end of line and then backtracks hunting for the marker, on every line of every file -- plus the cherry-pick's exclusion of a preceding slash. That exclusion is the whole substance of the pick here. `\S///` flags a `////` banner comment, because the banner's third slash is itself a non-space character; this repository happens to contain no such banner, so the false positive was latent rather than firing. Verified in both directions rather than only on the reject side: the glued line form (`let x = 1;/// The next thing`), the bare glued marker, and a sentence welded to a closing fence are each flagged with the right line number, while a `////` banner -- planted as the control -- leaves the run clean. All tracked files still pass. The commit's PLANS.md hunk is dropped. It predates this branch's root PLANS.md and would have replaced a thirteen-crate tracker list with a two-crate one and declared no checklists active over a table of eight; the link repair it was made for is already present here. It applied without conflict, which is why it had to be caught by eye rather than by git. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MikeGrier
enabled auto-merge
September 18, 2026 20:29
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues remain, and the reviewed change preserves detection while removing the banner-comment false positive.
Pull request overview
Updates the doc-comment guard to ignore //// banner comments while still detecting glued /// markers.
Changes:
- Replaces
\S///with[^\s/]///. - Documents the corrected behavior and rationale.
File summaries
| File | Summary |
|---|---|
tools/check-encoding.ps1 |
Excludes preceding slashes from glued-doc detection. |
DESIGN-NOTES.md |
Documents the refined guard behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked from 2d84894 onto a branch that had already removed the end-of-line anchor by another route (d536a43, then b0a29ef dropped the
^.*wrapper it left behind), so the two sides were parallel fixes of the same guard and each carried a piece the other lacked. The pattern that lands is[^\s/]///: HEAD's unanchored form, which is the cheap one --^.*matches to end of line and then backtracks hunting for the marker, on every line of every file -- plus the cherry-pick's exclusion of a preceding slash.That exclusion is the whole substance of the pick here.
\S///flags a////banner comment, because the banner's third slash is itself a non-space character; this repository happens to contain no such banner, so the false positive was latent rather than firing.Verified in both directions rather than only on the reject side: the glued line form (
let x = 1;/// The next thing), the bare glued marker, and a sentence welded to a closing fence are each flagged with the right line number, while a////banner -- planted as the control -- leaves the run clean. All tracked files still pass.The commit's PLANS.md hunk is dropped. It predates this branch's root PLANS.md and would have replaced a thirteen-crate tracker list with a two-crate one and declared no checklists active over a table of eight; the link repair it was made for is already present here. It applied without conflict, which is why it had to be caught by eye rather than by git.