Skip to content

Instantly share code, notes, and snippets.

@andycandrea
Last active Aug 29, 2015
Embed
What would you like to do?
Default .rubocop.yml file
# This file should be placed in the root directory of an application using
# the Rubocop gem. For a sense of the most common Rubocop complaints in your
# project, run `rubocop --format offenses` to see a list of the most common
# issues. In addition, you can run rubocop -a to allow Rubocop to autocorrect
# some of the issues it detects. On one project, this made several thousand
# changes and led to only two issues, one from the Lint/DeprecatedClassMethods
# cop and one from Style/Blocks.
# For use with rubocop-rspec gem
require: rubocop-rspec
AllCops:
Exclude:
- 'Berksfile'
- 'Capfile'
- 'Cheffile'
- 'Gemfile'
- 'Guardfile'
- 'Podfile'
- 'Rakefile'
- 'Thorfile'
- 'Vagabondfile'
- 'Vagrantfile'
- 'cookbooks/**'
- 'tmp/**/*'
- '**/bin/**'
- '**/migrate/**'
- '**/rails_helper.rb'
- '**/schema.rb'
- '**/seeds/**'
- '**/seeds.rb'
- '**/spec_helper.rb'
- '**/*.gemspec'
- '**/*.jbuilder'
- '**/*.podspec'
- '**/*.rake'
RunRailsCops: true
# Lint Cops
DefEndAlignment:
AlignWith: start_of_line
Void:
Exclude:
'**/*_spec.rb'
# Metrics Cops
LineLength:
Enabled: false
MethodLength:
Max: 10
# Rails Cops
# RSpec Cops
MultipleDescribes:
Enabled: false
# Style Cops
AccessModifierIndentation:
Enabled: false
AlignHash:
EnforcedHashRocketStyle: key
EnforcedColonStyle: key
AlignParameters:
EnforcedStyle: with_fixed_indentation
ClassAndModuleChildren:
EnforcedStyle: compact
Documentation:
Enabled: false
EmptyLinesAroundAccessModifier:
Enabled: false
EmptyLinesAroundBody:
Enabled: false
GuardClause:
Enabled: false
Lambda:
Enabled: false
SignalException:
Enabled: false
StringLiterals:
EnforcedStyle: single_quotes # Can change to double_quotes based on preference
WordArray:
Enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment