Skip to content

cobol dead_code: count a comment only when it has a statement's shape (Part of #7207) - #7296

Merged
squid-shepherd[bot] merged 6 commits into
mainfrom
churn/7207-20261031T0330Z
Oct 31, 2026
Merged

squid-shepherd[bot] merged 6 commits into
mainfrom
churn/7207-20261031T0330Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7207 (slice 1, COBOL only).

What changed

COBOL rule 12 (dead_code) counted any comment whose first word was MOVE|COMPUTE|IF|PERFORM|CALL|EXEC, so prose such as * Move the piece or *> If king moved, clear both rights counted as commented-out code. It now requires what follows the marker to have the statement's shape: MOVE x TO y (or a continued MOVE 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 under cobol (1324 per leg) plus 199 repo-wide rollup fields (column digests, groups, fingerprint) that derive from those cobol files. The effect is fewer dead_code hits where a comment was prose. An earlier interrupted bless left an uncommitted gpu_json.json; it was discarded and regenerated.

Gates

pr_gates.py --ratchets 9/9 pass; pr_gates.py --fast 9/9 pass (ruff 0.17.1 pinned binary); new test 33 passed; test_source_reads, test_generated_branch, test_change_classifier 70 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's dead_code rule that keys on a leading keyword, e.g. the shared-style commented-logic rules in the other per-language definitions under gitgalaxy/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_code rules, one language family per PR, each with its own strict test and golden re-bless.

Cross-repo

None.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 31, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 31, 2026 12:18
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 31, 2026 12:23
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant