Rubocop
Adds rubocop to your rails app.
Used 101 times
E
Erik Jenks
Usage
This allows you to add rubocop to your project with the following options:
- run the default rubocop --auto-gen-config, which creates .rubocop.yml and .rubocop_todo.yml
OR
- adds an empty .rubocop.yml file for greater flexibility
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/XE5sl5"
Template Source
Review the code before running this template on your machine.
gem_group :development do
gem 'rubocop', require: false
end
run 'bundle'
if yes?('Do you want to run the auto-generate configuration?')
run "rubocop --auto-gen-config"
else
run 'touch .rubocop.yml'
end