0.0
The project is in a healthy, maintained state
RuboCop configuration for our Ruby on Rails projects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Project Readme

DBL Rubocop

Test

RuboCop configuration for our Ruby on Rails projects.

Official RoR RuboCop Configuration.

Releases are published to RubyGems.

Installation

group :development, :test do
  gem 'rubocop-dbl'
end

Setup

run

rails generate rubocop_dbl:install

or manually Aad this line to your application's .rubocop.yml:

When using Rails:

require:
  - rubocop-rails

inherit_gem:
  rubocop-dbl:
    - config/dbl.yml
    - config/cops/rails.yml

When not using Rails:

inherit_gem:
  rubocop-dbl:
    - config/dbl.yml

Configuration

TargetRubyVersion

We only support the latest 2 versions of ruby, which is currently >= 2.7. We only support the latest 2 versions of rails, which is currently >= 6.0. See test.yml for details.

If you'd like to change TargetRubyVersion, see Customization.

Customization

If you'd like to customize the rubocop setting on your project, you can override it.

For example, if you want to change TargetRubyVersion, you can do it like:

# .rubocop.yml
inherit_gem:
  rubocop-dbl:
    - config/dbl.yml

# Override Setting
AllCops:
  TargetRubyVersion: 2.7.2

Build & install gem locally

gem build rubocop-dbl.gemspec
gem install rubocop-dbl-0.1.0.gem

Publish on RubyGems

bin/release

will guide you through the process.