2013-07-14 17:27:38 -04:00
|
|
|
AllCops:
|
|
|
|
Includes:
|
|
|
|
- '../**/*.rake'
|
2013-07-22 03:37:53 -04:00
|
|
|
- 'Gemfile'
|
|
|
|
- 'Gemfile.devtools'
|
2013-07-14 17:27:38 -04:00
|
|
|
Excludes:
|
2013-07-22 03:37:53 -04:00
|
|
|
- '**/vendor/**'
|
|
|
|
- '**/benchmarks/**'
|
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'
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
AccessControl:
|
|
|
|
Enabled: false
|
2013-07-27 15:14:20 -04:00
|
|
|
|
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:
|
2013-07-28 15:16:12 -04:00
|
|
|
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
|
|
|
|
|
2013-07-28 17:52:05 -04:00
|
|
|
# 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
|
|
|
|
|
|
|
|
# I like 1.8 syntax:
|
|
|
|
HashSyntax:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
# And also have a differend opinion here
|
|
|
|
AndOr:
|
|
|
|
Enabled: false
|