Arquivo da tag: Rubocop

Error: unrecognized cop Rails found in .rubocop.yml

https://stackoverflow.com/questions/58622780/warning-unrecognized-cop-rails

Just in case you happened to copy the .rubocop.yml file from a different project like I did, in my case I just forgot to add the rubocop-rails gem, which includes the Rails/ cops.

Install it like any other gem and and require it in your .rubocop.yml file:

# Gemfile

gem 'rubocop', require: false
gem 'rubocop-rails', require: false

$ bundle install
# .rubocop.yml

require: rubocop-rails
$ rubocop

Share and Enjoy !

0Shares
0 0