Skip to content

Update RuboCop#9514

Merged
mitchellhenke merged 4 commits intomainfrom
mitchellhenke/update-rubocop-rspec
Nov 1, 2023
Merged

Update RuboCop#9514
mitchellhenke merged 4 commits intomainfrom
mitchellhenke/update-rubocop-rspec

Conversation

@mitchellhenke
Copy link
Contributor

🛠 Summary of changes

This PR updates rubocop-performance and enables some of the newer rules based on recommendations in standardrb.

@mitchellhenke mitchellhenke requested a review from a team November 1, 2023 19:06
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Performance/StringIdentifierArgument:
Enabled: true

Performance/StringInclude:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the changes are due to this rule. It is not strictly backwards compatible since symbols and nil would work for the old format of %r{/pattern/}.match?(nil) or %r{/pattern/}.match?(:pattern). It didn't look like our usages would break due to this though (and we probably want to skip the match anyway in the nil case).

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
@mitchellhenke mitchellhenke merged commit 331e633 into main Nov 1, 2023
@mitchellhenke mitchellhenke deleted the mitchellhenke/update-rubocop-rspec branch November 1, 2023 19:56
@amirbey amirbey mentioned this pull request Nov 2, 2023
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.

3 participants