Base Rubocop settings for all Boxt Ruby projects.
- Ruby >= 2.7
Add this line to your application's Gemfile:
group :development, :test do # ... gem "boxt_rubocop" end
And then execute:
.rubocop.yml file to the root of your project with the following settings:
inherit_gem: boxt_rubocop: - default.yml # use default cops - rails.yml # use Rails cops - see Additional Extensions/Cops - rspec.yml # use rspec cops - see Additional Extensions/Cops
NewCops is enabled by default.
The following Rubocop gems are also installed with this gem:
To enable these add the following to your
inherit_gem: boxt_rubocop: # .... add cops require: - rubocop-faker # if your project is using the Faker gem then add this - rubocop-rails # if your project is a Rails app/engine then add this, plus the - rails.yml setting above - rubocop-rake # if your project is using rake then add this - rubocop-rspec # if your project is using rspec then add this, plus the - rspec.yml setting above
There are also some useful Rubocop editor plugins to help with in-editor linting.
Bug reports and pull requests are welcome on GitHub at https://github.com/boxt/boxt_rubocop.
The gem is available as open source under the terms of the MIT License.