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

check for if-blocks with boolean literals for both branches #217

wants to merge 2 commits into
base: master


Copy link

commented Oct 9, 2019

hey! i saw #200 and wanted to get more familiar with this repo.

here, we check for situations where both branches of an if are a boolean literal e.g.

if <condition> then


i attempted to find unnecessary comparisons like if <condition> == True, but i couldn't figure out the pattern match. it also made me wonder if we should look for if <condition> == True or more generally just <condition> == True in all expressions, since such a comparison is unnecessary regardless of the if context.

potentially, that's a separate check or maybe this check should be expanded to address it. regardless, i was looking at this last night, but i wanted to get some feedback before proceeding. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.