forked from mbj/unparser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreek.yml
More file actions
137 lines (137 loc) · 2.93 KB
/
reek.yml
File metadata and controls
137 lines (137 loc) · 2.93 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
UnusedParameters:
exclude: []
UncommunicativeParameterName:
accept: []
exclude: []
enabled: true
reject:
- !ruby/regexp /^.$/
- !ruby/regexp /[0-9]$/
- !ruby/regexp /[A-Z]/
TooManyInstanceVariables:
exclude:
- Unparser::CLI
enabled: true
max_instance_variables: 3
TooManyMethods:
exclude:
- Unparser::Emitter # TODO: 13 methods, mostly helpers for deduplicate sublcasses
- Unparser::Buffer # 11 methods
- Unparser::CLI::Source # 11 methods
enabled: true
max_methods: 10
UncommunicativeMethodName:
accept:
- s
- n
exclude: []
enabled: true
reject:
- !ruby/regexp /^[a-z]$/
- !ruby/regexp /[0-9]$/
- !ruby/regexp /[A-Z]/
LongParameterList:
max_params: 3
exclude:
- Unparser#self.transquote
enabled: true
overrides: {}
FeatureEnvy:
exclude:
# False positives
- Unparser::CLI::Differ#collapsed_hunks
- Unparser::Emitter::Send::Arguments#effective_arguments
# Helper methods, false positive
- Unparser::CLI::Source#strip
- Unparser::CLI::Source#report_unparser
- Unparser::CLI#sources
enabled: true
ClassVariable:
exclude: []
enabled: true
BooleanParameter:
exclude: []
enabled: true
IrresponsibleModule:
exclude: []
enabled: false # buggy / broken
UncommunicativeModuleName:
accept: []
exclude: []
enabled: true
reject:
- !ruby/regexp /^.$/
- !ruby/regexp /[0-9]$/
NestedIterators:
ignore_iterators: []
exclude:
# Acceptable cases:
- Unparser::Emitter::Literal::Regexp#dispatch
- Unparser::CLI::Preprocessor::Dstr#collapsed_children
- Unparser::Preprocessor::CollapseStrChildren#collapsed_children
enabled: true
max_allowed_nesting: 1
TooManyStatements:
max_statements: 6
enabled: true
exclude:
- Unparser::CLI#add_options
- Unparser::CLI#initialize
- Unparser::CLI::Source#report_unparser
- Unparser::Emitter#delimited
DuplicateMethodCall:
allow_calls: []
exclude: []
enabled: false
max_calls: 1
UtilityFunction:
max_helper_calls: 1
exclude:
# Intent to be helper methods
- Unparser::CLI::Source#strip
- Unparser::CLI::Source#parse
- Unparser::NodeHelpers#n
- Unparser::NodeHelpers#s
- Unparser::CLI#sources
enabled: true
Attribute:
exclude: []
enabled: false
UncommunicativeVariableName:
accept: []
exclude: []
enabled: true
reject:
- !ruby/regexp /^.$/
- !ruby/regexp /[0-9]$/
- !ruby/regexp /[A-Z]/
RepeatedConditional:
exclude:
# TODO:
- Unparser::Comments
# False positives
- Unparser::Emitter::If
- Unparser::CLI
enabled: true
max_ifs: 1
DataClump:
exclude: []
enabled: true
max_copies: 1
min_clump_size: 3
ControlParameter:
exclude:
# False positive:
- Unparser::Emitter#emit_body
- Unparser::Emitter#conditional_parentheses
- Unparser::AST::LocalVariableScope#match
enabled: true
NilCheck:
enabled: false
LongYieldList:
max_params: 1
exclude:
- Unparser::AST::LocalVariableScopeEnumerator#visit
- Unparser::AST::LocalVariableScope#match
enabled: true