Skip to content

Instantly share code, notes, and snippets.

@ZeroPivot
Forked from dsandstrom/.rubocop.yml
Last active September 30, 2021 17:53
Show Gist options
  • Save ZeroPivot/93b4e254b97ec7b9e683a695baec7e51 to your computer and use it in GitHub Desktop.
Save ZeroPivot/93b4e254b97ec7b9e683a695baec7e51 to your computer and use it in GitHub Desktop.
Rubocop config files for Ruby 3.0 / Rails 6+
# rubocop config files for small Rails4/Ruby2 project
# blog post: http://joanswork.com/rubocop-rails-getting-started/
# .rubocop.yml
AllCops:
Include:
- Rakefile
- config.ru
Exclude:
- 'db/schema.rb'
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
- 'app/views/**/*.html.erb'
- !ruby/regexp /old_and_unused\.rb$/
IndentationConsistency:
EnforcedStyle: 'rails'
Documentation:
Enabled: false
# SpaceInsideHashLiteralBraces:
# EnforcedStyle: no_space
# MethodLength:
# Max: 20 # revisit
HasAndBelongsToMany: # being used for a reason
Enabled: false
# ./db/migrate/.rubocop.yml
inherit_from:
- ../../.rubocop.yml
MethodLength:
Max: 200
SingleSpaceBeforeFirstArg:
Enabled: false
# ./app/controllers/local_devise/.rubocop.yml
inherit_from:
- ../../../.rubocop.yml
ClassAndModuleChildren:
Enabled: false
AccessorMethodName:
Enabled: false
# ./spec/.rubocop.yml
inherit_from:
- ../.rubocop.yml
Blocks:
Enabled: false
StringLiterals:
EnforcedStyle: double_quotes
# ./spec/factories/.rubocop.yml
inherit_from:
- ../.rubocop.yml
LineLength:
Max: 2048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment