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

Update to rubocop 1.59 [NTC-130] #56

Merged
merged 5 commits into from
Jan 3, 2024

Conversation

ric2b
Copy link
Contributor

@ric2b ric2b commented Dec 18, 2023

Problem

The current underlying version of rubocop doesn't support Ruby 3.3.

image

Solution

Bump the rubocop version to one that supports Ruby 3.3 (1.46+). Since we're upgrading we might as well upgrade to the latest version.

Blocking https://github.com/salsify/con-u/pull/5195

Prime: @erikkessler1 @jturkel
CC: @salsify/network-core

@ric2b ric2b self-assigned this Dec 18, 2023
@ric2b ric2b marked this pull request as ready for review January 3, 2024 12:58
@ric2b ric2b requested a review from a team as a code owner January 3, 2024 12:58
@@ -70,3 +70,4 @@ workflows:
- "3.0.0"
- "3.1.1"
- "3.2.0"
- "3.3.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could drop Ruby 2.7 support while we're at it as 2.7 is EOL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The underlying rubocop version still supports it, so I think we might as well keep it as long as it doesn't hurt the maintenance of this gem.

Dropping support for ruby 2.7 might actually make it harder to move a project from 2.7 to 3+, since instead of bumping rubocop, fixing things and then bumping ruby, you are forced to either bump both of them together or go through 2 rubocop version upgrades.

Copy link
Member

@jturkel jturkel left a comment

Choose a reason for hiding this comment

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

Are there any new cops in the updated version of Rubocop that we want to proactively enable or explicitly disable?

@ric2b
Copy link
Contributor Author

ric2b commented Jan 3, 2024

Not sure, it's a very long list since 1.43: https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md

I guess I can try running this locally on con-u and give my opinion on any new complaints that I personally disagree with, but not sure how to arrive at a final list without reviewing all the new ones with some sort of committee.

@jturkel
Copy link
Member

jturkel commented Jan 3, 2024

That is a long list. We can always defer this analysis after releasing/unblocking Ruby 3.3 support. The process for enabling/disabling cops is documented here. We're also very open to suggestions on how to evolve this process if you have ideas.

@ric2b ric2b merged commit 4204db5 into master Jan 3, 2024
2 checks passed
@ric2b ric2b deleted the NTC-130-update-to-rubocop-1.59-to-support-ruby-3.3 branch January 3, 2024 16:08
@ric2b
Copy link
Contributor Author

ric2b commented Jan 4, 2024

@jturkel On con-u I didn't find any new complaints that I thought should be disabled. With the exception of Style/HashEachMethods, but actually it's already disabled by default but was enabled on con-u's configuration.

@ric2b
Copy link
Contributor Author

ric2b commented Feb 1, 2024

Looks like I found one after all: #57

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