free_mutant/config/rubocop.yml

122 lines
2.5 KiB
YAML
Raw Normal View History

2014-01-02 15:50:08 -05:00
inherit_from: ../.rubocop.yml
2013-11-20 14:15:24 -05:00
# 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.
2013-07-14 17:27:38 -04:00
AllCops:
2014-05-27 10:46:00 -04:00
Include:
2013-07-14 17:27:38 -04:00
- '../**/*.rake'
- 'Gemfile'
- 'Gemfile.triage'
- 'mutant.gemspec'
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-05-27 11:12:36 -04:00
# Use square brackets for literal Array objects
PercentLiteralDelimiters:
PreferredDelimiters:
'%': ()
'%i': '[]'
'%q': ()
'%Q': ()
'%r': '{}'
'%s': ()
'%w': '[]'
'%W': '[]'
'%x': ()
2013-07-28 13:24:00 -04:00
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
2013-07-27 15:14:20 -04:00
# Limit line length
LineLength:
Max: 124 # TODO: lower to 79
2013-07-27 15:14:20 -04:00
# 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
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-08-07 12:54:52 -04:00
# And also have a different opinion here
2013-07-27 15:14:20 -04:00
AndOr:
Enabled: false
2013-11-20 14:10:47 -05:00
# I like my raise
SignalException:
Enabled: false
2013-11-20 14:15:24 -05:00
# I need to chain optparse builder, else it is more ugly
MultilineBlockChain:
Enabled: false
ClassLength:
2014-01-18 18:28:40 -05:00
Max: 119
2013-11-20 14:20:47 -05:00
# I align private keywords with class body
IndentationWidth:
Enabled: false
2013-12-31 07:10:13 -05:00
# 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
2013-12-31 07:10:13 -05:00
# I like my style more
AccessModifierIndentation:
Enabled: false