Repository navigation
Apply the comment-voice rules and check them in the gate - #1425
Merged
Merged
Conversation
Scans comments in src, shared and server/src with the TypeScript scanner and reports ticket references, em-dashes, section banners, hanging TSDoc indents and TODOs without an issue URL. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Comments now explain the code without plan task labels, issue numbers or divider banners. The checker's phase pattern no longer matches identifiers such as phase1. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Continuation lines start with a single space after the asterisk. Fenced code, examples and Markdown list continuations keep their indentation. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Paired dashes become commas or parentheses, a term followed by a dash becomes a colon, and a dash before an independent clause becomes a full stop. Only comment tokens change. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Emphasis comes from wording. Acronyms, SQL keywords, HTTP methods, code identifiers and document names keep their capitals. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Adds policy:comment-voice and its test to the structural checks and documents the check. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Flags Stage and plan-exception labels, short box-drawing banners and indented TSDoc tag lines, and pins the URL, JSX text, JSDoc and doc-comment boundaries with fixtures. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
… references in comments Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
This was referenced Oct 1, 2026
Owner
Author
|
Polish review: no P1/P2 findings.
Merge order for this batch: #1411, #1412, #1414 → #1413, #1415, #1416 → #1417 → #1418, #1419 → #1420 → #1421 → #1422 → #1423 → #1424 → #1425 → #1426. Predecessor: #1424 and #1415. |
…-sweep # Conflicts: # docs/reference/development.html
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
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.
Part of #1409 (T13). Merge predecessors: #1424 (this PR's base branch,
feature/route-handlers) and #1415, which states the comment rules this applies (DEFENSIVE-CODING.md§7).scripts/check-comment-voice.mjs(pnpm run policy:comment-voice, run by both gates). It reads comments through the TypeScript parser, so strings, template literals and JSX text are never checked. It fails on ticket and plan labels, em-dashes, section banners, hanging TSDoc indentation and aTODOwithout an issue URL. Its test plants each violation plus negative cases.src/,shared/andserver/src/(about 590 files), comment tokens only:Validation: Integrated Batch 4 tip (all five Batch 4 branches):
pnpm run gate:allandpnpm run e2e(290 passed) on Node 24.16.0. Later changes on the stack touch only comments, the comment checker and two reference pages; on the final tip typecheck, lint, format, the comment-voice check and its test,ui:check,docs:buildandpnpm run gate:serverpass. Independently reviewed; findings applied. A token comparison with comments stripped confirms no non-comment change.Merge order
Merge predecessor for this PR: #1424 and #1415.