This repository has been archived by the owner on Mar 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
293 lines (221 loc) · 6.05 KB
/
.rubocop.yml
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# These are all the cops that are enabled in the default configuration.
# Use UTF-8 as the source file encoding.
Encoding:
Enabled: false
# Limit lines to 80 characters.
LineLength:
Enabled: false
# Avoid methods longer than 10 lines of code
MethodLength:
Enabled: false
# No hard tabs.
Tab:
Enabled: true
# Avoid trailing whitespace.
TrailingWhitespace:
Enabled: false
# Indent when as deep as case.
CaseIndentation:
Enabled: false
# Use empty lines between defs.
EmptyLineBetweenDefs:
Enabled: true
# Don't use several empty lines in a row.
EmptyLines:
Enabled: false
# Use spaces around operators.
SpaceAroundOperators:
Enabled: false
# No spaces after ( or before ).
SpaceInsideParens:
Enabled: false
# No spaces after [ or before ].
SpaceInsideBrackets:
Enabled: false
# Use spaces after commas.
SpaceAfterComma:
Enabled: false
# Use spaces after semicolons.
SpaceAfterSemicolon:
Enabled: false
# Use spaces after colons.
SpaceAfterColon:
Enabled: false
# Use spaces after if/elsif/unless/while/until/case/when.
SpaceAfterControlKeyword:
Enabled: false
# Prefer symbols instead of strings as hash keys.
HashSyntax:
Enabled: false
# Use Unix-style line endings.
EndOfLine:
Enabled: true
# Add underscores to large numeric literals to improve their readability.
NumericLiterals:
Enabled: true
# Align the parameters of a method call if they span more than one line.
AlignParameters:
Enabled: false
# Use def with parentheses when there are arguments.
DefWithParentheses:
Enabled: false
# Omit the parentheses when the method doesn't accept any arguments.
DefWithoutParentheses:
Enabled: false
# Never use if x; .... Use the ternary operator instead.
IfWithSemicolon:
Enabled: true
# Never use then for multi-line if/unless.
MultilineIfThen:
Enabled: true
# Favor the ternary operator(?:) over if/then/else/end constructs.
OneLineConditional:
Enabled: true
# Avoid using {...} for multi-line blocks (multiline chaining is always ugly).
# Prefer {...} over do...end for single-line blocks.
Blocks:
Enabled: true
# Avoid parameter lists longer than three or four parameters.
ParameterLists:
Enabled: false
# Prefer ' strings when you don't need string interpolation or special symbols.
StringLiterals:
Enabled: false
# Avoid multi-line ?: (the ternary operator); use if/unless instead.
MultilineTernaryOperator:
Enabled: true
# Use one expression per branch in a ternary operator.
NestedTernaryOperator:
Enabled: true
# Never use unless with else. Rewrite these with the positive case first.
UnlessElse:
Enabled: true
# Use &&/|| instead of and/or.
AndOr:
Enabled: false
# Use when x then ... for one-line cases.
WhenThen:
Enabled: false
# Favor modifier if/unless usage when you have a single-line body.
IfUnlessModifier:
Enabled: true
# Favor modifier while/until usage when you have a single-line body.
WhileUntilModifier:
Enabled: false
# Favor unless over if for negative conditions (or control flow or).
FavorUnlessOverNegatedIf:
Enabled: true
# Favor until over while for negative conditions.
FavorUntilOverNegatedWhile:
Enabled: true
# Use spaces around the = operator when assigning default values in def params.
SpaceAroundEqualsInParameterDefault:
Enabled: false
# Don't use parentheses around the condition of an if/unless/while.
ParenthesesAroundCondition:
Enabled: true
# Use snake_case for symbols, methods and variables.
MethodAndVariableSnakeCase:
Enabled: false
# Use CamelCase for classes and modules.
ClassAndModuleCamelCase:
Enabled: true
# Preferred collection methods.
CollectionMethods:
Enabled: false
# Don't interpolate global, instance and class variables directly in strings.
VariableInterpolation:
Enabled: false
# Don't use semicolons to terminate expressions.
Semicolon:
Enabled: false
# Use sprintf instead of String#%.
FavorSprintf:
Enabled: false
# Use Array#join instead of Array#*.
FavorJoin:
Enabled: true
# Use alias_method instead of alias.
Alias:
Enabled: false
# Use ! instead of not.
Not:
Enabled: false
# Avoid using rescue in its modifier form.
RescueModifier:
Enabled: true
# Never use return in an ensure block.
EnsureReturn:
Enabled: true
# Don't suppress exception.
HandleExceptions:
Enabled: false
# Use only ascii symbols in identifiers.
AsciiIdentifiers:
Enabled: true
# Use only ascii symbols in comments.
AsciiComments:
Enabled: false
# Do not use block comments.
BlockComments:
Enabled: false
# Avoid rescuing the Exception class.
RescueException:
Enabled: false
# Prefer literals to Array.new/Hash.new/String.new.
EmptyLiteral:
Enabled: false
# When defining binary operators, name the argument other.
OpMethod:
Enabled: false
# Name reduce arguments |a, e| (accumulator, element)
ReduceArguments:
Enabled: false
# Use %r for regular expressions matching more than one '/' character.
FavorPercentR:
Enabled: false
# Use self when defining module/class methods.
ClassMethods:
Enabled: false
# this goes wrong when including modules with the same name, ie:
# class Foo
# include Bar::Foo
# Avoid single-line methods.
SingleLineMethods:
Enabled: true
# Use %w or %W for arrays of words.
WordArray:
Enabled: false
# Use spaces inside hash literal braces - or don't.
SpaceInsideHashLiteralBraces:
Enabled: false
# Avoid the use of line continuation (/).
LineContinuation:
Enabled: true
# Prefer attr_* methods to trivial readers/writers.
TrivialAccessors:
Enabled: false
# Comments should start with a space.
LeadingCommentSpace:
Enabled: false
# Do not use :: for method invocation.
ColonMethodCall:
Enabled: false
# Do not introduce global variables.
AvoidGlobalVars:
Enabled: false
# The use of eval represents a serious security risk.
Eval:
Enabled: true
# Symbol literals should use snake_case.
SymbolName:
Enabled: false
# Constants should use SCREAMING_SNAKE_CASE.
ConstantName:
Enabled: false
# Indent private/protected as deep as defs and keep blank lines around them.
AccessControl:
Enabled: false
# Use Kernel#loop with break rather than begin/end/until or begin/end/while for post-loop tests.
Loop:
Enabled: true