Skip to content

Instantly share code, notes, and snippets.

@tejasbubane
Created August 4, 2019 07:51
Show Gist options
  • Save tejasbubane/7651a4d9119ea8c28f303bb4fc9c8260 to your computer and use it in GitHub Desktop.
Save tejasbubane/7651a4d9119ea8c28f303bb4fc9c8260 to your computer and use it in GitHub Desktop.
Sample rubocop with sane config
AllCops:
TargetRubyVersion: 2.5
Exclude:
- 'config/**/*.rb'
- 'db/**/*.rb'
- '**/Rakefile'
- '**/config.ru'
- '**/spec_helper.rb'
- '**/rails_helper.rb'
- 'lib/tasks/db_extensions.rake'
- 'lib/tasks/onboarding.rake'
- 'bin/*'
# Always run rails cops
Rails:
Enabled: true
Rails/InverseOf:
Enabled: false
Style/Documentation:
Enabled: false
Layout/IndentHash:
Enabled: false
Layout/EmptyLinesAroundClassBody:
Enabled: false
Layout/EmptyLinesAroundBlockBody:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/MultilineOperationIndentation:
Enabled: false
Layout/MultilineMethodCallIndentation:
Enabled: false
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
Style/StringLiterals:
EnforcedStyle: double_quotes
# We don't want to add `dependent: destory` for all associations
Rails/HasManyOrHasOneDependent:
Enabled: false
Metrics/ParameterLists:
CountKeywordArgs: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment