Conversation
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
issyl0
approved these changes
May 27, 2025
There was a problem hiding this comment.
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::Pluginforrubocop-railsinconfig/rails.yml - Specify
RuboCop::Performance::Pluginforrubocop-performanceinconfig/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:
Member
|
Neat! I didn't know you could do that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows rubocop to be run in bundler standalone mode. Without specifying the plugin class name, rubocop errors out with:
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