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

Style/IndentHash w/ consistent style is buggy? #1608

Closed
zenspider opened this issue Jan 27, 2015 · 4 comments
Closed

Style/IndentHash w/ consistent style is buggy? #1608

zenspider opened this issue Jan 27, 2015 · 4 comments

Comments

@zenspider
Copy link

Says this isn't indented correctly?

    options = {
               :io => $stdout,
              }
@bbatsov
Copy link
Collaborator

bbatsov commented Jan 28, 2015

Such code is commonly indented as:

options = {
  :io => $stdout,
}

Our beloved Emacs behaves like this as well. :-)

@zenspider
Copy link
Author

Our beloved emacs does both.

@jfelchner
Copy link
Contributor

👍 for this style. I honestly use both depending on the situation (usually a gut feel on what looks better based on the contents of the hash) and dislike rubocop making me unindent the hash in those situations.

@jawshooah
Copy link
Contributor

👍 and same for arrays. Example in #1609.

alexdowad added a commit to alexdowad/rubocop that referenced this issue Nov 6, 2015
bbatsov added a commit that referenced this issue Nov 6, 2015
[Fix #1608] Add 'align_braces' style for Style/IndentHash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants