.rubocop.yml
AllCops:
TargetRubyVersion: 2.3
# Layout
Layout/EmptyLineAfterGuardClause:
Enabled: false
# Metrics
Metrics/AbcSize:
Enabled: true
Metrics/BlockNesting:
Enabled: true
Max: 4
Metrics/BlockLength:
Exclude:
- spec/**/*.rb
Metrics/ClassLength:
Enabled: true
Max: 250
Metrics/CyclomaticComplexity:
Enabled: true
Max: 10
Metrics/LineLength:
Enabled: true
Max: 120
Metrics/MethodLength:
Enabled: true
Max: 40
Metrics/ModuleLength:
Enabled: true
Max: 250
Metrics/ParameterLists:
Enabled: true
Metrics/PerceivedComplexity:
Enabled: true
# Style
Style/AsciiComments:
Enabled: false
Style/CollectionMethods:
Enabled: true
Style/Documentation:
Enabled: false
Style/EmptyLiteral:
Enabled: false
Style/FormatString:
EnforcedStyle: percent
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': '[]'
'%I': '[]'
'%w': '[]'
'%W': '[]'
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/SymbolArray:
Enabled: true
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TrivialAccessors:
ExactNameMatch: true
AllowPredicates: true
# RSpec
require: rubocop-rspec
RSpec/ContextWording:
Enabled: false
RSpec/NestedGroups:
Max: 3