Skip to content

Over-haul/rubocop-overhaul

Repository files navigation

Rubocop::Overhaul

Base Rubocop configurations and custom cops used at Overhaul.

Installation

Install the gem and add to the application's Gemfile by executing:

group :development do
  gem 'rubocop', require: false
  source "https://rubygems.pkg.github.com/Over-haul" do
    gem "rubocop-overhaul", require: false
  end
end

To enable our custom configuration:

inherit_gem:
  rubocop-overhaul:
    - oh_defaults/rubocop.yml
    - oh_defaults/rubocop-rails.yml # optional
    - oh_defaults/rubocop-rspec.yml # optional
    - oh_defaults/rubocop-factory_bot.yml # optional

Development

To create a new cop, you can execute:

bundle exec rake new_cop[Overhaul/SomeCopName]

If you need help at creating a custom cop, please have a look at these resources: