-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop-https---gitlab-com-ekylibre-tools-rubocop---raw-0-2-0--rubocop-yml
399 lines (362 loc) · 10.2 KB
/
.rubocop-https---gitlab-com-ekylibre-tools-rubocop---raw-0-2-0--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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# This file describes cops for the official Ekylibre code Style.
AllCops:
NewCops: enable
AutoCorrect: false
TargetRubyVersion: 2.6
#####################################################
# AutoCorrect #
#####################################################
Layout/IndentationWidth:
AutoCorrect: true
Layout/TrailingEmptyLines:
AutoCorrect: true
Layout/TrailingWhitespace:
AutoCorrect: true
Style/StringLiterals:
AutoCorrect: true
#####################################################
# Configuration #
#####################################################
Layout/IndentationConsistency:
EnforcedStyle: indented_internal_methods
Layout/LineLength:
Enabled: true
Max: 140
# Empty class are useful as mocks or dummy args
Lint/EmptyClass:
Exclude:
- test/**/*
Style/SymbolArray:
EnforcedStyle: percent
# We enforce _compact_ for the sake of uniformity. No need to ask yourself if you should instanciate or not your error: ALWAYS do it.
Style/RaiseArgs:
EnforcedStyle: compact
#####################################################
# Disabled Cops #
#####################################################
# Disabling this because there is no good style that can be enforced.
# indented_relative_to_receiver don't allow to align calls if the first one is in the same line as the receiver
# Example:
# if receiver.method1
# .method2
# would be flagged as invalid and the proposed correction would be:
# if receiver.method1
# .method2
#
# indented is just bad because it enforces:
# if receiver.method1
# .method2
#
# aligned is no better as it just enforces a style that does not let the reader understand the context
# Example:
# if receiver.method1
# .method2
# Is enforced to:
# if receiver.method1
# .method2
# Even worse, without the if it enforces:
# def m
# receiver.method1
# .method2
# end
# ... which is just garbage
Layout/MultilineMethodCallIndentation:
Enabled: false
Lint/ConstantResolution:
Enabled: false
# Loop control-flow with break is just a crutch for when you are not able to correctly design your stop condition
Lint/Loop:
Enabled: false
Metrics:
Enabled: false
# No, just no.
Naming/BinaryOperatorParameterName:
Enabled: false
# What in the actual fuck?
# This is broken because:
# - Forcing developers to name their variable 'e' is plain stupid. Where is the meaningful name here?
# - Forcing developers to name all their exceptions the same way is also stupid.
# What happens if we rescue multiple errors in the rescue block?
# Same question if the 'exception' or whahtever this preference is set to is the name of a method/variable in the context?
Naming/RescuedExceptionsVariableName:
Enabled: false
# How can you guess if `child?` meant 'I _am_ a child' or 'I _have_ a child' ?
Naming/PredicateName:
Enabled: false
# Enforceable styles have different semantics, so we allow the use of both
Style/AccessModifierDeclarations:
Enabled: false
Style/AccessorGrouping:
Enabled: false
Style/AsciiComments:
Enabled: false
Style/CaseLikeIf:
Enabled: false
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/EmptyElse:
EnforcedStyle: empty
# Disabling this as, sometimes, Hash.new is clearer than {}, like in short block notation like for `proc { {} }`
Style/EmptyLiteral:
Enabled: false
Style/FloatDivision:
Enabled: false
Style/GuardClause:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/Next:
Enabled: false
# This cop is stupid as per the documentation: "This cop matches for method names only and hence cannot tell apart methods with same name in different classes."
Style/RedundantArgument:
Enabled: false
# Safe navigations encourages chaining too much and this is a code smell and a clear violation of the law of Demeter.
Style/SafeNavigation:
Enabled: false
# Disabling this because there is no good style that can be enforced
# require_no_parentheses is just bad because it disallows adding parenthesis for clarification.
# require_parentheses is just forcing us to add bload and think we program in Lisp
# require_parentheses_when_complex is considering the use of a comparison operator as complex and is forcing us to add bloat.
Style/TernaryParentheses:
Enabled: false
# Because the cope is buggy and think the following code is a trivial accessor, which is NOT the case
# def id(id)
# @id = id
# end
Style/TrivialAccessors:
Enabled: false
Style/YodaCondition:
Enabled: false
#####################################################
# NO DECISIONS MADE #
#####################################################
# TODO: Enable this after investigating how to replace the call to escape
Lint/UriEscapeUnescape:
Enabled: false
# TODO: enable this
Style/ParenthesesAroundCondition:
Enabled: false
Style/MultipleComparison:
Enabled: false
Style/ClassVars:
Enabled: false
Layout/SpaceBeforeBlockBraces:
Enabled: false
Style/BlockDelimiters:
Enabled: false
Layout/MultilineBlockLayout:
Enabled: false
Layout/BlockEndNewline:
Enabled: false
Lint/RedundantStringCoercion:
Enabled: false
Style/RescueModifier:
Enabled: false
Layout/EmptyLinesAroundMethodBody:
Enabled: false
Naming/MemoizedInstanceVariableName:
Enabled: false
Style/IdenticalConditionalBranches:
Enabled: false
Layout/MultilineOperationIndentation:
Enabled: false
Style/TrailingCommaInArguments:
Enabled: false
Layout/RescueEnsureAlignment:
Enabled: false
Layout/ExtraSpacing:
Enabled: false
Style/RedundantSelf:
Enabled: false
Lint/UriRegexp:
Enabled: false
Layout/AssignmentIndentation:
Enabled: false
Style/RedundantReturn:
Enabled: false
Layout/SpaceInsideParens:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/SpaceInsideBlockBraces:
Enabled: false
Style/InverseMethods:
Enabled: false
Lint/AssignmentInCondition:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Layout/SpaceAroundOperators:
Enabled: false
Style/NumericPredicate:
Enabled: false
Style/RescueStandardError:
Enabled: false
Lint/SendWithMixinArgument:
Enabled: false
Style/TrailingCommaInHashLiteral:
Enabled: false
Naming/MethodParameterName:
Enabled: false
Layout/EmptyLinesAroundAccessModifier:
Enabled: false
Style/TrailingCommaInArrayLiteral:
Enabled: false
Layout/FirstHashElementIndentation:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
Layout/FirstArrayElementIndentation:
Enabled: false
Layout/EmptyLinesAroundBlockBody:
Enabled: false
Lint/UselessAssignment:
Enabled: false
Style/NonNilCheck:
Enabled: false
Style/ColonMethodCall:
Enabled: false
Lint/ShadowingOuterLocalVariable:
Enabled: false
Style/Lambda:
Enabled: false
Layout/HashAlignment:
Enabled: false
Layout/EmptyLinesAroundClassBody:
Enabled: false
Lint/UnusedMethodArgument:
Enabled: false
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: false
Layout/SpaceAroundMethodCallOperator:
Enabled: false
Lint/BinaryOperatorWithIdenticalOperands:
Enabled: false
Lint/DeprecatedOpenSSLConstant:
Enabled: false
Lint/DuplicateElsifCondition:
Enabled: false
Lint/DuplicateRescueException:
Enabled: false
Lint/EmptyConditionalBody:
Enabled: false
Lint/FloatComparison:
Enabled: false
Lint/MissingSuper:
Enabled: false
Lint/MixedRegexpCaptureTypes:
Enabled: false
Lint/OutOfRangeRegexpRef:
Enabled: false
Lint/RaiseException:
Enabled: false
Lint/SelfAssignment:
Enabled: false
Lint/StructNewOverride:
Enabled: false
Lint/TopLevelReturnWithArgument:
Enabled: false
Lint/UnreachableLoop:
Enabled: false
Style/ArrayCoercion:
Enabled: false
Style/BisectedAttrAccessor:
Enabled: false
Style/ExplicitBlockArgument:
Enabled: false
Style/ExponentialNotation:
Enabled: false
Style/GlobalStdStream:
Enabled: false
Style/HashAsLastArrayItem:
Enabled: false
Style/HashEachMethods:
Enabled: false
Style/HashLikeCase:
Enabled: false
Style/HashTransformKeys:
Enabled: false
Style/HashTransformValues:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Style/RedundantAssignment:
Enabled: false
Style/RedundantBegin:
Enabled: false
Style/RedundantFetchBlock:
Enabled: false
Style/RedundantFileExtensionInRequire:
Enabled: false
Style/RedundantRegexpCharacterClass:
Enabled: false
Style/RedundantRegexpEscape:
Enabled: false
Style/SingleArgumentDig:
Enabled: false
Style/SlicingWithRange:
Enabled: false
Style/StringConcatenation:
Enabled: false
Layout/BeginEndAlignment: # (new in 0.91)
Enabled: false
Lint/ConstantDefinitionInBlock: # (new in 0.91)
Enabled: false
Lint/DuplicateRequire: # (new in 0.90)
Enabled: false
Lint/EmptyFile: # (new in 0.90)
Enabled: false
Lint/HashCompareByIdentity: # (new in 0.93)
Enabled: false
Lint/IdentityComparison: # (new in 0.91)
Enabled: false
Lint/RedundantSafeNavigation: # (new in 0.93)
Enabled: false
Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
Enabled: false
Lint/UselessMethodDefinition: # (new in 0.90)
Enabled: false
Lint/UselessTimes: # (new in 0.91)
Enabled: false
Style/ClassEqualityComparison: # (new in 0.93)
Enabled: false
Style/CombinableLoops: # (new in 0.90)
Enabled: false
Style/KeywordParametersOrder: # (new in 0.90)
Enabled: false
Style/RedundantSelfAssignment: # (new in 0.90)
Enabled: false
Style/SoleNestedConditional: # (new in 0.89)
Enabled: false
Lint/DuplicateBranch: # (new in 1.3)
Enabled: false
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
Enabled: false
Lint/EmptyBlock: # (new in 1.1)
Enabled: false
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
Enabled: false
Lint/ToEnumArguments: # (new in 1.1)
Enabled: false
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
Enabled: false
Style/ArgumentsForwarding: # (new in 1.1)
Enabled: false
Style/CollectionCompact: # (new in 1.2)
Enabled: false
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
Enabled: false
Style/NegatedIfElseCondition: # (new in 1.2)
Enabled: false
Style/NilLambda: # (new in 1.3)
Enabled: false
Style/SwapValues: # (new in 1.1)
Enabled: false
Naming/VariableNumber:
Enabled: false
Lint/DuplicateCaseCondition:
Enabled: false