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

Fix Violations of and Reenable Style/HashAsLastArrayItem #51498

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Apr 24, 2023

Checks for presence or absence of braces around hash literal as a last array item depending on configuration.

This feels particularly relevant as we prepare for an update to Ruby 3.0, in which implicit hashes as the last argument of a method call was deprecated.

Fix applied automatically with bundle exec rubocop --auto-correct-all --only Style/HashAsLastArrayItem

Links

> Checks for presence or absence of braces around hash literal as a last array item depending on configuration.

This feels particularly relevant as we prepare for an update to Ruby 3.0, in which [implicit hashes as the last argument of a method call was deprecated.](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)

Fix applied automatically with `bundle exec rubocop --auto-correct-all --only Style/HashAsLastArrayItem`

- https://docs.rubocop.org/rubocop/cops_style.html#stylehashaslastarrayitem
- https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/HashAsLastArrayItem
@Hamms Hamms added code-hygiene Ruby Update Everything related to work to update the version of Ruby our codebase runs on labels Apr 24, 2023
@Hamms Hamms marked this pull request as ready for review April 25, 2023 00:31
@Hamms Hamms requested review from a team April 25, 2023 00:31
@Hamms Hamms merged commit 960e2e5 into staging Apr 25, 2023
2 checks passed
@Hamms Hamms deleted the fix-Style/HashAsLastArrayItem branch April 25, 2023 17:39
@Hamms Hamms mentioned this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-hygiene Ruby Update Everything related to work to update the version of Ruby our codebase runs on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants