Skip to content

Instantly share code, notes, and snippets.

@jcarley
Last active December 4, 2020 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcarley/f20f949c8f75bbc46defbd500d0f21f2 to your computer and use it in GitHub Desktop.
Save jcarley/f20f949c8f75bbc46defbd500d0f21f2 to your computer and use it in GitHub Desktop.
Boilerplate Rubocopy yaml file
# The behavior of RuboCop can be controlled via the .rubocop.yml
# configuration file. It makes it possible to enable/disable
# certain cops (checks) and to alter their behavior if they accept
# any parameters. The file can be placed either in your home
# directory or in some project directory.
#
# RuboCop will start looking for the configuration file in the directory
# where the inspected file is and continue its way up to the root directory.
#
# See https://docs.rubocop.org/rubocop/configuration
require:
- rubocop-rails
AllCops:
TargetRubyVersion: 2.7
Exclude:
- 'Gemfile'
- 'Rakefile'
- 'config.ru'
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
- 'bin/*'
- 'vendor/bundle/**/*'
- 'node_modules/**/*'
Metrics/ClassLength:
Max: 500
Metrics/AbcSize:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/BlockLength:
Max: 40
Exclude:
- "Guardfile"
- "db/**/*"
- "config/routes.rb"
- "test/factories/**/*"
Layout/LineLength:
Max: 130
Exclude:
- "db/schema.rb"
Metrics/MethodLength:
Max: 100
Exclude:
- "db/**/*"
Metrics/PerceivedComplexity:
Enabled: false
Rails:
Enabled: true
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Style/StringLiterals:
Enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment