Gem for shared rails rubocop config and custom rails cops for BrandsInsurance

Put your Ruby code in the file lib/rubocop/rubomatic-rails. To experiment with that code, run bin/console for an interactive prompt.

Installation

Add this line to your application’s Gemfile:

gem 'rubocop-rubomatic-rails', require: false

And then execute:

$ bundle install

Or install it yourself as:

$ gem install rubocop-rubomatic-rails

Usage

Add the following to your .rubocop.yml config file

inherit_gem:
  rubocop-rubomatic-rails: config/rubocop.yml

If you need to override a setting:

# Add to Naming/VariableNumber.AllowedIdentifiers
inherit_gem:
  rubocop-rubomatic-rails: config/rubocop.yml

Naming/VariableNumber:
  inherit_mode:
    merge:
      - AllowedIdentifiers
  AllowedIdentifiers:
    - street_2
# Completely override Naming/VariableNumber.AllowedIdentifiers
inherit_gem:
  rubocop-rubomatic-rails: config/rubocop.yml

Naming/VariableNumber:
  inherit_mode:
    override:
      - AllowedIdentifiers
  AllowedIdentifiers:
    - street_2

Custom Cops

Add RubomaticRails/* cops to your .rubocop.yml config file

RubomaticRails/Style/DisallowedMethods:
  Enabled: true

Departments

None yet

Contributing

See CONTRIBUTING for how to add your own rule

Changelog

See CHANGELOG see see changes