rubomatic 0.0.1.pre.rc.2 → 1.0.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +40 -0
- data/configs/brands_insurance/rubocop.yml +2 -0
- data/configs/brands_insurance/style.yml +2 -0
- data/configs/bundler.yml +80 -0
- data/configs/gemspec.yml +2 -0
- data/configs/gemspec_on.yml +71 -0
- data/configs/layout.yml +1204 -0
- data/configs/lint.yml +987 -0
- data/configs/metrics.yml +110 -0
- data/configs/migration.yml +6 -0
- data/configs/naming.yml +316 -0
- data/configs/performance.yml +128 -0
- data/configs/rails.yml +1054 -0
- data/configs/rubocop.yml +37 -0
- data/configs/security.yml +53 -0
- data/configs/style.yml +2503 -0
- data/lib/rubomatic/version.rb +1 -1
- metadata +16 -1
data/configs/lint.yml
ADDED
@@ -0,0 +1,987 @@
|
|
1
|
+
Lint/AmbiguousAssignment:
|
2
|
+
Description: 'Checks for mistyped shorthand assignments.'
|
3
|
+
Enabled: true
|
4
|
+
VersionAdded: '1.7'
|
5
|
+
|
6
|
+
Lint/AmbiguousBlockAssociation:
|
7
|
+
Description: >-
|
8
|
+
Checks for ambiguous block association with method when param passed without
|
9
|
+
parentheses.
|
10
|
+
StyleGuide: '#syntax'
|
11
|
+
Enabled: true
|
12
|
+
VersionAdded: '0.48'
|
13
|
+
VersionChanged: '1.13'
|
14
|
+
AllowedMethods: [ ]
|
15
|
+
AllowedPatterns: [ ]
|
16
|
+
|
17
|
+
Lint/AmbiguousOperator:
|
18
|
+
Description: >-
|
19
|
+
Checks for ambiguous operators in the first argument of a
|
20
|
+
method invocation without parentheses.
|
21
|
+
StyleGuide: '#method-invocation-parens'
|
22
|
+
Enabled: true
|
23
|
+
VersionAdded: '0.17'
|
24
|
+
VersionChanged: '0.83'
|
25
|
+
|
26
|
+
Lint/AmbiguousOperatorPrecedence:
|
27
|
+
Description: >-
|
28
|
+
Checks for expressions containing multiple binary operations with
|
29
|
+
ambiguous precedence.
|
30
|
+
Enabled: true
|
31
|
+
VersionAdded: '1.21'
|
32
|
+
|
33
|
+
Lint/AmbiguousRange:
|
34
|
+
Description: Checks for ranges with ambiguous boundaries.
|
35
|
+
Enabled: true
|
36
|
+
VersionAdded: '1.19'
|
37
|
+
SafeAutoCorrect: false
|
38
|
+
RequireParenthesesForMethodChains: true
|
39
|
+
|
40
|
+
Lint/AmbiguousRegexpLiteral:
|
41
|
+
Description: >-
|
42
|
+
Checks for ambiguous regexp literals in the first argument of
|
43
|
+
a method invocation without parentheses.
|
44
|
+
Enabled: true
|
45
|
+
VersionAdded: '0.17'
|
46
|
+
VersionChanged: '0.83'
|
47
|
+
|
48
|
+
Lint/AssignmentInCondition:
|
49
|
+
Description: "Don't use assignment in conditions."
|
50
|
+
StyleGuide: '#safe-assignment-in-condition'
|
51
|
+
Enabled: true
|
52
|
+
VersionAdded: '0.9'
|
53
|
+
AllowSafeAssignment: false
|
54
|
+
|
55
|
+
Lint/BigDecimalNew:
|
56
|
+
Description: '`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead.'
|
57
|
+
Enabled: true
|
58
|
+
VersionAdded: '0.53'
|
59
|
+
|
60
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
61
|
+
Description: 'Checks for places where binary operator has identical operands.'
|
62
|
+
Enabled: true
|
63
|
+
Safe: false
|
64
|
+
VersionAdded: '0.89'
|
65
|
+
VersionChanged: '1.7'
|
66
|
+
|
67
|
+
Lint/BooleanSymbol:
|
68
|
+
Description: 'Check for `:true` and `:false` symbols.'
|
69
|
+
Enabled: true
|
70
|
+
SafeAutoCorrect: false
|
71
|
+
VersionAdded: '0.50'
|
72
|
+
VersionChanged: '1.22'
|
73
|
+
|
74
|
+
Lint/CircularArgumentReference:
|
75
|
+
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
|
76
|
+
Enabled: true
|
77
|
+
VersionAdded: '0.33'
|
78
|
+
|
79
|
+
Lint/ConstantDefinitionInBlock:
|
80
|
+
Description: 'Do not define constants within a block.'
|
81
|
+
StyleGuide: '#no-constant-definition-in-block'
|
82
|
+
Enabled: true
|
83
|
+
VersionAdded: '0.91'
|
84
|
+
VersionChanged: '1.3'
|
85
|
+
# `enums` for Typed Enums via T::Enum in Sorbet.
|
86
|
+
# https://sorbet.org/docs/tenum
|
87
|
+
AllowedMethods:
|
88
|
+
- enums
|
89
|
+
|
90
|
+
Lint/ConstantOverwrittenInRescue:
|
91
|
+
Description: 'Checks for overwriting an exception with an exception result by use `rescue =>`.'
|
92
|
+
Enabled: true
|
93
|
+
VersionAdded: '1.31'
|
94
|
+
|
95
|
+
Lint/ConstantResolution:
|
96
|
+
Description: 'Check that constants are fully qualified with `::`.'
|
97
|
+
Enabled: false
|
98
|
+
VersionAdded: '0.86'
|
99
|
+
# Restrict this cop to only looking at certain names
|
100
|
+
Only: [ ]
|
101
|
+
# Restrict this cop from only looking at certain names
|
102
|
+
Ignore: [ ]
|
103
|
+
|
104
|
+
Lint/Debugger:
|
105
|
+
Description: 'Check for debugger calls.'
|
106
|
+
Enabled: true
|
107
|
+
VersionAdded: '0.14'
|
108
|
+
VersionChanged: '1.10'
|
109
|
+
DebuggerMethods:
|
110
|
+
# Groups are available so that a specific group can be disabled in
|
111
|
+
# a user's configuration, but are otherwise not significant.
|
112
|
+
Kernel:
|
113
|
+
- binding.irb
|
114
|
+
- Kernel.binding.irb
|
115
|
+
Byebug:
|
116
|
+
- byebug
|
117
|
+
- remote_byebug
|
118
|
+
- Kernel.byebug
|
119
|
+
- Kernel.remote_byebug
|
120
|
+
Capybara:
|
121
|
+
- save_and_open_page
|
122
|
+
- save_and_open_screenshot
|
123
|
+
debug.rb:
|
124
|
+
- binding.b
|
125
|
+
- binding.break
|
126
|
+
- Kernel.binding.b
|
127
|
+
- Kernel.binding.break
|
128
|
+
Pry:
|
129
|
+
- binding.pry
|
130
|
+
- binding.remote_pry
|
131
|
+
- binding.pry_remote
|
132
|
+
- Kernel.binding.pry
|
133
|
+
- Kernel.binding.remote_pry
|
134
|
+
- Kernel.binding.pry_remote
|
135
|
+
- Pry.rescue
|
136
|
+
Rails:
|
137
|
+
- debugger
|
138
|
+
- Kernel.debugger
|
139
|
+
RubyJard:
|
140
|
+
- jard
|
141
|
+
WebConsole:
|
142
|
+
- binding.console
|
143
|
+
Exclude:
|
144
|
+
- 'spec/**/*'
|
145
|
+
|
146
|
+
Lint/DeprecatedClassMethods:
|
147
|
+
Description: 'Check for deprecated class method calls.'
|
148
|
+
Enabled: true
|
149
|
+
VersionAdded: '0.19'
|
150
|
+
|
151
|
+
Lint/DeprecatedConstants:
|
152
|
+
Description: 'Checks for deprecated constants.'
|
153
|
+
Enabled: true
|
154
|
+
VersionAdded: '1.8'
|
155
|
+
VersionChanged: '1.40'
|
156
|
+
# You can configure deprecated constants.
|
157
|
+
# If there is an alternative method, you can set alternative value as `Alternative`.
|
158
|
+
# And you can set the deprecated version as `DeprecatedVersion`.
|
159
|
+
# These options can be omitted if they are not needed.
|
160
|
+
#
|
161
|
+
# DeprecatedConstants:
|
162
|
+
# 'DEPRECATED_CONSTANT':
|
163
|
+
# Alternative: 'alternative_value'
|
164
|
+
# DeprecatedVersion: 'deprecated_version'
|
165
|
+
#
|
166
|
+
DeprecatedConstants:
|
167
|
+
'NIL':
|
168
|
+
Alternative: 'nil'
|
169
|
+
DeprecatedVersion: '2.4'
|
170
|
+
'TRUE':
|
171
|
+
Alternative: 'true'
|
172
|
+
DeprecatedVersion: '2.4'
|
173
|
+
'FALSE':
|
174
|
+
Alternative: 'false'
|
175
|
+
DeprecatedVersion: '2.4'
|
176
|
+
'Net::HTTPServerException':
|
177
|
+
Alternative: 'Net::HTTPClientException'
|
178
|
+
DeprecatedVersion: '2.6'
|
179
|
+
'Random::DEFAULT':
|
180
|
+
Alternative: 'Random.new'
|
181
|
+
DeprecatedVersion: '3.0'
|
182
|
+
'Struct::Group':
|
183
|
+
Alternative: 'Etc::Group'
|
184
|
+
DeprecatedVersion: '3.0'
|
185
|
+
'Struct::Passwd':
|
186
|
+
Alternative: 'Etc::Passwd'
|
187
|
+
DeprecatedVersion: '3.0'
|
188
|
+
|
189
|
+
Lint/DeprecatedOpenSSLConstant:
|
190
|
+
Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
|
191
|
+
Enabled: true
|
192
|
+
VersionAdded: '0.84'
|
193
|
+
|
194
|
+
Lint/DisjunctiveAssignmentInConstructor:
|
195
|
+
Description: 'In constructor, plain assignment is preferred over disjunctive.'
|
196
|
+
Enabled: true
|
197
|
+
Safe: false
|
198
|
+
VersionAdded: '0.62'
|
199
|
+
VersionChanged: '0.88'
|
200
|
+
|
201
|
+
Lint/DuplicateBranch:
|
202
|
+
Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.
|
203
|
+
Enabled: true
|
204
|
+
VersionAdded: '1.3'
|
205
|
+
VersionChanged: '1.7'
|
206
|
+
IgnoreLiteralBranches: true
|
207
|
+
IgnoreConstantBranches: true
|
208
|
+
|
209
|
+
Lint/DuplicateCaseCondition:
|
210
|
+
Description: 'Do not repeat values in case conditionals.'
|
211
|
+
Enabled: true
|
212
|
+
VersionAdded: '0.45'
|
213
|
+
|
214
|
+
Lint/DuplicateElsifCondition:
|
215
|
+
Description: 'Do not repeat conditions used in if `elsif`.'
|
216
|
+
Enabled: true
|
217
|
+
VersionAdded: '0.88'
|
218
|
+
|
219
|
+
Lint/DuplicateHashKey:
|
220
|
+
Description: 'Check for duplicate keys in hash literals.'
|
221
|
+
Enabled: true
|
222
|
+
VersionAdded: '0.34'
|
223
|
+
VersionChanged: '0.77'
|
224
|
+
|
225
|
+
Lint/DuplicateMagicComment:
|
226
|
+
Description: 'Check for duplicated magic comments.'
|
227
|
+
Enabled: true
|
228
|
+
VersionAdded: '1.37'
|
229
|
+
|
230
|
+
Lint/DuplicateMethods:
|
231
|
+
Description: 'Check for duplicate method definitions.'
|
232
|
+
Enabled: true
|
233
|
+
VersionAdded: '0.29'
|
234
|
+
|
235
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
236
|
+
Description: 'Checks for duplicate elements in Regexp character classes.'
|
237
|
+
Enabled: true
|
238
|
+
VersionAdded: '1.1'
|
239
|
+
|
240
|
+
Lint/DuplicateRequire:
|
241
|
+
Description: 'Check for duplicate `require`s and `require_relative`s.'
|
242
|
+
Enabled: true
|
243
|
+
SafeAutoCorrect: false
|
244
|
+
VersionAdded: '0.90'
|
245
|
+
VersionChanged: '1.28'
|
246
|
+
|
247
|
+
Lint/DuplicateRescueException:
|
248
|
+
Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.'
|
249
|
+
Enabled: true
|
250
|
+
VersionAdded: '0.89'
|
251
|
+
|
252
|
+
Lint/EachWithObjectArgument:
|
253
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
254
|
+
Enabled: true
|
255
|
+
VersionAdded: '0.31'
|
256
|
+
|
257
|
+
Lint/ElseLayout:
|
258
|
+
Description: 'Check for odd code arrangement in an else block.'
|
259
|
+
Enabled: true
|
260
|
+
VersionAdded: '0.17'
|
261
|
+
VersionChanged: '1.2'
|
262
|
+
|
263
|
+
Lint/EmptyBlock:
|
264
|
+
Description: 'Checks for blocks without a body.'
|
265
|
+
Enabled: true
|
266
|
+
VersionAdded: '1.1'
|
267
|
+
VersionChanged: '1.15'
|
268
|
+
AllowComments: true
|
269
|
+
AllowEmptyLambdas: true
|
270
|
+
|
271
|
+
Lint/EmptyClass:
|
272
|
+
Description: 'Checks for classes and metaclasses without a body.'
|
273
|
+
Enabled: true
|
274
|
+
VersionAdded: '1.3'
|
275
|
+
AllowComments: true
|
276
|
+
|
277
|
+
Lint/EmptyConditionalBody:
|
278
|
+
Description: 'Checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
279
|
+
Enabled: true
|
280
|
+
SafeAutoCorrect: false
|
281
|
+
AllowComments: true
|
282
|
+
VersionAdded: '0.89'
|
283
|
+
VersionChanged: '1.34'
|
284
|
+
|
285
|
+
Lint/EmptyEnsure:
|
286
|
+
Description: 'Checks for empty ensure block.'
|
287
|
+
Enabled: true
|
288
|
+
VersionAdded: '0.10'
|
289
|
+
VersionChanged: '0.48'
|
290
|
+
|
291
|
+
Lint/EmptyExpression:
|
292
|
+
Description: 'Checks for empty expressions.'
|
293
|
+
Enabled: true
|
294
|
+
VersionAdded: '0.45'
|
295
|
+
|
296
|
+
Lint/EmptyFile:
|
297
|
+
Description: 'Enforces that Ruby source files are not empty.'
|
298
|
+
Enabled: true
|
299
|
+
AllowComments: true
|
300
|
+
VersionAdded: '0.90'
|
301
|
+
|
302
|
+
Lint/EmptyInPattern:
|
303
|
+
Description: 'Checks for the presence of `in` pattern branches without a body.'
|
304
|
+
Enabled: true
|
305
|
+
AllowComments: true
|
306
|
+
VersionAdded: '1.16'
|
307
|
+
|
308
|
+
Lint/EmptyInterpolation:
|
309
|
+
Description: 'Checks for empty string interpolation.'
|
310
|
+
Enabled: true
|
311
|
+
VersionAdded: '0.20'
|
312
|
+
VersionChanged: '0.45'
|
313
|
+
|
314
|
+
Lint/EmptyWhen:
|
315
|
+
Description: 'Checks for `when` branches with empty bodies.'
|
316
|
+
Enabled: true
|
317
|
+
AllowComments: true
|
318
|
+
VersionAdded: '0.45'
|
319
|
+
VersionChanged: '0.83'
|
320
|
+
|
321
|
+
Lint/EnsureReturn:
|
322
|
+
Description: 'Do not use return in an ensure block.'
|
323
|
+
StyleGuide: '#no-return-ensure'
|
324
|
+
Enabled: true
|
325
|
+
VersionAdded: '0.9'
|
326
|
+
VersionChanged: '0.83'
|
327
|
+
|
328
|
+
Lint/ErbNewArguments:
|
329
|
+
Description: 'Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`.'
|
330
|
+
Enabled: true
|
331
|
+
VersionAdded: '0.56'
|
332
|
+
|
333
|
+
Lint/FlipFlop:
|
334
|
+
Description: 'Checks for flip-flops.'
|
335
|
+
StyleGuide: '#no-flip-flops'
|
336
|
+
Enabled: true
|
337
|
+
VersionAdded: '0.16'
|
338
|
+
|
339
|
+
Lint/FloatComparison:
|
340
|
+
Description: 'Checks for the presence of precise comparison of floating point numbers.'
|
341
|
+
StyleGuide: '#float-comparison'
|
342
|
+
Enabled: true
|
343
|
+
VersionAdded: '0.89'
|
344
|
+
|
345
|
+
Lint/FloatOutOfRange:
|
346
|
+
Description: >-
|
347
|
+
Catches floating-point literals too large or small for Ruby to
|
348
|
+
represent.
|
349
|
+
Enabled: true
|
350
|
+
VersionAdded: '0.36'
|
351
|
+
|
352
|
+
Lint/FormatParameterMismatch:
|
353
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
354
|
+
Enabled: true
|
355
|
+
VersionAdded: '0.33'
|
356
|
+
|
357
|
+
Lint/HashCompareByIdentity:
|
358
|
+
Description: 'Prefer using `Hash#compare_by_identity` than using `object_id` for keys.'
|
359
|
+
StyleGuide: '#identity-comparison'
|
360
|
+
Enabled: true
|
361
|
+
Safe: false
|
362
|
+
VersionAdded: '0.93'
|
363
|
+
|
364
|
+
Lint/HeredocMethodCallPosition:
|
365
|
+
Description: >-
|
366
|
+
Checks for the ordering of a method call where
|
367
|
+
the receiver of the call is a HEREDOC.
|
368
|
+
Enabled: true
|
369
|
+
StyleGuide: '#heredoc-method-calls'
|
370
|
+
VersionAdded: '0.68'
|
371
|
+
|
372
|
+
Lint/IdentityComparison:
|
373
|
+
Description: 'Prefer `equal?` over `==` when comparing `object_id`.'
|
374
|
+
Enabled: true
|
375
|
+
StyleGuide: '#identity-comparison'
|
376
|
+
VersionAdded: '0.91'
|
377
|
+
|
378
|
+
Lint/ImplicitStringConcatenation:
|
379
|
+
Description: >-
|
380
|
+
Checks for adjacent string literals on the same line, which
|
381
|
+
could better be represented as a single string literal.
|
382
|
+
Enabled: true
|
383
|
+
VersionAdded: '0.36'
|
384
|
+
|
385
|
+
Lint/IncompatibleIoSelectWithFiberScheduler:
|
386
|
+
Description: 'Checks for `IO.select` that is incompatible with Fiber Scheduler.'
|
387
|
+
Enabled: true
|
388
|
+
SafeAutoCorrect: false
|
389
|
+
VersionAdded: '1.21'
|
390
|
+
VersionChanged: '1.24'
|
391
|
+
|
392
|
+
Lint/IneffectiveAccessModifier:
|
393
|
+
Description: >-
|
394
|
+
Checks for attempts to use `private` or `protected` to set
|
395
|
+
the visibility of a class method, which does not work.
|
396
|
+
Enabled: true
|
397
|
+
VersionAdded: '0.36'
|
398
|
+
|
399
|
+
Lint/InheritException:
|
400
|
+
Description: 'Avoid inheriting from the `Exception` class.'
|
401
|
+
Enabled: true
|
402
|
+
SafeAutoCorrect: false
|
403
|
+
VersionAdded: '0.41'
|
404
|
+
VersionChanged: '1.26'
|
405
|
+
# The default base class in favour of `Exception`.
|
406
|
+
EnforcedStyle: standard_error
|
407
|
+
SupportedStyles:
|
408
|
+
- standard_error
|
409
|
+
- runtime_error
|
410
|
+
|
411
|
+
Lint/InterpolationCheck:
|
412
|
+
Description: 'Checks for interpolation in a single quoted string.'
|
413
|
+
Enabled: true
|
414
|
+
SafeAutoCorrect: false
|
415
|
+
VersionAdded: '0.50'
|
416
|
+
VersionChanged: '1.40'
|
417
|
+
|
418
|
+
Lint/LambdaWithoutLiteralBlock:
|
419
|
+
Description: 'Checks uses of lambda without a literal block.'
|
420
|
+
Enabled: true
|
421
|
+
VersionAdded: '1.8'
|
422
|
+
|
423
|
+
Lint/LiteralAsCondition:
|
424
|
+
Description: 'Checks of literals used in conditions.'
|
425
|
+
Enabled: true
|
426
|
+
VersionAdded: '0.51'
|
427
|
+
|
428
|
+
Lint/LiteralInInterpolation:
|
429
|
+
Description: 'Checks for literals used in interpolation.'
|
430
|
+
Enabled: true
|
431
|
+
VersionAdded: '0.19'
|
432
|
+
VersionChanged: '0.32'
|
433
|
+
|
434
|
+
Lint/Loop:
|
435
|
+
Description: >-
|
436
|
+
Use Kernel#loop with break rather than begin/end/until or
|
437
|
+
begin/end/while for post-loop tests.
|
438
|
+
StyleGuide: '#loop-with-break'
|
439
|
+
Enabled: true
|
440
|
+
VersionAdded: '0.9'
|
441
|
+
VersionChanged: '1.3'
|
442
|
+
Safe: false
|
443
|
+
|
444
|
+
Lint/MissingCopEnableDirective:
|
445
|
+
Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
|
446
|
+
Enabled: true
|
447
|
+
VersionAdded: '0.52'
|
448
|
+
# Maximum number of consecutive lines the cop can be disabled for.
|
449
|
+
# 0 allows only single-line disables
|
450
|
+
# 1 would mean the maximum allowed is the following:
|
451
|
+
# # rubocop:disable SomeCop
|
452
|
+
# a = 1
|
453
|
+
# # rubocop:enable SomeCop
|
454
|
+
# .inf for any size
|
455
|
+
MaximumRangeSize: .inf
|
456
|
+
|
457
|
+
Lint/MissingSuper:
|
458
|
+
Description: >-
|
459
|
+
Checks for the presence of constructors and lifecycle callbacks
|
460
|
+
without calls to `super`.
|
461
|
+
Enabled: true
|
462
|
+
VersionAdded: '0.89'
|
463
|
+
VersionChanged: '1.4'
|
464
|
+
|
465
|
+
Lint/MixedRegexpCaptureTypes:
|
466
|
+
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
467
|
+
Enabled: true
|
468
|
+
VersionAdded: '0.85'
|
469
|
+
|
470
|
+
Lint/MultipleComparison:
|
471
|
+
Description: "Use `&&` operator to compare multiple values."
|
472
|
+
Enabled: true
|
473
|
+
VersionAdded: '0.47'
|
474
|
+
VersionChanged: '1.1'
|
475
|
+
|
476
|
+
Lint/NestedMethodDefinition:
|
477
|
+
Description: 'Do not use nested method definitions.'
|
478
|
+
StyleGuide: '#no-nested-methods'
|
479
|
+
Enabled: true
|
480
|
+
AllowedMethods: [ ]
|
481
|
+
AllowedPatterns: [ ]
|
482
|
+
VersionAdded: '0.32'
|
483
|
+
|
484
|
+
Lint/NestedPercentLiteral:
|
485
|
+
Description: 'Checks for nested percent literals.'
|
486
|
+
Enabled: true
|
487
|
+
VersionAdded: '0.52'
|
488
|
+
|
489
|
+
Lint/NextWithoutAccumulator:
|
490
|
+
Description: >-
|
491
|
+
Do not omit the accumulator when calling `next`
|
492
|
+
in a `reduce`/`inject` block.
|
493
|
+
Enabled: true
|
494
|
+
VersionAdded: '0.36'
|
495
|
+
|
496
|
+
Lint/NoReturnInBeginEndBlocks:
|
497
|
+
Description: 'Do not `return` inside `begin..end` blocks in assignment contexts.'
|
498
|
+
Enabled: true
|
499
|
+
VersionAdded: '1.2'
|
500
|
+
|
501
|
+
Lint/NonAtomicFileOperation:
|
502
|
+
Description: Checks for non-atomic file operations.
|
503
|
+
StyleGuide: '#atomic-file-operations'
|
504
|
+
Enabled: true
|
505
|
+
VersionAdded: '1.31'
|
506
|
+
SafeAutoCorrect: false
|
507
|
+
|
508
|
+
Lint/NonDeterministicRequireOrder:
|
509
|
+
Description: 'Always sort arrays returned by Dir.glob when requiring files.'
|
510
|
+
# Enabled for all ruby versions old than v3.0
|
511
|
+
Enabled: <%= ENV['RUBY_MAJOR'].to_f < 3.0 %>
|
512
|
+
VersionAdded: '0.78'
|
513
|
+
Safe: false
|
514
|
+
|
515
|
+
Lint/NonLocalExitFromIterator:
|
516
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
517
|
+
Enabled: true
|
518
|
+
VersionAdded: '0.30'
|
519
|
+
|
520
|
+
Lint/NumberConversion:
|
521
|
+
Description: 'Checks unsafe usage of number conversion methods.'
|
522
|
+
Enabled: false
|
523
|
+
VersionAdded: '0.53'
|
524
|
+
VersionChanged: '1.1'
|
525
|
+
SafeAutoCorrect: false
|
526
|
+
# Add Rails' duration methods to the ignore list for `Lint/NumberConversion`
|
527
|
+
# so that calling `to_i` on one of these does not register an offense.
|
528
|
+
# See: https://github.com/rubocop/rubocop/issues/8950
|
529
|
+
AllowedMethods:
|
530
|
+
- ago
|
531
|
+
- from_now
|
532
|
+
- second
|
533
|
+
- seconds
|
534
|
+
- minute
|
535
|
+
- minutes
|
536
|
+
- hour
|
537
|
+
- hours
|
538
|
+
- day
|
539
|
+
- days
|
540
|
+
- week
|
541
|
+
- weeks
|
542
|
+
- fortnight
|
543
|
+
- fortnights
|
544
|
+
- in_milliseconds
|
545
|
+
AllowedPatterns: [ ]
|
546
|
+
IgnoredClasses:
|
547
|
+
- Time
|
548
|
+
- DateTime
|
549
|
+
|
550
|
+
Lint/NumberedParameterAssignment:
|
551
|
+
Description: 'Checks for uses of numbered parameter assignment.'
|
552
|
+
Enabled: true
|
553
|
+
VersionAdded: '1.9'
|
554
|
+
|
555
|
+
Lint/OrAssignmentToConstant:
|
556
|
+
Description: 'Checks unintended or-assignment to constant.'
|
557
|
+
Enabled: true
|
558
|
+
Safe: false
|
559
|
+
VersionAdded: '1.9'
|
560
|
+
|
561
|
+
Lint/OrderedMagicComments:
|
562
|
+
Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
|
563
|
+
Enabled: true
|
564
|
+
SafeAutoCorrect: false
|
565
|
+
VersionAdded: '0.53'
|
566
|
+
VersionChanged: '1.37'
|
567
|
+
|
568
|
+
Lint/OutOfRangeRegexpRef:
|
569
|
+
Description: 'Checks for out of range reference for Regexp because it always returns nil.'
|
570
|
+
Enabled: true
|
571
|
+
Safe: false
|
572
|
+
VersionAdded: '0.89'
|
573
|
+
|
574
|
+
Lint/ParenthesesAsGroupedExpression:
|
575
|
+
Description: >-
|
576
|
+
Checks for method calls with a space before the opening
|
577
|
+
parenthesis.
|
578
|
+
StyleGuide: '#parens-no-spaces'
|
579
|
+
Enabled: true
|
580
|
+
VersionAdded: '0.12'
|
581
|
+
VersionChanged: '0.83'
|
582
|
+
|
583
|
+
Lint/PercentStringArray:
|
584
|
+
Description: >-
|
585
|
+
Checks for unwanted commas and quotes in %w/%W literals.
|
586
|
+
Enabled: true
|
587
|
+
Safe: false
|
588
|
+
VersionAdded: '0.41'
|
589
|
+
|
590
|
+
Lint/PercentSymbolArray:
|
591
|
+
Description: >-
|
592
|
+
Checks for unwanted commas and colons in %i/%I literals.
|
593
|
+
Enabled: true
|
594
|
+
VersionAdded: '0.41'
|
595
|
+
|
596
|
+
Lint/RaiseException:
|
597
|
+
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
598
|
+
StyleGuide: '#raise-exception'
|
599
|
+
Enabled: true
|
600
|
+
Safe: false
|
601
|
+
VersionAdded: '0.81'
|
602
|
+
VersionChanged: '0.86'
|
603
|
+
AllowedImplicitNamespaces:
|
604
|
+
- 'Gem'
|
605
|
+
|
606
|
+
Lint/RandOne:
|
607
|
+
Description: >-
|
608
|
+
Checks for `rand(1)` calls. Such calls always return `0`
|
609
|
+
and most likely a mistake.
|
610
|
+
Enabled: true
|
611
|
+
VersionAdded: '0.36'
|
612
|
+
|
613
|
+
Lint/RedundantCopDisableDirective:
|
614
|
+
Description: >-
|
615
|
+
Checks for rubocop:disable comments that can be removed.
|
616
|
+
Note: this cop is not disabled when disabling all cops.
|
617
|
+
It must be explicitly disabled.
|
618
|
+
Enabled: true
|
619
|
+
VersionAdded: '0.76'
|
620
|
+
|
621
|
+
Lint/RedundantCopEnableDirective:
|
622
|
+
Description: Checks for rubocop:enable comments that can be removed.
|
623
|
+
Enabled: true
|
624
|
+
VersionAdded: '0.76'
|
625
|
+
|
626
|
+
Lint/RedundantDirGlobSort:
|
627
|
+
Description: 'Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.'
|
628
|
+
# Enabled for all ruby versions 3+
|
629
|
+
Enabled: <%= ENV['RUBY_MAJOR'].to_f >= 3.0 %>
|
630
|
+
VersionAdded: '1.8'
|
631
|
+
VersionChanged: '1.26'
|
632
|
+
SafeAutoCorrect: false
|
633
|
+
|
634
|
+
Lint/RedundantRequireStatement:
|
635
|
+
Description: 'Checks for unnecessary `require` statement.'
|
636
|
+
Enabled: true
|
637
|
+
VersionAdded: '0.76'
|
638
|
+
|
639
|
+
Lint/RedundantSafeNavigation:
|
640
|
+
Description: 'Checks for redundant safe navigation calls.'
|
641
|
+
Enabled: true
|
642
|
+
VersionAdded: '0.93'
|
643
|
+
AllowedMethods:
|
644
|
+
- instance_of?
|
645
|
+
- kind_of?
|
646
|
+
- is_a?
|
647
|
+
- eql?
|
648
|
+
- respond_to?
|
649
|
+
- equal?
|
650
|
+
Safe: false
|
651
|
+
|
652
|
+
Lint/RedundantSplatExpansion:
|
653
|
+
Description: 'Checks for splat unnecessarily being called on literals.'
|
654
|
+
Enabled: true
|
655
|
+
VersionAdded: '0.76'
|
656
|
+
VersionChanged: '1.7'
|
657
|
+
AllowPercentLiteralArrayArgument: true
|
658
|
+
|
659
|
+
Lint/RedundantStringCoercion:
|
660
|
+
Description: 'Checks for Object#to_s usage in string interpolation.'
|
661
|
+
StyleGuide: '#no-to-s'
|
662
|
+
Enabled: true
|
663
|
+
VersionAdded: '0.19'
|
664
|
+
VersionChanged: '0.77'
|
665
|
+
|
666
|
+
Lint/RedundantWithIndex:
|
667
|
+
Description: 'Checks for redundant `with_index`.'
|
668
|
+
Enabled: true
|
669
|
+
VersionAdded: '0.50'
|
670
|
+
|
671
|
+
Lint/RedundantWithObject:
|
672
|
+
Description: 'Checks for redundant `with_object`.'
|
673
|
+
Enabled: true
|
674
|
+
VersionAdded: '0.51'
|
675
|
+
|
676
|
+
Lint/RefinementImportMethods:
|
677
|
+
Description: 'Use `Refinement#import_methods` when using `include` or `prepend` in `refine` block.'
|
678
|
+
Enabled: true
|
679
|
+
SafeAutoCorrect: false
|
680
|
+
VersionAdded: '1.27'
|
681
|
+
|
682
|
+
Lint/RegexpAsCondition:
|
683
|
+
Description: >-
|
684
|
+
Do not use regexp literal as a condition.
|
685
|
+
The regexp literal matches `$_` implicitly.
|
686
|
+
Enabled: true
|
687
|
+
VersionAdded: '0.51'
|
688
|
+
VersionChanged: '0.86'
|
689
|
+
|
690
|
+
Lint/RequireParentheses:
|
691
|
+
Description: >-
|
692
|
+
Use parentheses in the method call to avoid confusion
|
693
|
+
about precedence.
|
694
|
+
Enabled: true
|
695
|
+
VersionAdded: '0.18'
|
696
|
+
|
697
|
+
Lint/RequireRangeParentheses:
|
698
|
+
Description: 'Checks that a range literal is enclosed in parentheses when the end of the range is at a line break.'
|
699
|
+
Enabled: true
|
700
|
+
VersionAdded: '1.32'
|
701
|
+
|
702
|
+
Lint/RequireRelativeSelfPath:
|
703
|
+
Description: 'Checks for uses a file requiring itself with `require_relative`.'
|
704
|
+
Enabled: true
|
705
|
+
VersionAdded: '1.22'
|
706
|
+
|
707
|
+
Lint/RescueException:
|
708
|
+
Description: 'Avoid rescuing the Exception class.'
|
709
|
+
StyleGuide: '#no-blind-rescues'
|
710
|
+
Enabled: true
|
711
|
+
VersionAdded: '0.9'
|
712
|
+
VersionChanged: '0.27'
|
713
|
+
|
714
|
+
Lint/RescueType:
|
715
|
+
Description: 'Avoid rescuing from non constants that could result in a `TypeError`.'
|
716
|
+
Enabled: true
|
717
|
+
VersionAdded: '0.49'
|
718
|
+
|
719
|
+
Lint/ReturnInVoidContext:
|
720
|
+
Description: 'Checks for return in void context.'
|
721
|
+
Enabled: true
|
722
|
+
VersionAdded: '0.50'
|
723
|
+
|
724
|
+
Lint/SafeNavigationChain:
|
725
|
+
Description: 'Do not chain ordinary method call after safe navigation operator.'
|
726
|
+
Enabled: true
|
727
|
+
VersionAdded: '0.47'
|
728
|
+
VersionChanged: '0.77'
|
729
|
+
AllowedMethods:
|
730
|
+
- present?
|
731
|
+
- blank?
|
732
|
+
- presence
|
733
|
+
- try
|
734
|
+
- try!
|
735
|
+
- in?
|
736
|
+
|
737
|
+
Lint/SafeNavigationConsistency:
|
738
|
+
Description: >-
|
739
|
+
Check to make sure that if safe navigation is used for a method
|
740
|
+
call in an `&&` or `||` condition that safe navigation is used
|
741
|
+
for all method calls on that same object.
|
742
|
+
Enabled: true
|
743
|
+
VersionAdded: '0.55'
|
744
|
+
VersionChanged: '0.77'
|
745
|
+
AllowedMethods:
|
746
|
+
- present?
|
747
|
+
- blank?
|
748
|
+
- presence
|
749
|
+
- try
|
750
|
+
- try!
|
751
|
+
|
752
|
+
Lint/SafeNavigationWithEmpty:
|
753
|
+
Description: 'Avoid `foo&.empty?` in conditionals.'
|
754
|
+
Enabled: true
|
755
|
+
VersionAdded: '0.62'
|
756
|
+
VersionChanged: '0.87'
|
757
|
+
|
758
|
+
Lint/ScriptPermission:
|
759
|
+
Description: 'Grant script file execute permission.'
|
760
|
+
Enabled: true
|
761
|
+
VersionAdded: '0.49'
|
762
|
+
VersionChanged: '0.50'
|
763
|
+
|
764
|
+
Lint/SelfAssignment:
|
765
|
+
Description: 'Checks for self-assignments.'
|
766
|
+
Enabled: true
|
767
|
+
VersionAdded: '0.89'
|
768
|
+
|
769
|
+
Lint/SendWithMixinArgument:
|
770
|
+
Description: 'Checks for `send` method when using mixin.'
|
771
|
+
Enabled: true
|
772
|
+
VersionAdded: '0.75'
|
773
|
+
|
774
|
+
Lint/ShadowedArgument:
|
775
|
+
Description: 'Avoid reassigning arguments before they were used.'
|
776
|
+
Enabled: true
|
777
|
+
VersionAdded: '0.52'
|
778
|
+
IgnoreImplicitReferences: false
|
779
|
+
|
780
|
+
Lint/ShadowedException:
|
781
|
+
Description: >-
|
782
|
+
Avoid rescuing a higher level exception
|
783
|
+
before a lower level exception.
|
784
|
+
Enabled: true
|
785
|
+
VersionAdded: '0.41'
|
786
|
+
|
787
|
+
Lint/ShadowingOuterLocalVariable:
|
788
|
+
Description: >-
|
789
|
+
Do not use the same name as outer local variable
|
790
|
+
for block arguments or block local variables.
|
791
|
+
Enabled: true
|
792
|
+
VersionAdded: '0.9'
|
793
|
+
|
794
|
+
Lint/StructNewOverride:
|
795
|
+
Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.'
|
796
|
+
Enabled: true
|
797
|
+
VersionAdded: '0.81'
|
798
|
+
|
799
|
+
Lint/SuppressedException:
|
800
|
+
Description: "Don't suppress exceptions."
|
801
|
+
StyleGuide: '#dont-hide-exceptions'
|
802
|
+
Enabled: true
|
803
|
+
AllowComments: true
|
804
|
+
AllowNil: true
|
805
|
+
VersionAdded: '0.9'
|
806
|
+
VersionChanged: '1.12'
|
807
|
+
|
808
|
+
Lint/SymbolConversion:
|
809
|
+
Description: 'Checks for unnecessary symbol conversions.'
|
810
|
+
Enabled: true
|
811
|
+
VersionAdded: '1.9'
|
812
|
+
VersionChanged: '1.16'
|
813
|
+
EnforcedStyle: consistent
|
814
|
+
SupportedStyles:
|
815
|
+
- strict
|
816
|
+
- consistent
|
817
|
+
|
818
|
+
Lint/Syntax:
|
819
|
+
Description: 'Checks for syntax errors.'
|
820
|
+
Enabled: true
|
821
|
+
VersionAdded: '0.9'
|
822
|
+
|
823
|
+
Lint/ToEnumArguments:
|
824
|
+
Description: 'Ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
|
825
|
+
Enabled: true
|
826
|
+
VersionAdded: '1.1'
|
827
|
+
|
828
|
+
Lint/ToJSON:
|
829
|
+
Description: 'Ensure #to_json includes an optional argument.'
|
830
|
+
Enabled: true
|
831
|
+
VersionAdded: '0.66'
|
832
|
+
|
833
|
+
Lint/TopLevelReturnWithArgument:
|
834
|
+
Description: 'Detects top level return statements with argument.'
|
835
|
+
Enabled: true
|
836
|
+
VersionAdded: '0.89'
|
837
|
+
|
838
|
+
Lint/TrailingCommaInAttributeDeclaration:
|
839
|
+
Description: 'Checks for trailing commas in attribute declarations.'
|
840
|
+
Enabled: true
|
841
|
+
VersionAdded: '0.90'
|
842
|
+
|
843
|
+
Lint/TripleQuotes:
|
844
|
+
Description: 'Checks for useless triple quote constructs.'
|
845
|
+
Enabled: true
|
846
|
+
VersionAdded: '1.9'
|
847
|
+
|
848
|
+
Lint/UnderscorePrefixedVariableName:
|
849
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
850
|
+
Enabled: true
|
851
|
+
VersionAdded: '0.21'
|
852
|
+
AllowKeywordBlockArguments: false
|
853
|
+
|
854
|
+
Lint/UnexpectedBlockArity:
|
855
|
+
Description: 'Looks for blocks that have fewer arguments that the calling method expects.'
|
856
|
+
Enabled: true
|
857
|
+
Safe: false
|
858
|
+
VersionAdded: '1.5'
|
859
|
+
Methods:
|
860
|
+
chunk_while: 2
|
861
|
+
each_with_index: 2
|
862
|
+
each_with_object: 2
|
863
|
+
inject: 2
|
864
|
+
max: 2
|
865
|
+
min: 2
|
866
|
+
minmax: 2
|
867
|
+
reduce: 2
|
868
|
+
slice_when: 2
|
869
|
+
sort: 2
|
870
|
+
|
871
|
+
Lint/UnifiedInteger:
|
872
|
+
Description: 'Use Integer instead of Fixnum or Bignum.'
|
873
|
+
Enabled: true
|
874
|
+
VersionAdded: '0.43'
|
875
|
+
|
876
|
+
Lint/UnmodifiedReduceAccumulator:
|
877
|
+
Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.
|
878
|
+
Enabled: true
|
879
|
+
VersionAdded: '1.1'
|
880
|
+
VersionChanged: '1.5'
|
881
|
+
|
882
|
+
Lint/UnreachableCode:
|
883
|
+
Description: 'Unreachable code.'
|
884
|
+
Enabled: true
|
885
|
+
VersionAdded: '0.9'
|
886
|
+
|
887
|
+
Lint/UnreachableLoop:
|
888
|
+
Description: 'Checks for loops that will have at most one iteration.'
|
889
|
+
Enabled: true
|
890
|
+
VersionAdded: '0.89'
|
891
|
+
VersionChanged: '1.7'
|
892
|
+
AllowedPatterns:
|
893
|
+
# RSpec uses `times` in its message expectations
|
894
|
+
# eg. `exactly(2).times`
|
895
|
+
- !ruby/regexp /(exactly|at_least|at_most)\(\d+\)\.times/
|
896
|
+
|
897
|
+
Lint/UnusedBlockArgument:
|
898
|
+
Description: 'Checks for unused block arguments.'
|
899
|
+
StyleGuide: '#underscore-unused-vars'
|
900
|
+
Enabled: true
|
901
|
+
VersionAdded: '0.21'
|
902
|
+
VersionChanged: '0.22'
|
903
|
+
IgnoreEmptyBlocks: true
|
904
|
+
AllowUnusedKeywordArguments: false
|
905
|
+
|
906
|
+
Lint/UnusedMethodArgument:
|
907
|
+
Description: 'Checks for unused method arguments.'
|
908
|
+
StyleGuide: '#underscore-unused-vars'
|
909
|
+
Enabled: true
|
910
|
+
VersionAdded: '0.21'
|
911
|
+
VersionChanged: '0.81'
|
912
|
+
AllowUnusedKeywordArguments: false
|
913
|
+
IgnoreEmptyMethods: true
|
914
|
+
IgnoreNotImplementedMethods: true
|
915
|
+
|
916
|
+
Lint/UriEscapeUnescape:
|
917
|
+
Description: >-
|
918
|
+
`URI.escape` method is obsolete and should not be used. Instead, use
|
919
|
+
`CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component`
|
920
|
+
depending on your specific use case.
|
921
|
+
Also `URI.unescape` method is obsolete and should not be used. Instead, use
|
922
|
+
`CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component`
|
923
|
+
depending on your specific use case.
|
924
|
+
Enabled: true
|
925
|
+
VersionAdded: '0.50'
|
926
|
+
|
927
|
+
Lint/UriRegexp:
|
928
|
+
Description: 'Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.'
|
929
|
+
Enabled: true
|
930
|
+
VersionAdded: '0.50'
|
931
|
+
|
932
|
+
Lint/UselessAccessModifier:
|
933
|
+
Description: 'Checks for useless access modifiers.'
|
934
|
+
Enabled: true
|
935
|
+
VersionAdded: '0.20'
|
936
|
+
VersionChanged: '0.83'
|
937
|
+
ContextCreatingMethods: [ ]
|
938
|
+
MethodCreatingMethods: [ ]
|
939
|
+
|
940
|
+
Lint/UselessAssignment:
|
941
|
+
Description: 'Checks for useless assignment to a local variable.'
|
942
|
+
StyleGuide: '#underscore-unused-vars'
|
943
|
+
Enabled: true
|
944
|
+
VersionAdded: '0.11'
|
945
|
+
|
946
|
+
Lint/UselessElseWithoutRescue:
|
947
|
+
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
948
|
+
Enabled: true
|
949
|
+
VersionAdded: '0.17'
|
950
|
+
VersionChanged: '1.31'
|
951
|
+
|
952
|
+
Lint/UselessMethodDefinition:
|
953
|
+
Description: 'Checks for useless method definitions.'
|
954
|
+
Enabled: true
|
955
|
+
VersionAdded: '0.90'
|
956
|
+
VersionChanged: '0.91'
|
957
|
+
Safe: false
|
958
|
+
|
959
|
+
Lint/UselessRescue:
|
960
|
+
Description: 'Checks for useless `rescue`s, which only reraise rescued exceptions.'
|
961
|
+
Enabled: true
|
962
|
+
VersionAdded: '1.43'
|
963
|
+
|
964
|
+
Lint/UselessRuby2Keywords:
|
965
|
+
Description: 'Finds unnecessary uses of `ruby2_keywords`.'
|
966
|
+
Enabled: true
|
967
|
+
VersionAdded: '1.23'
|
968
|
+
|
969
|
+
Lint/UselessSetterCall:
|
970
|
+
Description: 'Checks for useless setter call to a local variable.'
|
971
|
+
Enabled: true
|
972
|
+
SafeAutoCorrect: false
|
973
|
+
VersionAdded: '0.13'
|
974
|
+
VersionChanged: '1.2'
|
975
|
+
Safe: false
|
976
|
+
|
977
|
+
Lint/UselessTimes:
|
978
|
+
Description: 'Checks for useless `Integer#times` calls.'
|
979
|
+
Enabled: true
|
980
|
+
VersionAdded: '0.91'
|
981
|
+
Safe: false
|
982
|
+
|
983
|
+
Lint/Void:
|
984
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
985
|
+
Enabled: true
|
986
|
+
VersionAdded: '0.9'
|
987
|
+
CheckForMethodsWithNoSideEffects: false
|