Skip to content

Instantly share code, notes, and snippets.

@absk1317
Forked from dsandstrom/.rubocop.yml
Created June 1, 2019 17:17
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 absk1317/2e5c093aa9c82c308dfa2d6ad4ec6fe0 to your computer and use it in GitHub Desktop.
Save absk1317/2e5c093aa9c82c308dfa2d6ad4ec6fe0 to your computer and use it in GitHub Desktop.
Rubocop config for Ruby 2.5 Rails 5+
##
# .rubocop.yml
AllCops:
TargetRubyVersion: 2.5
Include:
- 'config.ru'
- 'Gemfile'
- 'Guardfile'
- 'Rakefile'
Exclude:
- 'app/views/**/*'
- 'bin/*'
- 'db/schema.rb'
- 'db/migrate/*'
- 'log/**/*'
- 'node_modules/**/*'
- 'public/**/*'
- 'scripts/**/*'
- 'vendor/**/*'
- 'tmp/**/*'
- '.git/**/*'
Documentation:
Enabled: false
IndentationConsistency:
EnforcedStyle: 'rails'
Metrics/BlockLength:
Exclude:
- 'Guardfile'
Naming/FileName:
Exclude:
- 'Gemfile'
- 'Guardfile'
- 'Rakefile'
Rails:
Enabled: true
##
# ./spec/.rubocop.yml
inherit_from:
- ../.rubocop.yml
StringLiterals:
EnforcedStyle: double_quotes
Exclude:
- './*_helper.rb'
# describe block
Metrics/BlockLength:
Enabled: false
##
# ./spec/fabricators/.rubocop.yml
inherit_from:
- ../../.rubocop.yml
##
# ./spec/support/.rubocop.yml
inherit_from:
- ../../.rubocop.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment