2014-01-02 15:50:08 -05:00
|
|
|
inherit_from: ../.rubocop.yml
|
|
|
|
|
2013-07-14 17:27:38 -04:00
|
|
|
# Avoid parameter lists longer than five parameters.
|
|
|
|
ParameterLists:
|
|
|
|
Max: 3
|
|
|
|
CountKeywordArgs: true
|
|
|
|
|
|
|
|
# Avoid more than `Max` levels of nesting.
|
|
|
|
BlockNesting:
|
|
|
|
Max: 3
|
|
|
|
|
|
|
|
# Align with the style guide.
|
|
|
|
CollectionMethods:
|
|
|
|
PreferredMethods:
|
|
|
|
collect: 'map'
|
|
|
|
inject: 'reduce'
|
|
|
|
find: 'detect'
|
|
|
|
find_all: 'select'
|
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Do not force public/protected/private keyword to be indented at the same
|
|
|
|
# level as the def keyword. My personal preference is to outdent these keywords
|
|
|
|
# because I think when scanning code it makes it easier to identify the
|
|
|
|
# sections of code and visually separate them. When the keyword is at the same
|
|
|
|
# level I think it sort of blends in with the def keywords and makes it harder
|
|
|
|
# to scan the code and see where the sections are.
|
|
|
|
AccessModifierIndentation:
|
2013-07-28 13:24:00 -04:00
|
|
|
Enabled: false
|
|
|
|
|
2013-07-27 15:14:20 -04:00
|
|
|
# Limit line length
|
|
|
|
LineLength:
|
2014-12-21 20:28:30 -05:00
|
|
|
Max: 120
|
2013-07-27 15:14:20 -04:00
|
|
|
|
|
|
|
# Disable documentation checking until a class needs to be documented once
|
|
|
|
Documentation:
|
|
|
|
Enabled: false
|
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Do not always use &&/|| instead of and/or.
|
|
|
|
AndOr:
|
2013-07-28 17:52:05 -04:00
|
|
|
Enabled: false
|
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Do not favor modifier if/unless usage when you have a single-line body
|
|
|
|
IfUnlessModifier:
|
2013-07-28 17:52:05 -04:00
|
|
|
Enabled: false
|
|
|
|
|
2013-07-27 15:14:20 -04:00
|
|
|
# Allow case equality operator (in limited use within the specs)
|
|
|
|
CaseEquality:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
# Constants do not always have to use SCREAMING_SNAKE_CASE
|
|
|
|
ConstantName:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
# Not all trivial readers/writers can be defined with attr_* methods
|
|
|
|
TrivialAccessors:
|
|
|
|
Enabled: false
|
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Allow empty lines around class body
|
|
|
|
EmptyLinesAroundClassBody:
|
2013-07-27 15:14:20 -04:00
|
|
|
Enabled: false
|
2013-11-20 14:10:47 -05:00
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Allow empty lines around module body
|
|
|
|
EmptyLinesAroundModuleBody:
|
2013-11-20 14:10:47 -05:00
|
|
|
Enabled: false
|
2013-11-20 14:15:24 -05:00
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Allow empty lines around block body
|
|
|
|
EmptyLinesAroundBlockBody:
|
2013-11-20 14:15:24 -05:00
|
|
|
Enabled: false
|
2013-11-20 14:16:54 -05:00
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Allow multiple line operations to not require indentation
|
|
|
|
MultilineOperationIndentation:
|
|
|
|
Enabled: false
|
2013-11-20 14:20:47 -05:00
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Prefer String#% over Kernel#sprintf
|
|
|
|
FormatString:
|
2013-11-20 14:20:47 -05:00
|
|
|
Enabled: false
|
2013-12-31 07:10:13 -05:00
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Use square brackets for literal Array objects
|
|
|
|
PercentLiteralDelimiters:
|
|
|
|
PreferredDelimiters:
|
|
|
|
'%': '{}'
|
|
|
|
'%i': '[]'
|
|
|
|
'%q': ()
|
|
|
|
'%Q': ()
|
|
|
|
'%r': '{}'
|
|
|
|
'%s': ()
|
|
|
|
'%w': '[]'
|
|
|
|
'%W': '[]'
|
|
|
|
'%x': ()
|
|
|
|
|
|
|
|
# Align if/else blocks with the variable assignment
|
|
|
|
EndAlignment:
|
|
|
|
AlignWith: variable
|
|
|
|
|
|
|
|
# Do not always align parameters when it is easier to read
|
|
|
|
AlignParameters:
|
|
|
|
Exclude:
|
|
|
|
- spec/**/*_spec.rb
|
|
|
|
|
|
|
|
# Prefer #kind_of? over #is_a?
|
|
|
|
ClassCheck:
|
|
|
|
EnforcedStyle: kind_of?
|
|
|
|
|
|
|
|
# Do not prefer double quotes to be used when %q or %Q is more appropriate
|
|
|
|
UnneededPercentQ:
|
2013-12-31 07:10:13 -05:00
|
|
|
Enabled: false
|
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
# Allow a maximum ABC score
|
|
|
|
Metrics/AbcSize:
|
|
|
|
Max: 18.00
|
|
|
|
|
|
|
|
# Do not prefer lambda.call(...) over lambda.(...)
|
2014-05-11 11:23:15 -04:00
|
|
|
LambdaCall:
|
|
|
|
Enabled: false
|
|
|
|
|
2014-12-21 20:28:30 -05:00
|
|
|
Style/RegexpLiteral:
|
|
|
|
MaxSlashes: 0
|