We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Rubocop will always enforce ruby's 3.1 hash key shorthand syntax by default. Do we want to change the default behavior?
The Hash Literal Values says this is good. For what its worth, Standard is set to either.
Weak opinion: My preference would be to set it to either. Allow its use but not require it.
The text was updated successfully, but these errors were encountered:
We have already set it to either in #365 👍
either
ruby-style-guide/rubocop.yml
Lines 487 to 488 in 5f9071c
Sorry, something went wrong.
Allow but don't require omitting hash values
6dbec51
Ruby 3.1 added some syntax sugar for omitting hash values in certain cases. This results in more terse code, at the expense of readability. Like any good style change, this is obviously bikeshed worthy, and has generated a lot of controversy around the community: * https://batsov.com/articles/2022/01/20/bad-ruby-hash-value-omission/ * standardrb/standard#375 * Shopify/ruby-style-guide#393 * https://github.com/rubocop/ruby-style-guide#hash-literal-values Personally, I can see places where it's useful, but also places where it just makes the Ruby a bit more inscrutable. So set the Rubocop value to `either` to allow, but not require it.
No branches or pull requests
Rubocop will always enforce ruby's 3.1 hash key shorthand syntax by default. Do we want to change the default behavior?
The Hash Literal Values says this is good.
For what its worth, Standard is set to either.
Weak opinion: My preference would be to set it to either. Allow its use but not require it.
The text was updated successfully, but these errors were encountered: