free_mutant/config/rubocop.yml
2014-08-07 09:54:52 -07:00

121 lines
2.5 KiB
YAML

inherit_from: ../.rubocop.yml
# General note about rubocop.
# It does NOT allow to silence a specific rule violation.
# For that reason I sometimes have to disable a whole cop where
# I just tried to whitelist a specific occurence.
AllCops:
Include:
- '../**/*.rake'
- 'Gemfile'
- 'Gemfile.triage'
- 'mutant.gemspec'
# 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'
# Use square brackets for literal Array objects
PercentLiteralDelimiters:
PreferredDelimiters:
'%': ()
'%i': '[]'
'%q': ()
'%Q': ()
'%r': '{}'
'%s': ()
'%w': '[]'
'%W': '[]'
'%x': ()
MethodLength:
CountComments: false
Max: 17 # TODO: Bring down to 10
RegexpLiteral: # I do not agree %r(\A) is more readable than /\A/
Enabled: false
Eval:
Enabled: false # Mutant must use Kernel#eval to inject mutated source
# Limit line length
LineLength:
Max: 124 # TODO: lower to 79
# Disable documentation checking until a class needs to be documented once
Documentation:
Enabled: false
# Do not favor modifier if/unless usage when you have a single-line body
IfUnlessModifier:
Enabled: false
# Mutant needs to define methods like def bar; end in specs
Semicolon:
Enabled: false
# Mutant needs to define multiple methods on same line in specs
EmptyLineBetweenDefs:
Enabled: false
# Mutant needs to define singleton methods like Foo.bar in specs
ClassMethods:
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
# And also have a different opinion here
AndOr:
Enabled: false
# I like my raise
SignalException:
Enabled: false
# I need to chain optparse builder, else it is more ugly
MultilineBlockChain:
Enabled: false
ClassLength:
Max: 119
# I align private keywords with class body
IndentationWidth:
Enabled: false
# I like to have an empty line before closing the currently opened body
EmptyLinesAroundBody:
Enabled: false
# I test this style for a while
LambdaCall:
Enabled: false
# I like my style more
AccessModifierIndentation:
Enabled: false