A more relaxed default set of RuboCop rules.
Run:
$ gem install rentacopOr, add this line to your Gemfile:
group :test, :development do
gem 'rentacop'
endWe assume you have rubocop installed either globally:
$ gem install rubocopor in your bundle
$ bundle add rubocop --group development,testThis 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.ymlIf 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.ymlThis .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.0After creating your .rubocop.yml file, run:
$ rubocop
# or, if you do not have rubocop installed globally
$ bundle exec rubocopTo create a todo list, run:
$ rubocop --regenerate-todo