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
Remove (or disable) Style/BracesAroundHashParameters #7641
Comments
I agree with @pocke. I think this proposal makes sense for future Ruby 3. And I think the cop should be removed to smooth the transition from Ruby 2 to Ruby 3. |
Yeah, agreed. Let's remove it. |
Remove obsolete cop: rubocop/rubocop#7641
Revert "Remove obsolete cop: rubocop/rubocop#7641"
Revert "Revert "Remove obsolete cop: rubocop/rubocop#7641""
This cop is not necessary due to this: - rubocop/rubocop#7641 - https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
- As of RuboCop 0.80, this has [been removed](rubocop/rubocop#7641) for compatibility with Ruby 2.7 and later.
Hi @pocke! Currently the |
Since version ~0.80, rubocop now warns you about new rules and you have to explicitly enable or disable them. I reviewed each of these rules and decided to keep them, primarily because I either liked what the rule did or it was trivial, autocorrectable, and I trust the rubocop/rails community. I’m open to changing any of the rules if they prove problematic. Docs: https://docs.rubocop.org/rubocop/0.85/versioning.html#pending-cops I tried upgrading to the latest version (0.86), but that resulted in some gem version conflicts that would’ve required upgrading capyabara, which I already decided I don’t want to deal with yet: charitywater/maji@dd9d67e BracesAroundHashParameters was removed: rubocop/rubocop#7641 [#172410772]
Since version ~0.80, rubocop now warns you about new rules and you have to explicitly enable or disable them. I reviewed each of these rules and decided to keep them, primarily because I either liked what the rule did or it was trivial, autocorrectable, and I trust the rubocop/rails community. I’m open to changing any of the rules if they prove problematic. Docs: https://docs.rubocop.org/rubocop/0.85/versioning.html#pending-cops I tried upgrading to the latest version (0.86), but that resulted in some gem version conflicts that would’ve required upgrading capyabara, which I already decided I don’t want to deal with yet: charitywater/maji@dd9d67e BracesAroundHashParameters was removed: rubocop/rubocop#7641 [#172410772]
Agree with what @deivid-rodriguez said, it would be awesome if Also, see #1451 |
BracesAroundHashParameters has been removed due to updated standards for ruby. More info found at: rubocop/rubocop#7641
Fixes version to avoid sudden CI failures. Removed Style/BracesAroundHashParameters cop. See: rubocop/rubocop#7641
Fixes version to avoid sudden CI failures. Removed Style/BracesAroundHashParameters cop. See: rubocop/rubocop#7641
Fixes version to avoid sudden CI failures. Removed Style/BracesAroundHashParameters cop. See: rubocop/rubocop#7641
The Style/BracesAroundHashParameters was removed from Rubocop. See the following issue for more info: rubocop/rubocop#7641
* enable all new cops by default * Style/BracesAroundHashParameters was removed - see rubocop/rubocop#7641 * LineLength changed group from Metrics to Layout * disable Gemspec/RequireMFA
* enable all new cops by default * Style/BracesAroundHashParameters was removed - see rubocop/rubocop#7641 * LineLength changed group from Metrics to Layout * disable Gemspec/RequireMFA
* enable all new cops by default * Style/BracesAroundHashParameters was removed - see rubocop/rubocop#7641 * LineLength changed group from Metrics to Layout * disable Gemspec/RequireMFA * autocorrect explicit block over yield
* enable all new cops by default * Style/BracesAroundHashParameters was removed - see rubocop/rubocop#7641 * LineLength changed group from Metrics to Layout * disable Gemspec/RequireMFA * autocorrect explicit block over yield Co-authored-by: Andrew Hayworth <ahayworth@gmail.com>
Fixes version to avoid sudden CI failures. Removed Style/BracesAroundHashParameters cop. See: rubocop/rubocop#7641
Fixes version to avoid sudden CI failures. Removed Style/BracesAroundHashParameters cop. See: rubocop/rubocop#7641
Since Ruby 2.7, the existence of curly braces on the last argument has meaning.
It means, the following codes have different meanings.
There are the correct pairs of method definitions and method calls.
For more detail https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
So I propose removing the cop. I think we should disable the cop by default at least.
Expected behavior
Remove or disable the cop.
Actual behavior
It's available.
Steps to reproduce the problem
nothing
RuboCop version
master
The text was updated successfully, but these errors were encountered: