Reusable RuboCop configuration for CargoSense's Ruby projects.
Add rubocop-cargosense to your project's Gemfile
and run bundle install
:
gem "rubocop-cargosense", require: false
Include rubocop-cargosense in your project's .rubocop.yml
using RuboCop's require
directive:
# .rubocop.yml
require:
- rubocop-cargosense
Tip
If rubocop-cargosense is your project's only RuboCop extension, you can simplify the above directive: require: rubocop-cargosense
Or, inherit rubocop-cargosense's default configuration using RuboCop's inherit_gem
directive:
# .rubocop.yml
inherit_gem:
rubocop-cargosense: config/default.yml
You may also inherit individual configuration files from rubocop-cargosense:
# .rubocop.yml
inherit_gem:
rubocop-cargosense:
- config/rubocop-layout.yml
- config/rubocop-performance.yml
Warning
While the above piecemeal usage is permissible, we recommend requiring the default configuration in its entirety.
rubocop-cargosense is freely available under the MIT License.