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

Short circuiting idiom to if conversion #759

Closed
chriselrod opened this issue Sep 21, 2023 · 2 comments
Closed

Short circuiting idiom to if conversion #759

chriselrod opened this issue Sep 21, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@chriselrod
Copy link
Contributor

It would be great if we could have an option to automatically convert

b0 && foo()
b1 || bar()

into

if b0
    foo()
end
if !b1
    bar()
end

This is a style that is often preferred for being able to tell whether a branch is taken in code coverage, so it'd be great if it can be enforced.

@domluna
Copy link
Owner

domluna commented Sep 28, 2023

i think this would be a good option to have

@ericphanson
Copy link

xref #382

@domluna domluna closed this as completed Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants