Skip to content

Instantly share code, notes, and snippets.

@mediafinger
Created May 15, 2019 15:28
Show Gist options
  • Select an option

  • Save mediafinger/4bea98b73244d8fc468167df18865838 to your computer and use it in GitHub Desktop.

Select an option

Save mediafinger/4bea98b73244d8fc468167df18865838 to your computer and use it in GitHub Desktop.
My (kinda relaxed) Rubocop configuration of May 2019 for rubocop 0.67.2 for RSpec projects
require: rubocop-rspec
AllCops:
TargetRubyVersion: 2.6
DisplayCopNames: true
Exclude:
- config.ru
- bin/**
- db/schema.rb
- node_modules/**/*
- vendor/**/*
Capybara/FeatureMethods:
Enabled: false
Layout/AlignHash:
Enabled: false
Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/**/*.rb'
Layout/EmptyLineAfterMagicComment:
Enabled: true
Layout/IndentHash:
EnforcedStyle: consistent
Layout/LeadingCommentSpace:
Enabled: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
IndentationWidth: 2
Metrics/AbcSize:
Max: 25
Exclude:
- spec/system/**/*
Metrics/BlockLength:
Exclude:
- config.rb
- config/**/*
- spec/**/*
Metrics/ClassLength:
Max: 120
Metrics/CyclomaticComplexity:
Max: 16
Metrics/LineLength:
Max: 125
Metrics/MethodLength:
Max: 20
Metrics/PerceivedComplexity:
Max: 10
RSpec/AlignLeftLetBrace:
Enabled: true
RSpec/ContextWording:
Enabled: false
RSpec/DescribeClass:
Exclude:
- 'spec/integration/**/*_spec.rb'
- 'spec/system/**/*_spec.rb'
RSpec/EmptyExampleGroup:
Enabled: false
RSpec/ExampleLength:
Max: 25
RSpec/ExpectChange:
EnforcedStyle: block
RSpec/EmptyLineAfterFinalLet:
Enabled: false
RSpec/MultipleExpectations:
Max: 6
RSpec/NamedSubject:
Enabled: true
RSpec/NestedGroups:
Max: 4
RSpec/VerifiedDoubles:
Enabled: false
Style/BracesAroundHashParameters:
Enabled: false
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/EmptyMethod:
Enabled: false
Style/FormatString:
EnforcedStyle: sprintf
Style/ModuleFunction:
Enabled: false
Style/NumericLiterals:
MinDigits: 15
Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: ()
'%': ()
'%i': ()
'%q': ()
'%Q': ()
'%r': '{}'
'%s': ()
'%w': ()
'%W': ()
'%x': ()
Style/PerlBackrefs:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/Semicolon:
AllowAsExpressionSeparator: true
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/SymbolArray:
Enabled: false
Style/SymbolProc:
Enabled: false
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Enabled: false
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/WordArray:
EnforcedStyle: percent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment