SONARPY-4544 Count terminal raises as exits - #2296
SONARPY-4544 Count terminal raises as exits#2296erwan-leforestier-sonarsource wants to merge 6 commits into
Conversation
asya-vorobeva
left a comment
There was a problem hiding this comment.
LGTM, with a minor suggestion.
| } | ||
|
|
||
| private static void collectBranchingBlock(List<LatestExecutedBlock> collectedBlocks, PythonCfgBranchingBlock branchingBlock) { | ||
| private static Set<CfgBlock> reachableBlocks(CfgBlock start) { |
There was a problem hiding this comment.
Why we don't extract this method to existing CfgUtils (and reuse it in unreachableBlocks)?
|
Hey there, |
Code Review ✅ Approved 1 resolved / 1 findingsTreats terminal raise control flow graph edges as exits for rule S3516, addressing the missing reachability filter on except/finally predecessors. No issues found. ✅ 1 resolved✅ Edge Case: Reachability filter not applied to except/finally predecessors
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Summary
Treat terminal
raiseCFG edges as exits for S3516, preventing reports on validator-style methods that either return a common value or raise.Changes
Functional Validation
Artifact: sonarpy-4544-fv.zip
Once the file is attached to the PR description, unzip and run:
./run.sh
Expected output: