-
Notifications
You must be signed in to change notification settings - Fork 0
/
The_Reek_Cheat_Sheet.txt
62 lines (49 loc) · 1.91 KB
/
The_Reek_Cheat_Sheet.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Reek is controlled by a file called: ".reek.yml" As you can guess, this is a
YAML file. Here is is sample:
---
### Generic smell configuration
detectors:
TooManyStatements:
max_statements: 7
InstanceVariableAssumption:
enabled: false
TooManyMethods:
enabled: true
LongParameterList:
max_params: 3
Basic Smell Options
enabled Boolean
exclude an array of strings that will be converted into regular expressions
For more focus, the following can be used to hide endemic code smells wherever
they may occur.
# :reek:BooleanParameter
# :reek:ClassVariable
# :reek:ControlParameter
# :reek:DataClump { max_copies: 2 }
{ min_clump_size: 2 }
# :reek:DuplicateMethodCall { max_calls: 1 }
{ allow_calls: ['echo.foxtrot'] }
# :reek:FeatureEnvy
# :reek:InstanceVariableAssumption
# :reek:IrresponsibleModule -- really just add a comment!
Large Class
# :reek:TooManyConstants { max_constants: 5 }
# :reek:TooManyInstanceVariables: { max_instance_variables: 4 }
# :reek:TooManyMethods: { max_methods: 15 }
# :reek:LongParameterList { max_params: 3 }
# :reek:LongYieldList { max_params: 3 }
# :reek:ManualDispatch
# :reek:MissingSafeMethod
# :reek:ModuleInitialize
# :reek:NestedIterators { max_allowed_nesting: 1 }
# :reek:NilCheck
# :reek:RepeatedConditional { max_ifs: 2 }
# :reek:SubclassedFromCoreClass
# :reek:TooManyStatements { max_statements: 5 }
# :reek:UncommunicativeMethodName
# :reek:UncommunicativeModuleName
# :reek:UncommunicativeParameterName
# :reek:UncommunicativeVariableName
# :reek:UnusedParameters -- put an '_' in front the ignored parm!
# :reek:UnusedPrivateMethod -- turned off by default.
# :reek:UtilityFunction { public_methods_only: false }