Skip to content

Instantly share code, notes, and snippets.

@ryancheung
Last active August 29, 2015 14:16
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 ryancheung/85188f87c2242df06cc2 to your computer and use it in GitHub Desktop.
Save ryancheung/85188f87c2242df06cc2 to your computer and use it in GitHub Desktop.
# 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
LineLength:
Max: 179 # revisit
SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
MethodLength:
Max: 20 # revisit
HasAndBelongsToMany: # being used for a reason
Enabled: false
EmptyLinesAroundBody: # prefer empty line for legibility
Enabled: false
Documentation: # later - part of bigger project
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:
Enabled: false
# ./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