Skip to content

Upgrade Rubocop to latest version#8910

Merged
aduth merged 2 commits intomainfrom
aduth-rubocop-1-55
Aug 1, 2023
Merged

Upgrade Rubocop to latest version#8910
aduth merged 2 commits intomainfrom
aduth-rubocop-1-55

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Aug 1, 2023

🛠 Summary of changes

Upgrades Rubocop to the latest version.

I noticed in #8909 that my local precommit Rubocop check was flagging some preexisting issues in spec/presenters/webauthn_setup_presenter_spec.rb. It turns out that newer versions of Rubocop have some improvements for catching unintended issues:

  • Extra spacing
  • Duplicate keys in hashes
  • Doubled arguments parentheses

The newer version would have also started enforcing anonymous arguments forwarding, but I chose to disable this as a stylistic preference.

For example, this:

def select_2fa_option(option, **find_options)
find("label[for='two_factor_options_form_selection_#{option}']", **find_options).click

...would have been enforced as:

    def select_2fa_option(option, **)
      find("label[for='two_factor_options_form_selection_#{option}']", **).click

📜 Testing Plan

  1. bundle
  2. rubocop

aduth added 2 commits August 1, 2023 09:20
changelog: Internal, Linting, Upgrade Rubocop to latest version
@aduth aduth merged commit 3a5b568 into main Aug 1, 2023
@aduth aduth deleted the aduth-rubocop-1-55 branch August 1, 2023 19:05
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

Successfully merging this pull request may close these issues.

2 participants