Skip to content

Instantly share code, notes, and snippets.

@andycandrea
Last active August 29, 2015 14:07
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 andycandrea/368123a8d754d6b1b5f1 to your computer and use it in GitHub Desktop.
Save andycandrea/368123a8d754d6b1b5f1 to your computer and use it in GitHub Desktop.
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