207 lines
3.9 KiB
YAML
207 lines
3.9 KiB
YAML
inherit_from: ../.rubocop.yml
|
|
|
|
# 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:
|
|
Enabled: true
|
|
PreferredMethods:
|
|
collect: 'map'
|
|
inject: 'reduce'
|
|
find: 'detect'
|
|
find_all: 'select'
|
|
|
|
AccessModifierIndentation:
|
|
Enabled: false
|
|
|
|
# Limit line length
|
|
LineLength:
|
|
Max: 120
|
|
|
|
# Disable documentation checking until a class needs to be documented once
|
|
Documentation:
|
|
Enabled: false
|
|
|
|
# Permit
|
|
#
|
|
# boolean_check? or fail
|
|
#
|
|
# Reject
|
|
#
|
|
# if foo or bar
|
|
# ...
|
|
# end
|
|
AndOr:
|
|
EnforcedStyle: conditionals
|
|
|
|
# Do not favor modifier if/unless usage when you have a single-line body
|
|
IfUnlessModifier:
|
|
Enabled: false
|
|
|
|
# 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
|
|
|
|
# Allow empty lines around class body
|
|
EmptyLinesAroundClassBody:
|
|
Enabled: false
|
|
|
|
# Allow empty lines around module body
|
|
EmptyLinesAroundModuleBody:
|
|
Enabled: false
|
|
|
|
# Allow empty lines around block body
|
|
EmptyLinesAroundBlockBody:
|
|
Enabled: false
|
|
|
|
# Allow multiple line operations to not require indentation
|
|
MultilineOperationIndentation:
|
|
Enabled: false
|
|
|
|
# Prefer String#% over Kernel#sprintf
|
|
FormatString:
|
|
EnforcedStyle: percent
|
|
|
|
# Use square brackets for literal Array objects
|
|
PercentLiteralDelimiters:
|
|
PreferredDelimiters:
|
|
'%': '{}'
|
|
'%i': '[]'
|
|
'%q': ()
|
|
'%Q': ()
|
|
'%r': '{}'
|
|
'%s': ()
|
|
'%w': '[]'
|
|
'%W': '[]'
|
|
'%x': ()
|
|
|
|
# Use %i[...] for arrays of symbols
|
|
SymbolArray:
|
|
Enabled: true
|
|
|
|
# Align if/else blocks with the variable assignment
|
|
EndAlignment:
|
|
EnforcedStyleAlignWith: variable
|
|
|
|
# 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:
|
|
Enabled: false
|
|
|
|
# Allow a maximum ABC score
|
|
Metrics/AbcSize:
|
|
Max: 21.02
|
|
|
|
Metrics/BlockLength:
|
|
Enabled: false
|
|
|
|
# Do not prefer lambda.call(...) over lambda.(...)
|
|
LambdaCall:
|
|
Enabled: false
|
|
|
|
# Buggy cop, returns false positive for our code base
|
|
NonLocalExitFromIterator:
|
|
Enabled: false
|
|
|
|
# To allow alignment of similar expressions we want to allow more than one
|
|
# space around operators:
|
|
#
|
|
# let(:a) { bar + something }
|
|
# let(:b) { foobar + something }
|
|
#
|
|
SpaceAroundOperators:
|
|
Enabled: false
|
|
|
|
# We use parallel assignments with great success
|
|
ParallelAssignment:
|
|
Enabled: false
|
|
|
|
# Allow additional specs
|
|
ExtraSpacing:
|
|
AllowForAlignment: true
|
|
|
|
# Buggy
|
|
FormatParameterMismatch:
|
|
Enabled: false
|
|
|
|
# Different preference
|
|
SignalException:
|
|
EnforcedStyle: semantic
|
|
|
|
# Do not use `alias`
|
|
Alias:
|
|
EnforcedStyle: prefer_alias_method
|
|
|
|
# Teaching people to ignore singleton class is pointless
|
|
RedundantFreeze:
|
|
Enabled: false
|
|
|
|
# Do not waste my horizontal or vertical space
|
|
IndentArray:
|
|
Enabled: false
|
|
|
|
# Prefer
|
|
#
|
|
# some_receiver
|
|
# .foo
|
|
# .bar
|
|
# .baz
|
|
#
|
|
# Over
|
|
#
|
|
# some_receiver.foo
|
|
# .bar
|
|
# .baz
|
|
MultilineMethodCallIndentation:
|
|
EnforcedStyle: indented
|
|
|
|
# Align keys and values in a multiline hash
|
|
AlignHash:
|
|
EnforcedColonStyle: table
|
|
|
|
# Prefer `public_send` and `__send__` over `send`
|
|
Send:
|
|
Enabled: true
|
|
|
|
Layout/EmptyLineAfterGuardClause:
|
|
Enabled: false
|
|
Layout/SpaceInsideArrayLiteralBrackets:
|
|
Enabled: false
|
|
Lint/BooleanSymbol:
|
|
Enabled: false
|
|
Lint/InterpolationCheck:
|
|
Enabled: false
|
|
Lint/MissingCopEnableDirective:
|
|
Enabled: false
|
|
Lint/UnifiedInteger:
|
|
Enabled: false
|
|
Naming/FileName:
|
|
Enabled: false
|
|
Style/AccessModifierDeclarations:
|
|
Enabled: false
|
|
Style/CommentedKeyword:
|
|
Enabled: false
|
|
Style/MixinGrouping:
|
|
Enabled: false
|
|
Style/RescueStandardError:
|
|
Enabled: false
|
|
Style/StderrPuts:
|
|
Enabled: false
|