Repository navigation
cobol dead_code: count a comment only when it has a statement's shape (Part of #7207) - #7296
Merged
Merged
Conversation
… (Part of #7207) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s (Part of #7207) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s test) (Part of #7207) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
Contributor
This was referenced Oct 31, 2026
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 #7207 (slice 1, COBOL only).
What changed
COBOL rule 12 (
dead_code) counted any comment whose first word wasMOVE|COMPUTE|IF|PERFORM|CALL|EXEC, so prose such as* Move the pieceor*> If king moved, clear both rightscounted as commented-out code. It now requires what follows the marker to have the statement's shape:MOVE x TO y(or a continuedMOVE name/MOVE 'lit'),COMPUTE n =,IF operand relation,PERFORM para/UNTIL/VARYING/TIMES,CALL 'lit'/CALL n USING,EXEC SQL|CICS.Files (3 hand-written):
gitgalaxy/standards/language_standards/languages/cobol.py,tests/extraction/languages/test_cobol_dead_code_shape_7207.py(18 real positives, 13 prose/heading/pseudocode negatives, continued-MOVE cases),docs/language_status/cobol.md.Golden re-bless
Blessed with
golden-lock.sh crucible_check.py --update --yes(both legs) after merging current origin/main.scope_check.py --expect cobol: every difference is undercobol(1324 per leg) plus 199 repo-wide rollup fields (column digests, groups, fingerprint) that derive from those cobol files. The effect is fewerdead_codehits where a comment was prose. An earlier interrupted bless left an uncommittedgpu_json.json; it was discarded and regenerated.Gates
pr_gates.py --ratchets9/9 pass;pr_gates.py --fast9/9 pass (ruff 0.17.1 pinned binary); new test 33 passed;test_source_reads,test_generated_branch,test_change_classifier70 passed.Class / Sibling gaps
Class: a "commented-out code" detector that matches a comment's first keyword instead of the statement's shape, so prose and pseudocode inflate
dead_code. Handled here: COBOL (all six verb families in the issue). Sibling gaps (other languages, later slices, different rule files and goldens each): every other language'sdead_coderule that keys on a leading keyword, e.g. the shared-style commented-logic rules in the other per-language definitions undergitgalaxy/standards/language_standards/languages/. Not enumerated or filed per the brief. COBOL verbs outside the six (e.g.ADD,READ,GO TO) were never in the rule and are unchanged.Remaining slices
Other languages'
dead_coderules, one language family per PR, each with its own strict test and golden re-bless.Cross-repo
None.
🤖 Generated with Claude Code