Repository navigation
CodeQL: initialise the 4 py/uninitialized-local-variable locals (Part of #7153) - #7239
Merged
Merged
Conversation
…citly (Part of #7153) All four were false positives (NoReturn calls / same-guard def and call CodeQL cannot follow); no behaviour change, goldens unchanged. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
Contributor
|
No description provided. |
1 similar comment
Contributor
|
No description provided. |
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 #7153. Checklist: done [c:d63a0a9e]
Reviews the 4 open
py/uninitialized-local-variablealerts (#1536, #1409, #1408, #891). All four are false positives: CodeQL does not see thatpytest.skip/ap.errordo not return, nor that a nesteddefand its call share one guard. Each local is now initialised explicitly; behaviour is unchanged.tests/cobol_mainframe/test_det_layout.py:records = []before thetry.tests/tools/phase_ab.py:leg_envinitialised before thetry.tests/tools/harness_report.py:raise SystemExit(2)afterap.error.gitgalaxy/core/prism.py:mask_perl = None, set after the nested def, called underif mask_perl is not None.Class / Sibling gaps
Class: a local assigned in one branch and read later, where the other branch exits through a call or guard CodeQL cannot follow. All four open members of the rule are fixed here. Sibling gaps: none (no other open alert of this rule; no sweep for unflagged same-pattern code). No burned-estate program is involved.
Facts checked:
pr_gates --fast9/9 pass;crucible_check.py(both legs, no--update) passes with zero golden diff;test_phase_ab_evict,test_harness_report,test_det_layoutand the perl extraction tests pass (det_layout Docker cases skip without Docker). Not run:--ratchets(no ratchet input changed).🤖 Generated with Claude Code