We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi everyone
Can you extract rubocop rules into separate gem? https://github.com/anycable/anycable-rails/tree/master/lib/anycable/rails/compatibility
I have a separate group for rubocop inside my Gemfile:
# ... gem 'anycable-rails' # ... group :development, :rubocop do gem 'rubocop', require: false gem 'rubocop-performance', require: false gem 'rubocop-rails', '~> 2.15', '>= 2.15.2', require: false end # ...
And the following rubocop config:
# ... require: - rubocop-rails - rubocop-performance - 'anycable/rails/compatibility/rubocop' # ...
CI is configured to install only gems needed for rubocop:
BUNDLE_ONLY=rubocop bundle install
Unfortunately the rubocop itself doesn't work with this setup
bundle exec rubocop
because the anycable-rails is not installed cannot load such file -- anycable/rails/compatibility/rubocop
cannot load such file -- anycable/rails/compatibility/rubocop
So, now I should do something like this to make it work
# ... group :development, :rubocop do gem 'rubocop', require: false gem 'rubocop-performance', require: false gem 'rubocop-rails', '~> 2.15', '>= 2.15.2', require: false end group :development, :test, :production, :rubocop do gem 'anycable-rails' end # ...
Ideally, I would expect to have this inside of my Gemfile
# ... gem 'anycable-rails' # ... group :development, :rubocop do gem 'rubocop', require: false gem 'rubocop-performance', require: false gem 'rubocop-rails', '~> 2.15', '>= 2.15.2', require: false gem 'rubocop-anycable', require: false end # ...
And this rubocop config
# ... require: - rubocop-rails - rubocop-performance - rubocop-anycable # ...
Separate gem will allow me to not load the full gem for the lining step on my CI and keep my Gemfile cleaner.
The text was updated successfully, but these errors were encountered:
Hey!
Thanks for the detailed explanation. Makes sense to me. Will work on it after RailsConf (or at RailsConf).
Sorry, something went wrong.
Done. Now you should be able to install AnyCable cops via rubocop-anycable-rails.
rubocop-anycable-rails
No branches or pull requests
Hi everyone
Can you extract rubocop rules into separate gem?
https://github.com/anycable/anycable-rails/tree/master/lib/anycable/rails/compatibility
The problem
I have a separate group for rubocop inside my Gemfile:
And the following rubocop config:
CI is configured to install only gems needed for rubocop:
Unfortunately the rubocop itself doesn't work with this setup
bundle exec rubocop
because the anycable-rails is not installed
cannot load such file -- anycable/rails/compatibility/rubocop
Workaround
So, now I should do something like this to make it work
What do I expect?
Ideally, I would expect to have this inside of my Gemfile
And this rubocop config
Separate gem will allow me to not load the full gem for the lining step on my CI and keep my Gemfile cleaner.
The text was updated successfully, but these errors were encountered: