.rubocop.yml
---
AllCops:
TargetRubyVersion: 2.1
DisplayCopNames: true
Exclude:
- 'tmp/**/*'
Style/MixinGrouping:
Exclude:
- 'spec/**/*.rb'
Metrics/BlockLength:
CountComments: false # count full line comments?
Exclude:
- '**/*_spec.rb'
StringLiterals:
EnforcedStyle: single_quotes
Enabled: true
DotPosition:
Description: 'Checks the position of the dot in multi-line method calls.'
EnforcedStyle: leading
Enabled: true
ClassAndModuleChildren:
Description: 'Checks style of children classes and modules.'
EnforcedStyle: nested
Enabled: true
Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false
FileName:
Description: 'Use snake_case for source file names.'
Enabled: true
LineLength:
Max: 120
Enabled: true
Style/ExtraSpacing:
Description: 'Do not use unnecessary spacing.'
Enabled: true
Lint/LiteralInInterpolation:
Description: 'Avoid interpolating literals in strings'
AutoCorrect: true
Style/ModuleFunction:
EnforcedStyle: extend_self # Allows us to have private methods too
Style/PercentLiteralDelimiters:
# Hound and CodeClimate are currently using an old version of Rubocop with
# different defaults, so we set them explicitly here.
PreferredDelimiters:
default: ()
'%i': '[]'
'%I': '[]'
'%r': '{}'
'%w': '[]'
'%W': '[]'
# Work on these:
MethodLength:
Max: 14 # 18 # 27 # 85
AbcSize:
Max: 21 # 23 # 62
CyclomaticComplexity:
Max: 7