Rubocop Template
My .rubocop.yml template as a separated ruby gem.
Thanks
This gem was inspired by percy-style. Check it out, and read an article: Share RuboCop rules across all of your repos.
Installation
Add this line to your application's Gemfile:
group :development do
gem 'rubocop-template'
endOr, for a Ruby library, add this to your gemspec:
spec.add_development_dependency 'rubocop-template'And then run:
$ bundle installUsage
Create a .rubocop.yml with the following directives:
inherit_gem:
rubocop-template: default.yml
inherit_from: .rubocop_todo.ymlNow, use rubocop through bundle exec:
$ bundle exec rubocop --auto-gen-config
$ bundle exec rubocop -aAlso you do not need to include rubocop gem directly in your application's dependences. Rubocop-template will include a specific version of rubocop automatically.