free_mutant/config/rubocop.yml

207 lines
3.9 KiB
YAML
Raw Normal View History

2014-01-02 21:50:08 +01:00
inherit_from: ../.rubocop.yml
2013-07-14 14:27:38 -07: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:
Enabled: true
2013-07-14 14:27:38 -07:00
PreferredMethods:
collect: 'map'
inject: 'reduce'
find: 'detect'
find_all: 'select'
2014-12-22 01:28:30 +00:00
AccessModifierIndentation:
2018-09-12 13:15:43 +00:00
Enabled: false
2013-07-28 19:24:00 +02:00
2013-07-27 21:14:20 +02:00
# Limit line length
LineLength:
2014-12-22 01:28:30 +00:00
Max: 120
2013-07-27 21:14:20 +02:00
# Disable documentation checking until a class needs to be documented once
Documentation:
Enabled: false
2016-03-20 18:02:09 -04:00
# Permit
#
# boolean_check? or fail
#
# Reject
#
# if foo or bar
# ...
# end
2014-12-22 01:28:30 +00:00
AndOr:
2016-03-20 18:02:09 -04:00
EnforcedStyle: conditionals
2014-12-22 01:28:30 +00:00
# Do not favor modifier if/unless usage when you have a single-line body
IfUnlessModifier:
Enabled: false
2013-07-27 21:14:20 +02: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-22 01:28:30 +00:00
# Allow empty lines around class body
EmptyLinesAroundClassBody:
2013-07-27 21:14:20 +02:00
Enabled: false
2013-11-20 20:10:47 +01:00
2014-12-22 01:28:30 +00:00
# Allow empty lines around module body
EmptyLinesAroundModuleBody:
2013-11-20 20:10:47 +01:00
Enabled: false
2013-11-20 20:15:24 +01:00
2014-12-22 01:28:30 +00:00
# Allow empty lines around block body
EmptyLinesAroundBlockBody:
2013-11-20 20:15:24 +01:00
Enabled: false
2014-12-22 01:28:30 +00:00
# Allow multiple line operations to not require indentation
MultilineOperationIndentation:
Enabled: false
2013-11-20 20:20:47 +01:00
2014-12-22 01:28:30 +00:00
# Prefer String#% over Kernel#sprintf
FormatString:
2016-03-19 21:48:06 -07:00
EnforcedStyle: percent
2013-12-31 13:10:13 +01:00
2014-12-22 01:28:30 +00:00
# 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
2014-12-22 01:28:30 +00:00
# Align if/else blocks with the variable assignment
EndAlignment:
EnforcedStyleAlignWith: variable
2014-12-22 01:28:30 +00:00
# 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 13:10:13 +01:00
Enabled: false
2014-12-22 01:28:30 +00:00
# Allow a maximum ABC score
Metrics/AbcSize:
Max: 21.02
2014-12-22 01:28:30 +00:00
Metrics/BlockLength:
Enabled: false
2014-12-22 01:28:30 +00:00
# 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
2015-09-05 22:17:23 +00:00
# Allow additional specs
ExtraSpacing:
AllowForAlignment: true
2015-09-05 22:17:23 +00:00
# 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
2016-03-20 17:02:44 -04:00
# Prefer `public_send` and `__send__` over `send`
Send:
Enabled: true
2016-12-03 14:30:04 +00:00
2018-12-01 23:35:26 +00:00
Layout/AlignHash:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
2018-09-12 13:15:43 +00:00
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Lint/BooleanSymbol:
Enabled: false
Lint/InterpolationCheck:
Enabled: false
Lint/MissingCopEnableDirective:
Enabled: false
2016-12-03 14:30:04 +00:00
Lint/UnifiedInteger:
Enabled: false
2018-09-12 13:15:43 +00:00
Naming/FileName:
Enabled: false
Style/AccessModifierDeclarations:
Enabled: false
Style/CommentedKeyword:
Enabled: false
Style/MixinGrouping:
Enabled: false
Style/RescueStandardError:
Enabled: false
Style/StderrPuts:
Enabled: false