-
Notifications
You must be signed in to change notification settings - Fork 402
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 rules for indenting multiline assignments #723
Conversation
👍 |
Do you mind also adding in to thoughtbot's config? |
@salbertson What are your thoughts on also making this change in default? It would mean drifting away from RuboCop's default, but this is really an ugly setting. I fear I might be getting too personally attached to the defaults. |
@gylaz, I don't think we should be affecting existing users by updating defaults, unless we think it's important enough and we communicate the change to everyone. |
@Graysonwright, should this be added to the thoughtbot config too? Maybe in a different PR? This looks good to me. 👍 |
603bad8
to
d14104b
Compare
Based on discussion in: - https://trello.com/c/8plKSKKM - #723
Based on discussion in: - https://trello.com/c/8plKSKKM - #723
Our styleguide is not updated for this https://github.com/thoughtbot/guides/blob/master/style/README.md#formatting ping @thoughtbot/hound @jferris @Graysonwright |
@teoljungberg Just to clarify you prefer: users = User.where(email: '[email protected]').
update(user_parameters) This PR changes this to favor: users = User.where(email: '[email protected]').
update(user_parameters) And while it might not be explicitly in our guides, 99% of thoughtbot code follows the latter. |
Actually, we do have a guideline for it:
|
Actually no, this rule enforces this style (sorry for a shitty example, typing from my phone) users = Users. Teo Ljungberg
|
@teoljungberg Can you clarify where you're getting your information from? This comment rubocop/rubocop#1633 (comment) seems to be inline with what I've said, and the general spirit of this PR. |
@gylaz I pinged you in the repo where we have the problem |
I don't know what's going on on that related PR. I've added unit tests for this setting in #772. |
https://trello.com/c/8plKSKKM
See rubocop/rubocop#1633