A more relaxed default set of RuboCop rules.
Run:
$ gem install rentacop
Or, add this line to your Gemfile:
group :test, :development do
gem 'rentacop'
end
We assume you have rubocop installed either globally:
$ gem install rubocop
or in your bundle
$ bundle add rubocop --group development,test
This gem contains two rule sets:
- Global rubocop rules in rentacop.yml
- RSpec rubocop rules in rspec.yml
If you are not using RSpec, add the following to the top of your .rubocop.yml
:
inherit_gem:
rentacop: rentacop.yml
If you are using rubocop-rspec, and wish to include the RSpec rules from this repository, add this instead:
require: rubocop-rspec
inherit_gem:
rentatop:
- rentacop.yml
- rspec.yml
This .rubocop.yml
contains our full recommended configuration:
# .rubocop.yml
require:
- rubocop-performance
- rubocop-rspec
inherit_gem:
rentacop:
- rentacop.yml
- rspec.yml
inherit_mode:
merge:
- Exclude
- Include
AllCops:
TargetRubyVersion: 3.0
After creating your .rubocop.yml
file, run:
$ rubocop
# or, if you do not have rubocop installed globally
$ bundle exec rubocop
To create a todo list, run:
$ rubocop --regenerate-todo