-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Autofix Rubocop Layout rules - Batch 4 #321
base: develop
Are you sure you want to change the base?
Conversation
I noticed that arrays are expected to have no spaces next to the brackets yet hash maps expect spaces. That seems inconsistent to me. Can we be consistent in that regard? It doesn't matter to me which one is selected but consistent would be better. |
8dca179
to
7f1e2ec
Compare
I added the Rubocop dev dependency and gave this a rebase after the 2.7 bump included the If there are particular styles you don't like, if you comment on the line, I can try and look up the rule the changed it and if there is an |
@@ -21,7 +21,7 @@ def to_s | |||
end | |||
end | |||
|
|||
obj = Classy.new(23, ['abc', {x: true}]) | |||
obj = Classy.new(23, ['abc', { x: true }]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect example of a mix of spaces after brackets and no space. I prefer consistent behaviour between []
and {}
. Happy to go with either but not a mix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe tight, no spaces after [
or {
or before ]
or }
is best if there is no overriding consensus.
540bef5
to
8135253
Compare
8135253
to
3d12665
Compare
Forth run a the autofixing the Layout related Rubocop rules.
Most of these have options allowing overriding specific things if they style isn't preffered.
This is the last of the Layout, except for the 2 that were removed from the last batch