= Rubomatic
Gem for shared rubocop config and custom cops for BrandsInsurance
Put your Ruby code in the file lib/rubocop/rubomatic
.
To experiment with that code, run
bin/console
for an interactive prompt.
== Installation
Add this line to your application's Gemfile:
[source,ruby]
gem 'rubocop-rubomatic', require: false
And then execute:
$ bundle install
Or install it yourself as:
$ gem install rubocop-rubomatic
== Usage
Add the following to your .rubocop.yml
config file
[source,yaml]
inherit_gem:
rubocop-rubomatic: config/rubocop.yml
If you need to override a setting:
[source,yaml]
Add to Naming/VariableNumber.AllowedIdentifiers
inherit_gem:
rubocop-rubomatic: config/rubocop.yml
Naming/VariableNumber:
inherit_mode:
merge:
- AllowedIdentifiers
AllowedIdentifiers:
- street_2
[source,yaml]
Completely override Naming/VariableNumber.AllowedIdentifiers
inherit_gem:
rubocop-rubomatic: config/rubocop.yml
Naming/VariableNumber:
inherit_mode:
override:
- AllowedIdentifiers
AllowedIdentifiers:
- street_2
== Custom Cops
Add Rubomatic/*
cops to your .rubocop.yml
config file
[source,yaml]
Rubomatic/Style/DisallowedMethods:
Enabled: true
== Departments
- xref:./docs/cops/layout/README.adoc[
Layout
] - xref:./docs/cops/style/README.adoc[
Style
]
== Contributing
See xref:./CONTRIBUTING.adoc[CONTRIBUTING] for how to add your own rule
== Changelog
See xref:./CHANGELOG.adoc[CHANGELOG] see see changes * xref:./docs/cops/super_cool/README.adoc[SuperCool
]