-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Unsure about correct alignment of block ends #447
Comments
Have a look here #393 |
So the solution is to not use multi-line chaining, or disable the cop? |
At the moment - that's pretty much it. This is very hard to get right in all the cases. However, I write a lot of Ruby code (obviously) and I don't have a problem with the current state of the cop. If someone manages to improve the cop to reliably support all sensible scenarios that'd be great, but it's unlikely. |
Right, I'll disable it then. Thanks. |
@jonas054 @yujinakayama Looking at this particular recurring issue, maybe we should report an offence only in situations when there's no ambiguity. While I'm obviously against writing code like the one in the example - a lot of people are not. Other suggestions are welcome! |
👍 And probably we should add a cop to check multi-line chaining with blocks? |
Good suggestions @bbatsov and @yujinakayama! We'll make the |
Sure.
Cheers, On Fri, Aug 23, 2013 at 7:15 PM, Jonas Arvidsson notifications@github.com
|
In #338 @edzhelyov talked about checking if |
Updated specs with more code examples and comments about where they come from. Also changed to |
Given the following code:
Rubocop complains with the
BlockAlignment
cop and wants me to align it as such:Is this intended behaviour? I find it's not actually better style to align it as such.
The text was updated successfully, but these errors were encountered: