Repository navigation
fix(doc): banner guard for the 13 other /** languages; keep /*** docblocks - #8244
Merged
Merged
Conversation
…divider false positives Same /**(?!\*) and (?<!/)///(?!/) guard #8200 put on c/cpp: apex, dart, groovy, java, javascript, kotlin, objective-c, php, scala, solidity, swift, typescript, yacc. A /***** box border or //// divider is not a doc block. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ount (?!\*) also rejected Magento-style '/***' docblocks (found on the golden: Mysql.php's doc count went up as their @var tags counted alone). Reject only banner shapes: /**** (2+ extra stars) and one-line '/*** x ***/' boxes. Applied to all 15 /** languages, c/cpp included. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… doc blocks) Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-protocol
marked this pull request as ready for review
November 11, 2026 00:03
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
CI shepherd: the head of this PR (db3b29c) is not the one a maintainer labelled |
Contributor
|
No description provided. |
#8240 was blessed before #8245 merged, so main's goldens never had both: with jcl's positional comments, 119 jcl steps now read Has Header Comment 0 -> 1. Plus this PR's own GLTFLoader.js banner drift. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
Contributor
|
No description provided. |
squid-protocol
added a commit
that referenced
this pull request
Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-shepherd Bot
pushed a commit
that referenced
this pull request
Nov 11, 2026
…t end in C-family (#8255) * fix(doc): guard 13 languages' doc rule against star-banner and slash-divider false positives Same /**(?!\*) and (?<!/)///(?!/) guard #8200 put on c/cpp: apex, dart, groovy, java, javascript, kotlin, objective-c, php, scala, solidity, swift, typescript, yacc. A /***** box border or //// divider is not a doc block. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(doc): narrow the banner guard so /*** + newline docblocks still count (?!\*) also rejected Magento-style '/***' docblocks (found on the golden: Mysql.php's doc count went up as their @var tags counted alone). Reject only banner shapes: /**** (2+ extra stars) and one-line '/*** x ***/' boxes. Applied to all 15 /** languages, c/cpp included. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): bless the banner guard (threejs GLTFLoader.js: 67 -> 58 doc blocks) Co-Authored-By: Claude Opus 5.5 <[email protected]> * style: ruff format the widened doc rules (patterns unchanged) Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): re-bless after merging main (#8240 + #8245 together) #8240 was blessed before #8245 merged, so main's goldens never had both: with jcl's positional comments, 119 jcl steps now read Has Header Comment 0 -> 1. Plus this PR's own GLTFLoader.js banner drift. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(dead_code): control keywords need '(' and return needs a statement end in C-family On curl 39 of 48 dead_code hits were prose: '/* for offsetof() */', '/* if a request ... (on a file) */', '/* return the position after %time{} */'. In c/cpp/java/javascript/typescript, if/for/while must be followed by '(' (their conditions always are); in c/cpp/java a commented return must end in ';' or return a call directly (#7207's '// return foo(x)'). curl: 48 -> 9 hits, both real commented-out statements kept, the rest are commented prototypes. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): bless the dead_code shape fix (3 corpus files; plus main's stale jcl header drift) Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): re-bless after merging #8244 (derived gpu digest only) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Joe Esquibel <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
squid-shepherd Bot
pushed a commit
that referenced
this pull request
Nov 11, 2026
…; rejects trailing-comment tails (#8256) * fix(doc): guard 13 languages' doc rule against star-banner and slash-divider false positives Same /**(?!\*) and (?<!/)///(?!/) guard #8200 put on c/cpp: apex, dart, groovy, java, javascript, kotlin, objective-c, php, scala, solidity, swift, typescript, yacc. A /***** box border or //// divider is not a doc block. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(doc): narrow the banner guard so /*** + newline docblocks still count (?!\*) also rejected Magento-style '/***' docblocks (found on the golden: Mysql.php's doc count went up as their @var tags counted alone). Reject only banner shapes: /**** (2+ extra stars) and one-line '/*** x ***/' boxes. Applied to all 15 /** languages, c/cpp included. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): bless the banner guard (threejs GLTFLoader.js: 67 -> 58 doc blocks) Co-Authored-By: Claude Opus 5.5 <[email protected]> * style: ruff format the widened doc rules (patterns unchanged) Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): re-bless after merging main (#8240 + #8245 together) #8240 was blessed before #8245 merged, so main's goldens never had both: with jcl's positional comments, 119 jcl steps now read Has Header Comment 0 -> 1. Plus this PR's own GLTFLoader.js banner drift. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(dead_code): control keywords need '(' and return needs a statement end in C-family On curl 39 of 48 dead_code hits were prose: '/* for offsetof() */', '/* if a request ... (on a file) */', '/* return the position after %time{} */'. In c/cpp/java/javascript/typescript, if/for/while must be followed by '(' (their conditions always are); in c/cpp/java a commented return must end in ';' or return a call directly (#7207's '// return foo(x)'). curl: 48 -> 9 hits, both real commented-out statements kept, the rest are commented prototypes. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): bless the dead_code shape fix (3 corpus files; plus main's stale jcl header drift) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(detector): has_header_comment steps over the unit's own prototype; rejects trailing-comment tails From the curl hand audit (temporal-crucible#118): curl documents UNITTEST functions as comment, forward declaration, definition, and the walk stopped at the prototype's ';'; a blank line inside a /* */ block cut the block short; and the wrapped tail of a #define's trailing comment read as a header. curl C: 1,196 -> 1,223 header comments (29 gained, all the UNITTEST idiom; 2 lost, both trailing-comment tails). Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): bless the header-comment fixes (29 corpus units gain a header; plus main's stale jcl drift) Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(golden): re-bless after merging #8244 (derived gpu digest only) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Joe Esquibel <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Summary
Extends the
doc-rule banner guard from #8200 (C/C++) to every other language whosedocrule opens with/**: apex, dart, groovy, java, javascript, kotlin, objective-c, php, scala, solidity, swift, typescript, yacc. It also narrows the guard for all 15, C/C++ included.The guard.
/\*\*(?!\*\*|\*[^\n]{0,200}\*\*/)rejects two banner shapes:/****border (2+ extra stars), and/*** title ***/box.A
/***+ newline docblock still counts. Dart, Objective-C, Solidity and Swift (the languages with a///doc form) also get(?<!/)///(?!/), so////dividers don't count.Why narrower than #8200's
(?!\*). The first bless of this PR showed Magento'sMysql.phpdoc count going up (179 -> 181). Magento writes real docblocks as/***+ newline +* Get exact version of MySQL.(?!\*)dropped those blocks, so their@vartags counted one by one. The narrower guard keeps them. #8200's C/C++ guard had the same over-reach, so it is replaced here; the C/C++ golden does not move, because no corpus C/C++ file uses that style.Golden master bless scope
Only
javascript/threejs/GLTFLoader.jschanges. Its 9/***************...***/and/********** EXTENSIONS ***********/section-banner lines stop counting as doc blocks: Structured Documentation Blocks 67 -> 58. Everything else that moves is derived from that file: its function analysis and risk exposures, the threejs directory averages,health.avg_cognitive_load(20.03 -> 20.031), the hits/risks flats and the LLM brief. No file is newly parsed or excluded.Also re-blessed here: #8240 + #8245 together
#8240 was blessed before #8245 (jcl positional comments) merged, so
main's goldens never had both. With both onmain, 119 jcl steps readHas Header Comment0 -> 1 (all jcl, all 0 -> 1). Sampled cases are real//*comments above the step, e.g.//***** CSD definitions for stand-alone GENAPPaboveCSDDEFS. That drift belongs to #8240/#8245; it lands here because this is the next bless after both merged.Verification
tests/extraction/languages/test_doc_banner_guard.py(new): 66 cases over the 15 languages. A star border, a one-line star box and a////divider are rejected;/** ... */,/***+ newline and///are accepted.test_<lang>.py+test_<lang>_strict.py, plustest_detector.py: 2,529 passed.keyword-rosetta/tools/verify_language.py <lang> --engine <this worktree>: PASS for all 15.golden-lock.sh python tests/tools/crucible_check.py --update --yes.Size
15 language files and 1 test, plus golden parts: over the usual 5-file guideline. It is the same one-line regex change in each
docrule.Cross-repo
None. Sibling of #8240; both touch the golden snapshots, so whichever merges second needs
rebase_rebless.py(or a merge of main plus a re-bless).🤖 Generated with Claude Code