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/SingleArgumentDig #48742

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Oct 19, 2022

This is a simple one; quoting from the documentation:

Sometimes using dig method ends up with just a single argument. In such cases, dig should be replaced with [].

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

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

This is a simple one; quoting from [the
documentation](https://www.rubydoc.info/gems/rubocop/1.13.0/RuboCop/Cop/Style/SingleArgumentDig):

> Sometimes using dig method ends up with just a single argument. In such cases, dig should be replaced with [].

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

- https://docs.rubocop.org/rubocop/cops_style.html#stylesingleargumentdig
- https://www.rubydoc.info/gems/rubocop/1.13.0/RuboCop/Cop/Style/SingleArgumentDig
@Hamms Hamms marked this pull request as ready for review October 27, 2022 22:17
@Hamms Hamms requested review from a team October 27, 2022 22:17
@Hamms Hamms merged commit 02691f8 into staging Oct 27, 2022
@Hamms Hamms deleted the fix-Style/SingleArgumentDig branch October 27, 2022 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants