-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Multi line conditionals assignment indentation #179
Comments
Actually I think it should be like this: result = if a.empty?
else
end Hmm, the |
Maybe this should be added as a rule if we can get the indentation correct :-) |
Tsagadai
pushed a commit
to Tsagadai/ruby-style-guide
that referenced
this issue
Oct 13, 2014
marocchino
pushed a commit
to marocchino/ruby-style-guide
that referenced
this issue
Aug 11, 2015
shyouhei
pushed a commit
to shyouhei/ruby-style-guide
that referenced
this issue
Nov 11, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, checking the guide, I didn't find mentions to conditional assignment indentation. Should it be like this:
or this:
I for instance prefer the first one, since it doesn't require realigning the whole thing when the variable name changes, it is closer to the block syntax and it doesn't create a weird whitespace hole on the left side. But this seems to go against the
case
example provided on the guide:I know
case
is an edge case (oh), but this may get people confused.What do you think?
The text was updated successfully, but these errors were encountered: