Skip to content

Conversation

spencerschrock
Copy link
Contributor

@spencerschrock spencerschrock commented Jun 4, 2024

Closes: #93

Looking for *ast.BinaryExpr allowed me to combine handling of the IfStmt, ForStmt and some of the SwitchStmt logic. The code still needs to look for SwitchStmt to handle forms which have a tag expression

The new and existing tests pass, but I hope using ast.BinaryExpr isn't too broad that it introduces false positives.

Signed-off-by: Spencer Schrock <sschrock@google.com>
This represents a more general case of IfStmt, ForStmt and SwitchStmt

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
@sashamelentyev
Copy link
Owner

Thank you!

LGTM

@sashamelentyev sashamelentyev merged commit 5149298 into sashamelentyev:main Jun 5, 2024
@spencerschrock spencerschrock deleted the fix-complex-if branch June 5, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StatusCode false negatives for more complex IfStmt
2 participants