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

Layout/SpaceInsideBlockBraces is unnecessarily stricter than the style guide #66

Open
osyoyu opened this issue Jul 21, 2020 · 1 comment

Comments

@osyoyu
Copy link
Contributor

osyoyu commented Jul 21, 2020

The Ruby style guide explicitly allows both of the following styles. The official Rubocop configuration accepts only the latter.

# good
[1, 2, 3].each {|num| puts num }
[1, 2, 3].each { |num| puts num }

There seems no way exists to allow both styles without entirely disabling Layout/SpaceInsideBlockBraces (unwanted styles such as [1, 2, 3].each{|foo| bar} will also be allowed).
Is that an option?

@osyoyu
Copy link
Contributor Author

osyoyu commented Jul 21, 2020

Maybe I can send a pull request to Rubocop

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

1 participant