Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: complex IfStmt false negatives #94

Merged
merged 3 commits into from
Jun 5, 2024

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
4 of 5 checks passed
@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