Is there a way to always enable rubocop rails cops via the config? I know I can run them via -R
, but I'd like to make sure, that they are run when I just call rubocop
alone.
Things have changed a bit since the last answer:
Rubocop team wanted to separate rails from the core of rubocop (which I think is great).
See this issue and this PR for more information.
So the new way of using Rails cops in Rubocop is by installing ruboco-rails gem.
Then in .rubocop.yml
simply add:
require: rubocop-rails
Details here.
Enjoy!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With