Skip to content

Modernize RuboCop usage, enable performance cops, add minitest and rake cops#2205

Open
larouxn wants to merge 1 commit intorouge-ruby:masterfrom
larouxn:modernize_rubocop_usage
Open

Modernize RuboCop usage, enable performance cops, add minitest and rake cops#2205
larouxn wants to merge 1 commit intorouge-ruby:masterfrom
larouxn:modernize_rubocop_usage

Conversation

@larouxn
Copy link
Contributor

@larouxn larouxn commented Feb 4, 2026

Modernizes our RuboCop stack to latest, adds cops for Minitest and Rake, and enables rubocop-performance. It's been in the Gemfile but not enabled for seemingly years. Note, this is part 1, hence the large .rubocop_todo.yml addition. Part 2 will correct much of those newly added todos via safe auto-correction.

Note, when testing locally you'll need to update rubocop-performance if you have a previous installation.

git checkout modernize_rubocop_usage
bundle install
bundle update rubocop rubocop-performance --conservative
bundle exec rake

Requires the following (contains their commits)

@larouxn larouxn force-pushed the modernize_rubocop_usage branch 2 times, most recently from 395abc7 to 3f4534f Compare February 5, 2026 02:12
@larouxn larouxn force-pushed the modernize_rubocop_usage branch 2 times, most recently from c06731d to b2a2286 Compare February 5, 2026 12:55
uses: ruby/setup-ruby@v1
with:
ruby-version: "4.0"
ruby-version: "3.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correcting mistake made in #2207. Should use oldest support Ruby. (context)

@jneen
Copy link
Member

jneen commented Feb 13, 2026

@larouxn Thank you for your patience! I think there are some conflicts with the recently-merged #2202, if you wouldn't mind rebasing over that and re-running the fix. I can give it a shot as well if it's too much trouble.

@larouxn
Copy link
Contributor Author

larouxn commented Feb 13, 2026

👋 No worries! This PR and #2206 have been rebased.

Just one quick note, it appears we have two ostruct Gemfile entries. 😅

@larouxn larouxn force-pushed the modernize_rubocop_usage branch from acb0d8e to 62ee038 Compare February 13, 2026 03:43
@larouxn larouxn force-pushed the modernize_rubocop_usage branch from 62ee038 to e25aa9f Compare February 13, 2026 04:45
@jneen
Copy link
Member

jneen commented Feb 13, 2026

Great catch, my bad! I'll take another look.

@jneen
Copy link
Member

jneen commented Feb 13, 2026

I'm getting this error running bundle exec rake:

Running RuboCop...
Error: Failed to load plugin `rubocop-performance` because the corresponding plugin class could not be determined for instantiation.
Try upgrading it first (e.g., `bundle update rubocop-performance`).
If `rubocop-performance` is not yet a plugin, use `require: rubocop-performance` instead of `plugins: rubocop-performance` in your configuration.

For further assistance, check with the developer regarding the following points:
https://docs.rubocop.org/rubocop/plugin_migration_guide.html

Edit: looks fixed with ~> 1.26 on rubocop-performance.

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