Skip to content

Conversation

@mgriffin
Copy link
Contributor

This allows rubocop to be run in bundler standalone mode. Without specifying the plugin class name, rubocop errors out with:

Error: Failed to load plugin rubocop-performance because the corresponding plugin class could not be determined for instantiation.

This is because it's trying to load the gem to find the name, but is unable to.

Setting the class name doesn't affect running rubocop through bundler, it will still work properly

This allows rubocop to be run in bundler standalone mode. Without
specifying the plugin class name, rubocop errors out with:

> Error: Failed to load plugin `rubocop-performance` because the corresponding plugin class could not be determined for instantiation.

This is because it's trying to load the gem to find the name, but is
unable to.

Setting the class name doesn't affect running rubocop through bundler,
it will still work properly
@mgriffin mgriffin self-assigned this May 27, 2025
Copilot AI review requested due to automatic review settings May 27, 2025 15:06
@mgriffin mgriffin requested a review from a team as a code owner May 27, 2025 15:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds explicit plugin_class_name entries for RuboCop plugins so they can be loaded in bundler standalone mode without lookup errors.

  • Specify RuboCop::Rails::Plugin for rubocop-rails in config/rails.yml
  • Specify RuboCop::Performance::Plugin for rubocop-performance in config/default.yml

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
config/rails.yml Added plugin_class_name under rubocop-rails plugin
config/default.yml Added plugin_class_name under rubocop-performance
Comments suppressed due to low confidence (1)

config/default.yml:8

  • Consider adding a CI test that invokes RuboCop in bundler standalone mode to verify plugin loading with the explicit plugin_class_name, preventing future regressions.
+  - rubocop-performance:

@composerinteralia
Copy link
Member

Neat! I didn't know you could do that

@mgriffin mgriffin merged commit e71daca into main May 27, 2025
10 checks passed
@mgriffin mgriffin deleted the mgriffin/specify branch May 27, 2025 17:10
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.

4 participants