docquet 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +20 -0
  3. data/LICENSE +21 -0
  4. data/README.md +205 -0
  5. data/config/cops/bundler.yml +19 -0
  6. data/config/cops/capybara.yml +1 -0
  7. data/config/cops/capybara_rspec.yml +1 -0
  8. data/config/cops/gemspec.yml +4 -0
  9. data/config/cops/i18n_gettext.yml +2 -0
  10. data/config/cops/i18n_railsi18n.yml +1 -0
  11. data/config/cops/layout.yml +79 -0
  12. data/config/cops/lint.yml +7 -0
  13. data/config/cops/metrics.yml +14 -0
  14. data/config/cops/migration.yml +2 -0
  15. data/config/cops/naming.yml +4 -0
  16. data/config/cops/performance.yml +7 -0
  17. data/config/cops/rake.yml +5 -0
  18. data/config/cops/rspec.yml +41 -0
  19. data/config/cops/security.yml +1 -0
  20. data/config/cops/sequel.yml +2 -0
  21. data/config/cops/style.yml +153 -0
  22. data/config/cops/thread_safety.yml +5 -0
  23. data/config/defaults/bundler.yml +97 -0
  24. data/config/defaults/capybara.yml +103 -0
  25. data/config/defaults/capybara_rspec.yml +24 -0
  26. data/config/defaults/gemspec.yml +121 -0
  27. data/config/defaults/i18n_gettext.yml +20 -0
  28. data/config/defaults/i18n_railsi18n.yml +9 -0
  29. data/config/defaults/layout.yml +1121 -0
  30. data/config/defaults/lint.yml +1315 -0
  31. data/config/defaults/metrics.yml +119 -0
  32. data/config/defaults/migration.yml +9 -0
  33. data/config/defaults/naming.yml +332 -0
  34. data/config/defaults/performance.yml +445 -0
  35. data/config/defaults/rake.yml +34 -0
  36. data/config/defaults/rspec.yml +1081 -0
  37. data/config/defaults/security.yml +67 -0
  38. data/config/defaults/sequel.yml +59 -0
  39. data/config/defaults/style.yml +2985 -0
  40. data/config/defaults/thread_safety.yml +45 -0
  41. data/exe/docquet +7 -0
  42. data/lib/docquet/cli/base.rb +21 -0
  43. data/lib/docquet/cli/install_config.rb +75 -0
  44. data/lib/docquet/cli/regenerate_todo.rb +46 -0
  45. data/lib/docquet/cli.rb +6 -0
  46. data/lib/docquet/commands.rb +12 -0
  47. data/lib/docquet/config_processor.rb +52 -0
  48. data/lib/docquet/generators/rubocop_yml_generator.rb +78 -0
  49. data/lib/docquet/inflector.rb +22 -0
  50. data/lib/docquet/plugin_detector.rb +29 -0
  51. data/lib/docquet/rake_task.rb +126 -0
  52. data/lib/docquet/version.rb +6 -0
  53. data/lib/docquet.rb +17 -0
  54. data/templates/rubocop.yml.erb +35 -0
  55. metadata +172 -0
@@ -0,0 +1,1315 @@
1
+ # Department 'Lint' (152):
2
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintambiguousassignment
3
+ Lint/AmbiguousAssignment:
4
+ Description: Checks for mistyped shorthand assignments.
5
+ Enabled: true # was pending
6
+ VersionAdded: '1.7'
7
+
8
+ # Supports --autocorrect
9
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintambiguousblockassociation
10
+ Lint/AmbiguousBlockAssociation:
11
+ Description: Checks for ambiguous block association with method when param passed
12
+ without parentheses.
13
+ Enabled: true
14
+ VersionAdded: '0.48'
15
+ VersionChanged: '1.13'
16
+ AllowedMethods: []
17
+ AllowedPatterns: []
18
+
19
+ # Supports --autocorrect
20
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintambiguousoperator
21
+ Lint/AmbiguousOperator:
22
+ Description: Checks for ambiguous operators in the first argument of a method invocation
23
+ without parentheses.
24
+ StyleGuide: "#method-invocation-parens"
25
+ Enabled: true
26
+ VersionAdded: '0.17'
27
+ VersionChanged: '0.83'
28
+
29
+ # Supports --autocorrect
30
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintambiguousoperatorprecedence
31
+ Lint/AmbiguousOperatorPrecedence:
32
+ Description: Checks for expressions containing multiple binary operations with ambiguous
33
+ precedence.
34
+ Enabled: true # was pending
35
+ VersionAdded: '1.21'
36
+
37
+ # Supports --autocorrect
38
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintambiguousrange
39
+ Lint/AmbiguousRange:
40
+ Description: Checks for ranges with ambiguous boundaries.
41
+ Enabled: true # was pending
42
+ VersionAdded: '1.19'
43
+ SafeAutoCorrect: false
44
+ RequireParenthesesForMethodChains: false
45
+
46
+ # Supports --autocorrect
47
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintambiguousregexpliteral
48
+ Lint/AmbiguousRegexpLiteral:
49
+ Description: Checks for ambiguous regexp literals in the first argument of a method
50
+ invocation without parentheses.
51
+ Enabled: true
52
+ VersionAdded: '0.17'
53
+ VersionChanged: '0.83'
54
+
55
+ # Supports --autocorrect
56
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintarrayliteralinregexp
57
+ Lint/ArrayLiteralInRegexp:
58
+ Description: Checks for an array literal interpolated inside a regexp.
59
+ Enabled: true # was pending
60
+ VersionAdded: '1.71'
61
+ SafeAutoCorrect: false
62
+
63
+ # Supports --autocorrect
64
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintassignmentincondition
65
+ Lint/AssignmentInCondition:
66
+ Description: Don't use assignment in conditions.
67
+ StyleGuide: "#safe-assignment-in-condition"
68
+ Enabled: true
69
+ SafeAutoCorrect: false
70
+ VersionAdded: '0.9'
71
+ VersionChanged: '1.45'
72
+ AllowSafeAssignment: true
73
+
74
+ # Supports --autocorrect
75
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintbigdecimalnew
76
+ Lint/BigDecimalNew:
77
+ Description: "`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead."
78
+ Enabled: true
79
+ VersionAdded: '0.53'
80
+
81
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintbinaryoperatorwithidenticaloperands
82
+ Lint/BinaryOperatorWithIdenticalOperands:
83
+ Description: Checks for places where binary operator has identical operands.
84
+ Enabled: true
85
+ Safe: false
86
+ VersionAdded: '0.89'
87
+ VersionChanged: '1.69'
88
+
89
+ # Supports --autocorrect
90
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintbooleansymbol
91
+ Lint/BooleanSymbol:
92
+ Description: Checks for `:true` and `:false` symbols.
93
+ Enabled: true
94
+ SafeAutoCorrect: false
95
+ VersionAdded: '0.50'
96
+ VersionChanged: '1.22'
97
+
98
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintcircularargumentreference
99
+ Lint/CircularArgumentReference:
100
+ Description: Default values in optional keyword arguments and optional ordinal arguments
101
+ should not refer back to the name of the argument.
102
+ Enabled: true
103
+ VersionAdded: '0.33'
104
+
105
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintconstantdefinitioninblock
106
+ Lint/ConstantDefinitionInBlock:
107
+ Description: Do not define constants within a block.
108
+ StyleGuide: "#no-constant-definition-in-block"
109
+ Enabled: true
110
+ VersionAdded: '0.91'
111
+ VersionChanged: '1.3'
112
+ AllowedMethods:
113
+ - enums
114
+
115
+ # Supports --autocorrect
116
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintconstantoverwritteninrescue
117
+ Lint/ConstantOverwrittenInRescue:
118
+ Description: Checks for overwriting an exception with an exception result by use `rescue
119
+ =>`.
120
+ Enabled: true # was pending
121
+ VersionAdded: '1.31'
122
+
123
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintconstantreassignment
124
+ Lint/ConstantReassignment:
125
+ Description: Checks for constant reassignments.
126
+ Enabled: true # was pending
127
+ VersionAdded: '1.70'
128
+
129
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintconstantresolution
130
+ Lint/ConstantResolution:
131
+ Description: Checks that constants are fully qualified with `::`.
132
+ Enabled: true # was false
133
+ VersionAdded: '0.86'
134
+ Only: []
135
+ Ignore: []
136
+
137
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintcopdirectivesyntax
138
+ Lint/CopDirectiveSyntax:
139
+ Description: Checks that `# rubocop:` directives are strictly formatted.
140
+ Enabled: true # was pending
141
+ VersionAdded: '1.72'
142
+
143
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintdebugger
144
+ Lint/Debugger:
145
+ Description: Checks for debugger calls.
146
+ Enabled: true
147
+ VersionAdded: '0.14'
148
+ VersionChanged: '1.63'
149
+ DebuggerMethods:
150
+ Kernel:
151
+ - binding.irb
152
+ - Kernel.binding.irb
153
+ Byebug:
154
+ - byebug
155
+ - remote_byebug
156
+ - Kernel.byebug
157
+ - Kernel.remote_byebug
158
+ Capybara:
159
+ - page.save_and_open_page
160
+ - page.save_and_open_screenshot
161
+ - page.save_page
162
+ - page.save_screenshot
163
+ - save_and_open_page
164
+ - save_and_open_screenshot
165
+ - save_page
166
+ - save_screenshot
167
+ debug.rb:
168
+ - binding.b
169
+ - binding.break
170
+ - Kernel.binding.b
171
+ - Kernel.binding.break
172
+ Pry:
173
+ - binding.pry
174
+ - binding.remote_pry
175
+ - binding.pry_remote
176
+ - Kernel.binding.pry
177
+ - Kernel.binding.remote_pry
178
+ - Kernel.binding.pry_remote
179
+ - Pry.rescue
180
+ - pry
181
+ Rails:
182
+ - debugger
183
+ - Kernel.debugger
184
+ RubyJard:
185
+ - jard
186
+ WebConsole:
187
+ - binding.console
188
+ DebuggerRequires:
189
+ debug.rb:
190
+ - debug/open
191
+ - debug/start
192
+
193
+ # Supports --autocorrect
194
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintdeprecatedclassmethods
195
+ Lint/DeprecatedClassMethods:
196
+ Description: Checks for deprecated class method calls.
197
+ Enabled: true
198
+ VersionAdded: '0.19'
199
+
200
+ # Supports --autocorrect
201
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintdeprecatedconstants
202
+ Lint/DeprecatedConstants:
203
+ Description: Checks for deprecated constants.
204
+ Enabled: true # was pending
205
+ VersionAdded: '1.8'
206
+ VersionChanged: '1.40'
207
+ DeprecatedConstants:
208
+ NIL:
209
+ Alternative: nil
210
+ DeprecatedVersion: '2.4'
211
+ 'TRUE':
212
+ Alternative: 'true'
213
+ DeprecatedVersion: '2.4'
214
+ 'FALSE':
215
+ Alternative: 'false'
216
+ DeprecatedVersion: '2.4'
217
+ Net::HTTPServerException:
218
+ Alternative: Net::HTTPClientException
219
+ DeprecatedVersion: '2.6'
220
+ Random::DEFAULT:
221
+ Alternative: Random.new
222
+ DeprecatedVersion: '3.0'
223
+ Struct::Group:
224
+ Alternative: Etc::Group
225
+ DeprecatedVersion: '3.0'
226
+ Struct::Passwd:
227
+ Alternative: Etc::Passwd
228
+ DeprecatedVersion: '3.0'
229
+
230
+ # Supports --autocorrect
231
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintdeprecatedopensslconstant
232
+ Lint/DeprecatedOpenSSLConstant:
233
+ Description: Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`.
234
+ Enabled: true
235
+ VersionAdded: '0.84'
236
+
237
+ # Supports --autocorrect
238
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintdisjunctiveassignmentinconstructor
239
+ Lint/DisjunctiveAssignmentInConstructor:
240
+ Description: In constructor, plain assignment is preferred over disjunctive.
241
+ Enabled: true
242
+ Safe: false
243
+ VersionAdded: '0.62'
244
+ VersionChanged: '0.88'
245
+
246
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicatebranch
247
+ Lint/DuplicateBranch:
248
+ Description: Checks that there are no repeated bodies within `if/unless`, `case-when`
249
+ and `rescue` constructs.
250
+ Enabled: true # was pending
251
+ VersionAdded: '1.3'
252
+ VersionChanged: '1.7'
253
+ IgnoreLiteralBranches: false
254
+ IgnoreConstantBranches: false
255
+ IgnoreDuplicateElseBranch: false
256
+
257
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicatecasecondition
258
+ Lint/DuplicateCaseCondition:
259
+ Description: Do not repeat values in case conditionals.
260
+ Enabled: true
261
+ VersionAdded: '0.45'
262
+
263
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicateelsifcondition
264
+ Lint/DuplicateElsifCondition:
265
+ Description: Do not repeat conditions used in if `elsif`.
266
+ Enabled: true
267
+ VersionAdded: '0.88'
268
+
269
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicatehashkey
270
+ Lint/DuplicateHashKey:
271
+ Description: Checks for duplicate keys in hash literals.
272
+ Enabled: true
273
+ VersionAdded: '0.34'
274
+ VersionChanged: '0.77'
275
+
276
+ # Supports --autocorrect
277
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicatemagiccomment
278
+ Lint/DuplicateMagicComment:
279
+ Description: Checks for duplicated magic comments.
280
+ Enabled: true # was pending
281
+ VersionAdded: '1.37'
282
+
283
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicatematchpattern
284
+ Lint/DuplicateMatchPattern:
285
+ Description: Do not repeat patterns in `in` keywords.
286
+ Enabled: true # was pending
287
+ VersionAdded: '1.50'
288
+
289
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicatemethods
290
+ Lint/DuplicateMethods:
291
+ Description: Checks for duplicate method definitions.
292
+ Enabled: true
293
+ VersionAdded: '0.29'
294
+
295
+ # Supports --autocorrect
296
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicateregexpcharacterclasselement
297
+ Lint/DuplicateRegexpCharacterClassElement:
298
+ Description: Checks for duplicate elements in Regexp character classes.
299
+ Enabled: true # was pending
300
+ VersionAdded: '1.1'
301
+
302
+ # Supports --autocorrect
303
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicaterequire
304
+ Lint/DuplicateRequire:
305
+ Description: Checks for duplicate `require`s and `require_relative`s.
306
+ Enabled: true
307
+ SafeAutoCorrect: false
308
+ VersionAdded: '0.90'
309
+ VersionChanged: '1.28'
310
+
311
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicaterescueexception
312
+ Lint/DuplicateRescueException:
313
+ Description: Checks that there are no repeated exceptions used in `rescue` expressions.
314
+ Enabled: true
315
+ VersionAdded: '0.89'
316
+
317
+ # Supports --autocorrect
318
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicatesetelement
319
+ Lint/DuplicateSetElement:
320
+ Description: Checks for duplicate elements in Set.
321
+ Enabled: true # was pending
322
+ VersionAdded: '1.67'
323
+
324
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linteachwithobjectargument
325
+ Lint/EachWithObjectArgument:
326
+ Description: Checks for immutable argument given to each_with_object.
327
+ Enabled: true
328
+ VersionAdded: '0.31'
329
+
330
+ # Supports --autocorrect
331
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintelselayout
332
+ Lint/ElseLayout:
333
+ Description: Checks for odd code arrangement in an else block.
334
+ Enabled: true
335
+ VersionAdded: '0.17'
336
+ VersionChanged: '1.2'
337
+
338
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyblock
339
+ Lint/EmptyBlock:
340
+ Description: Checks for blocks without a body.
341
+ Enabled: true # was pending
342
+ VersionAdded: '1.1'
343
+ VersionChanged: '1.15'
344
+ AllowComments: true
345
+ AllowEmptyLambdas: true
346
+
347
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyclass
348
+ Lint/EmptyClass:
349
+ Description: Checks for classes and metaclasses without a body.
350
+ Enabled: true # was pending
351
+ VersionAdded: '1.3'
352
+ AllowComments: false
353
+
354
+ # Supports --autocorrect
355
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyconditionalbody
356
+ Lint/EmptyConditionalBody:
357
+ Description: Checks for the presence of `if`, `elsif` and `unless` branches without
358
+ a body.
359
+ Enabled: true
360
+ AutoCorrect: contextual
361
+ AllowComments: true
362
+ VersionAdded: '0.89'
363
+ VersionChanged: '1.73'
364
+
365
+ # Supports --autocorrect
366
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyensure
367
+ Lint/EmptyEnsure:
368
+ Description: Checks for empty ensure block.
369
+ Enabled: true
370
+ AutoCorrect: contextual
371
+ VersionAdded: '0.10'
372
+ VersionChanged: '1.61'
373
+
374
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyexpression
375
+ Lint/EmptyExpression:
376
+ Description: Checks for empty expressions.
377
+ Enabled: true
378
+ VersionAdded: '0.45'
379
+
380
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyfile
381
+ Lint/EmptyFile:
382
+ Description: Enforces that Ruby source files are not empty.
383
+ Enabled: true
384
+ AllowComments: true
385
+ VersionAdded: '0.90'
386
+
387
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyinpattern
388
+ Lint/EmptyInPattern:
389
+ Description: Checks for the presence of `in` pattern branches without a body.
390
+ Enabled: true # was pending
391
+ AllowComments: true
392
+ VersionAdded: '1.16'
393
+
394
+ # Supports --autocorrect
395
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyinterpolation
396
+ Lint/EmptyInterpolation:
397
+ Description: Checks for empty string interpolation.
398
+ Enabled: true
399
+ AutoCorrect: contextual
400
+ VersionAdded: '0.20'
401
+ VersionChanged: '1.76'
402
+
403
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptywhen
404
+ Lint/EmptyWhen:
405
+ Description: Checks for `when` branches with empty bodies.
406
+ Enabled: true
407
+ AllowComments: true
408
+ VersionAdded: '0.45'
409
+ VersionChanged: '0.83'
410
+
411
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintensurereturn
412
+ Lint/EnsureReturn:
413
+ Description: Do not use return in an ensure block.
414
+ StyleGuide: "#no-return-ensure"
415
+ Enabled: true
416
+ VersionAdded: '0.9'
417
+ VersionChanged: '0.83'
418
+
419
+ # Supports --autocorrect
420
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linterbnewarguments
421
+ Lint/ErbNewArguments:
422
+ Description: Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`.
423
+ Enabled: true
424
+ VersionAdded: '0.56'
425
+
426
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintflipflop
427
+ Lint/FlipFlop:
428
+ Description: Checks for flip-flops.
429
+ StyleGuide: "#no-flip-flops"
430
+ Enabled: true
431
+ VersionAdded: '0.16'
432
+
433
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintfloatcomparison
434
+ Lint/FloatComparison:
435
+ Description: Checks for the presence of precise comparison of floating point numbers.
436
+ StyleGuide: "#float-comparison"
437
+ Enabled: true
438
+ VersionAdded: '0.89'
439
+
440
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintfloatoutofrange
441
+ Lint/FloatOutOfRange:
442
+ Description: Catches floating-point literals too large or small for Ruby to represent.
443
+ Enabled: true
444
+ VersionAdded: '0.36'
445
+
446
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintformatparametermismatch
447
+ Lint/FormatParameterMismatch:
448
+ Description: The number of parameters to format/sprint must match the fields.
449
+ Enabled: true
450
+ VersionAdded: '0.33'
451
+
452
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linthashcomparebyidentity
453
+ Lint/HashCompareByIdentity:
454
+ Description: Prefer using `Hash#compare_by_identity` than using `object_id` for keys.
455
+ StyleGuide: "#identity-comparison"
456
+ Enabled: true
457
+ Safe: false
458
+ VersionAdded: '0.93'
459
+
460
+ # Supports --autocorrect
461
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linthashnewwithkeywordargumentsasdefault
462
+ Lint/HashNewWithKeywordArgumentsAsDefault:
463
+ Description: Checks for the deprecated use of keyword arguments for hash default in
464
+ `Hash.new`.
465
+ Enabled: true # was pending
466
+ VersionAdded: '1.69'
467
+
468
+ # Supports --autocorrect
469
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintheredocmethodcallposition
470
+ Lint/HeredocMethodCallPosition:
471
+ Description: Checks for the ordering of a method call where the receiver of the call
472
+ is a HEREDOC.
473
+ Enabled: true # was false
474
+ StyleGuide: "#heredoc-method-calls"
475
+ VersionAdded: '0.68'
476
+
477
+ # Supports --autocorrect
478
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintidentitycomparison
479
+ Lint/IdentityComparison:
480
+ Description: Prefer `equal?` over `==` when comparing `object_id`.
481
+ Enabled: true
482
+ StyleGuide: "#identity-comparison"
483
+ VersionAdded: '0.91'
484
+
485
+ # Supports --autocorrect
486
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintimplicitstringconcatenation
487
+ Lint/ImplicitStringConcatenation:
488
+ Description: Checks for adjacent string literals on the same line, which could better
489
+ be represented as a single string literal.
490
+ Enabled: true
491
+ VersionAdded: '0.36'
492
+
493
+ # Supports --autocorrect
494
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintincompatibleioselectwithfiberscheduler
495
+ Lint/IncompatibleIoSelectWithFiberScheduler:
496
+ Description: Checks for `IO.select` that is incompatible with Fiber Scheduler.
497
+ Enabled: true # was pending
498
+ SafeAutoCorrect: false
499
+ VersionAdded: '1.21'
500
+ VersionChanged: '1.24'
501
+
502
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintineffectiveaccessmodifier
503
+ Lint/IneffectiveAccessModifier:
504
+ Description: Checks for attempts to use `private` or `protected` to set the visibility
505
+ of a class method, which does not work.
506
+ Enabled: true
507
+ VersionAdded: '0.36'
508
+
509
+ # Supports --autocorrect
510
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintinheritexception
511
+ Lint/InheritException:
512
+ Description: Avoid inheriting from the `Exception` class.
513
+ Enabled: true
514
+ SafeAutoCorrect: false
515
+ VersionAdded: '0.41'
516
+ VersionChanged: '1.26'
517
+ EnforcedStyle: standard_error
518
+ SupportedStyles:
519
+ - standard_error
520
+ - runtime_error
521
+
522
+ # Supports --autocorrect
523
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintinterpolationcheck
524
+ Lint/InterpolationCheck:
525
+ Description: Checks for interpolation in a single quoted string.
526
+ Enabled: true
527
+ SafeAutoCorrect: false
528
+ VersionAdded: '0.50'
529
+ VersionChanged: '1.40'
530
+
531
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintitwithoutargumentsinblock
532
+ Lint/ItWithoutArgumentsInBlock:
533
+ Description: Checks uses of `it` calls without arguments in block.
534
+ References:
535
+ - https://bugs.ruby-lang.org/issues/18980
536
+ Enabled: true # was pending
537
+ VersionAdded: '1.59'
538
+
539
+ # Supports --autocorrect
540
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintlambdawithoutliteralblock
541
+ Lint/LambdaWithoutLiteralBlock:
542
+ Description: Checks uses of lambda without a literal block.
543
+ Enabled: true # was pending
544
+ VersionAdded: '1.8'
545
+
546
+ # Supports --autocorrect
547
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintliteralascondition
548
+ Lint/LiteralAsCondition:
549
+ Description: Checks of literals used in conditions.
550
+ Enabled: true
551
+ AutoCorrect: contextual
552
+ VersionAdded: '0.51'
553
+
554
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintliteralassignmentincondition
555
+ Lint/LiteralAssignmentInCondition:
556
+ Description: Checks for literal assignments in the conditions.
557
+ Enabled: true # was pending
558
+ VersionAdded: '1.58'
559
+
560
+ # Supports --autocorrect
561
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintliteralininterpolation
562
+ Lint/LiteralInInterpolation:
563
+ Description: Checks for literals used in interpolation.
564
+ Enabled: true
565
+ VersionAdded: '0.19'
566
+ VersionChanged: '0.32'
567
+
568
+ # Supports --autocorrect
569
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintloop
570
+ Lint/Loop:
571
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
572
+ for post-loop tests.
573
+ StyleGuide: "#loop-with-break"
574
+ Enabled: true
575
+ VersionAdded: '0.9'
576
+ VersionChanged: '1.3'
577
+ Safe: false
578
+
579
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintmissingcopenabledirective
580
+ Lint/MissingCopEnableDirective:
581
+ Description: Checks for a `# rubocop:enable` after `# rubocop:disable`.
582
+ Enabled: true
583
+ VersionAdded: '0.52'
584
+ MaximumRangeSize: .inf
585
+
586
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintmissingsuper
587
+ Lint/MissingSuper:
588
+ Description: Checks for the presence of constructors and lifecycle callbacks without
589
+ calls to `super`.
590
+ Enabled: true
591
+ AllowedParentClasses: []
592
+ VersionAdded: '0.89'
593
+ VersionChanged: '1.4'
594
+
595
+ # Supports --autocorrect
596
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintmixedcaserange
597
+ Lint/MixedCaseRange:
598
+ Description: Checks for mixed-case character ranges since they include likely unintended
599
+ characters.
600
+ Enabled: true # was pending
601
+ SafeAutoCorrect: false
602
+ VersionAdded: '1.53'
603
+
604
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintmixedregexpcapturetypes
605
+ Lint/MixedRegexpCaptureTypes:
606
+ Description: Do not mix named captures and numbered captures in a Regexp literal.
607
+ Enabled: true
608
+ VersionAdded: '0.85'
609
+
610
+ # Supports --autocorrect
611
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintmultiplecomparison
612
+ Lint/MultipleComparison:
613
+ Description: Use `&&` operator to compare multiple values.
614
+ Enabled: true
615
+ VersionAdded: '0.47'
616
+ VersionChanged: '1.1'
617
+
618
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnestedmethoddefinition
619
+ Lint/NestedMethodDefinition:
620
+ Description: Do not use nested method definitions.
621
+ StyleGuide: "#no-nested-methods"
622
+ Enabled: true
623
+ AllowedMethods: []
624
+ AllowedPatterns: []
625
+ VersionAdded: '0.32'
626
+
627
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnestedpercentliteral
628
+ Lint/NestedPercentLiteral:
629
+ Description: Checks for nested percent literals.
630
+ Enabled: true
631
+ VersionAdded: '0.52'
632
+
633
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnextwithoutaccumulator
634
+ Lint/NextWithoutAccumulator:
635
+ Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
636
+ block.
637
+ Enabled: true
638
+ VersionAdded: '0.36'
639
+
640
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnoreturninbeginendblocks
641
+ Lint/NoReturnInBeginEndBlocks:
642
+ Description: Do not `return` inside `begin..end` blocks in assignment contexts.
643
+ Enabled: true # was pending
644
+ VersionAdded: '1.2'
645
+
646
+ # Supports --autocorrect
647
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnonatomicfileoperation
648
+ Lint/NonAtomicFileOperation:
649
+ Description: Checks for non-atomic file operations.
650
+ StyleGuide: "#atomic-file-operations"
651
+ Enabled: true # was pending
652
+ VersionAdded: '1.31'
653
+ SafeAutoCorrect: false
654
+
655
+ # Supports --autocorrect
656
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnondeterministicrequireorder
657
+ Lint/NonDeterministicRequireOrder:
658
+ Description: Always sort arrays returned by Dir.glob when requiring files.
659
+ Enabled: true
660
+ VersionAdded: '0.78'
661
+ Safe: false
662
+
663
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnonlocalexitfromiterator
664
+ Lint/NonLocalExitFromIterator:
665
+ Description: Do not use return in iterator to cause non-local exit.
666
+ Enabled: true
667
+ VersionAdded: '0.30'
668
+
669
+ # Supports --autocorrect
670
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnumberconversion
671
+ Lint/NumberConversion:
672
+ Description: Checks unsafe usage of number conversion methods.
673
+ Enabled: true # was false
674
+ VersionAdded: '0.53'
675
+ VersionChanged: '1.1'
676
+ SafeAutoCorrect: false
677
+ AllowedMethods: []
678
+ AllowedPatterns: []
679
+ IgnoredClasses:
680
+ - Time
681
+ - DateTime
682
+
683
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnumberedparameterassignment
684
+ Lint/NumberedParameterAssignment:
685
+ Description: Checks for uses of numbered parameter assignment.
686
+ Enabled: true # was pending
687
+ VersionAdded: '1.9'
688
+
689
+ # Supports --autocorrect
690
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnumericoperationwithconstantresult
691
+ Lint/NumericOperationWithConstantResult:
692
+ Description: Checks for numeric operations with constant results.
693
+ Enabled: true # was pending
694
+ VersionAdded: '1.69'
695
+
696
+ # Supports --autocorrect
697
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintorassignmenttoconstant
698
+ Lint/OrAssignmentToConstant:
699
+ Description: Checks unintended or-assignment to constant.
700
+ Enabled: true # was pending
701
+ Safe: false
702
+ VersionAdded: '1.9'
703
+
704
+ # Supports --autocorrect
705
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintorderedmagiccomments
706
+ Lint/OrderedMagicComments:
707
+ Description: Checks the proper ordering of magic comments and whether a magic comment
708
+ is not placed before a shebang.
709
+ Enabled: true
710
+ SafeAutoCorrect: false
711
+ VersionAdded: '0.53'
712
+ VersionChanged: '1.37'
713
+
714
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintoutofrangeregexpref
715
+ Lint/OutOfRangeRegexpRef:
716
+ Description: Checks for out of range reference for Regexp because it always returns
717
+ nil.
718
+ Enabled: true
719
+ Safe: false
720
+ VersionAdded: '0.89'
721
+
722
+ # Supports --autocorrect
723
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintparenthesesasgroupedexpression
724
+ Lint/ParenthesesAsGroupedExpression:
725
+ Description: Checks for method calls with a space before the opening parenthesis.
726
+ StyleGuide: "#parens-no-spaces"
727
+ Enabled: true
728
+ VersionAdded: '0.12'
729
+ VersionChanged: '0.83'
730
+
731
+ # Supports --autocorrect
732
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintpercentstringarray
733
+ Lint/PercentStringArray:
734
+ Description: Checks for unwanted commas and quotes in %w/%W literals.
735
+ Enabled: true
736
+ Safe: false
737
+ VersionAdded: '0.41'
738
+
739
+ # Supports --autocorrect
740
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintpercentsymbolarray
741
+ Lint/PercentSymbolArray:
742
+ Description: Checks for unwanted commas and colons in %i/%I literals.
743
+ Enabled: true
744
+ VersionAdded: '0.41'
745
+
746
+ # Supports --autocorrect
747
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintraiseexception
748
+ Lint/RaiseException:
749
+ Description: Checks for `raise` or `fail` statements which are raising `Exception`
750
+ class.
751
+ StyleGuide: "#raise-exception"
752
+ Enabled: true
753
+ Safe: false
754
+ VersionAdded: '0.81'
755
+ VersionChanged: '0.86'
756
+ AllowedImplicitNamespaces:
757
+ - Gem
758
+
759
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintrandone
760
+ Lint/RandOne:
761
+ Description: Checks for `rand(1)` calls. Such calls always return `0` and most likely
762
+ a mistake.
763
+ Enabled: true
764
+ VersionAdded: '0.36'
765
+
766
+ # Supports --autocorrect
767
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantcopdisabledirective
768
+ Lint/RedundantCopDisableDirective:
769
+ Description: 'Checks for rubocop:disable comments that can be removed. Note: this
770
+ cop is not disabled when disabling all cops. It must be explicitly disabled.'
771
+ Enabled: true
772
+ VersionAdded: '0.76'
773
+
774
+ # Supports --autocorrect
775
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantcopenabledirective
776
+ Lint/RedundantCopEnableDirective:
777
+ Description: Checks for rubocop:enable comments that can be removed.
778
+ Enabled: true
779
+ VersionAdded: '0.76'
780
+
781
+ # Supports --autocorrect
782
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantdirglobsort
783
+ Lint/RedundantDirGlobSort:
784
+ Description: Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.
785
+ Enabled: true # was pending
786
+ VersionAdded: '1.8'
787
+ VersionChanged: '1.26'
788
+ SafeAutoCorrect: false
789
+
790
+ # Supports --autocorrect
791
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantregexpquantifiers
792
+ Lint/RedundantRegexpQuantifiers:
793
+ Description: Checks for redundant quantifiers in Regexps.
794
+ Enabled: true # was pending
795
+ VersionAdded: '1.53'
796
+
797
+ # Supports --autocorrect
798
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantrequirestatement
799
+ Lint/RedundantRequireStatement:
800
+ Description: Checks for unnecessary `require` statement.
801
+ Enabled: true
802
+ VersionAdded: '0.76'
803
+ VersionChanged: '1.73'
804
+
805
+ # Supports --autocorrect
806
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantsafenavigation
807
+ Lint/RedundantSafeNavigation:
808
+ Description: Checks for redundant safe navigation calls.
809
+ Enabled: true
810
+ VersionAdded: '0.93'
811
+ VersionChanged: '1.79'
812
+ AllowedMethods:
813
+ - instance_of?
814
+ - kind_of?
815
+ - is_a?
816
+ - eql?
817
+ - respond_to?
818
+ - equal?
819
+ InferNonNilReceiver: false
820
+ AdditionalNilMethods:
821
+ - present?
822
+ - blank?
823
+ - try
824
+ - try!
825
+ Safe: false
826
+
827
+ # Supports --autocorrect
828
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantsplatexpansion
829
+ Lint/RedundantSplatExpansion:
830
+ Description: Checks for splat unnecessarily being called on literals.
831
+ Enabled: true
832
+ VersionAdded: '0.76'
833
+ VersionChanged: '1.7'
834
+ AllowPercentLiteralArrayArgument: true
835
+
836
+ # Supports --autocorrect
837
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantstringcoercion
838
+ Lint/RedundantStringCoercion:
839
+ Description: Checks for Object#to_s usage in string interpolation.
840
+ StyleGuide: "#no-to-s"
841
+ Enabled: true
842
+ VersionAdded: '0.19'
843
+ VersionChanged: '0.77'
844
+
845
+ # Supports --autocorrect
846
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundanttypeconversion
847
+ Lint/RedundantTypeConversion:
848
+ Description: Checks for redundantly converting a literal to the same type.
849
+ Enabled: true # was pending
850
+ VersionAdded: '1.72'
851
+
852
+ # Supports --autocorrect
853
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantwithindex
854
+ Lint/RedundantWithIndex:
855
+ Description: Checks for redundant `with_index`.
856
+ Enabled: true
857
+ VersionAdded: '0.50'
858
+
859
+ # Supports --autocorrect
860
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantwithobject
861
+ Lint/RedundantWithObject:
862
+ Description: Checks for redundant `with_object`.
863
+ Enabled: true
864
+ VersionAdded: '0.51'
865
+
866
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintrefinementimportmethods
867
+ Lint/RefinementImportMethods:
868
+ Description: Use `Refinement#import_methods` when using `include` or `prepend` in
869
+ `refine` block.
870
+ Enabled: true # was pending
871
+ SafeAutoCorrect: false
872
+ VersionAdded: '1.27'
873
+
874
+ # Supports --autocorrect
875
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintregexpascondition
876
+ Lint/RegexpAsCondition:
877
+ Description: Do not use regexp literal as a condition. The regexp literal matches
878
+ `$_` implicitly.
879
+ Enabled: true
880
+ VersionAdded: '0.51'
881
+ VersionChanged: '0.86'
882
+
883
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintrequireparentheses
884
+ Lint/RequireParentheses:
885
+ Description: Use parentheses in the method call to avoid confusion about precedence.
886
+ Enabled: true
887
+ VersionAdded: '0.18'
888
+
889
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintrequirerangeparentheses
890
+ Lint/RequireRangeParentheses:
891
+ Description: Checks that a range literal is enclosed in parentheses when the end of
892
+ the range is at a line break.
893
+ Enabled: true # was pending
894
+ VersionAdded: '1.32'
895
+
896
+ # Supports --autocorrect
897
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintrequirerelativeselfpath
898
+ Lint/RequireRelativeSelfPath:
899
+ Description: Checks for uses a file requiring itself with `require_relative`.
900
+ Enabled: true # was pending
901
+ VersionAdded: '1.22'
902
+
903
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintrescueexception
904
+ Lint/RescueException:
905
+ Description: Avoid rescuing the Exception class.
906
+ StyleGuide: "#no-blind-rescues"
907
+ Enabled: true
908
+ VersionAdded: '0.9'
909
+ VersionChanged: '0.27'
910
+
911
+ # Supports --autocorrect
912
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintrescuetype
913
+ Lint/RescueType:
914
+ Description: Avoid rescuing from non constants that could result in a `TypeError`.
915
+ Enabled: true
916
+ VersionAdded: '0.49'
917
+
918
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintreturninvoidcontext
919
+ Lint/ReturnInVoidContext:
920
+ Description: Checks for return in void context.
921
+ Enabled: true
922
+ VersionAdded: '0.50'
923
+
924
+ # Supports --autocorrect
925
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsafenavigationchain
926
+ Lint/SafeNavigationChain:
927
+ Description: Do not chain ordinary method call after safe navigation operator.
928
+ Enabled: true
929
+ VersionAdded: '0.47'
930
+ VersionChanged: '0.77'
931
+ AllowedMethods:
932
+ - present?
933
+ - blank?
934
+ - presence
935
+ - try
936
+ - try!
937
+ - in?
938
+
939
+ # Supports --autocorrect
940
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsafenavigationconsistency
941
+ Lint/SafeNavigationConsistency:
942
+ Description: Check to make sure that if safe navigation is used in an `&&` or `||`
943
+ condition, consistent and appropriate safe navigation, without excess or deficiency,
944
+ is used for all method calls on the same object.
945
+ Enabled: true
946
+ VersionAdded: '0.55'
947
+ VersionChanged: '0.77'
948
+ AllowedMethods:
949
+ - present?
950
+ - blank?
951
+ - presence
952
+ - try
953
+ - try!
954
+
955
+ # Supports --autocorrect
956
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsafenavigationwithempty
957
+ Lint/SafeNavigationWithEmpty:
958
+ Description: Avoid `foo&.empty?` in conditionals.
959
+ Enabled: true
960
+ VersionAdded: '0.62'
961
+ VersionChanged: '0.87'
962
+
963
+ # Supports --autocorrect
964
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintscriptpermission
965
+ Lint/ScriptPermission:
966
+ Description: Grant script file execute permission.
967
+ Enabled: true
968
+ VersionAdded: '0.49'
969
+ VersionChanged: '0.50'
970
+
971
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintselfassignment
972
+ Lint/SelfAssignment:
973
+ Description: Checks for self-assignments.
974
+ Enabled: true
975
+ VersionAdded: '0.89'
976
+ AllowRBSInlineAnnotation: false
977
+
978
+ # Supports --autocorrect
979
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsendwithmixinargument
980
+ Lint/SendWithMixinArgument:
981
+ Description: Checks for `send` method when using mixin.
982
+ Enabled: true
983
+ VersionAdded: '0.75'
984
+
985
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintshadowedargument
986
+ Lint/ShadowedArgument:
987
+ Description: Avoid reassigning arguments before they were used.
988
+ Enabled: true
989
+ VersionAdded: '0.52'
990
+ IgnoreImplicitReferences: false
991
+
992
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintshadowedexception
993
+ Lint/ShadowedException:
994
+ Description: Avoid rescuing a higher level exception before a lower level exception.
995
+ Enabled: true
996
+ VersionAdded: '0.41'
997
+
998
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintshadowingouterlocalvariable
999
+ Lint/ShadowingOuterLocalVariable:
1000
+ Description: Do not use the same name as outer local variable for block arguments
1001
+ or block local variables.
1002
+ Enabled: true # was false
1003
+ VersionAdded: '0.9'
1004
+ VersionChanged: '1.76'
1005
+
1006
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsharedmutabledefault
1007
+ Lint/SharedMutableDefault:
1008
+ Description: Checks for mutable literals used as default arguments during Hash initialization.
1009
+ StyleGuide: "#no-mutable-defaults"
1010
+ Enabled: true # was pending
1011
+ VersionAdded: '1.70'
1012
+
1013
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintstructnewoverride
1014
+ Lint/StructNewOverride:
1015
+ Description: Disallow overriding the `Struct` built-in methods via `Struct.new`.
1016
+ Enabled: true
1017
+ VersionAdded: '0.81'
1018
+
1019
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsuppressedexception
1020
+ Lint/SuppressedException:
1021
+ Description: Don't suppress exceptions.
1022
+ StyleGuide: "#dont-hide-exceptions"
1023
+ Enabled: true
1024
+ AllowComments: true
1025
+ AllowNil: true
1026
+ VersionAdded: '0.9'
1027
+ VersionChanged: '1.12'
1028
+
1029
+ # Supports --autocorrect
1030
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsuppressedexceptioninnumberconversion
1031
+ Lint/SuppressedExceptionInNumberConversion:
1032
+ Description: Checks for cases where exceptions unrelated to the numeric constructors
1033
+ may be unintentionally swallowed.
1034
+ Enabled: true # was pending
1035
+ SafeAutoCorrect: false
1036
+ VersionAdded: '1.72'
1037
+
1038
+ # Supports --autocorrect
1039
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsymbolconversion
1040
+ Lint/SymbolConversion:
1041
+ Description: Checks for unnecessary symbol conversions.
1042
+ Enabled: true # was pending
1043
+ VersionAdded: '1.9'
1044
+ VersionChanged: '1.16'
1045
+ EnforcedStyle: strict
1046
+ SupportedStyles:
1047
+ - strict
1048
+ - consistent
1049
+
1050
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintsyntax
1051
+ Lint/Syntax:
1052
+ Description: Checks for syntax errors.
1053
+ Enabled: true
1054
+ VersionAdded: '0.9'
1055
+
1056
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linttoenumarguments
1057
+ Lint/ToEnumArguments:
1058
+ Description: Ensures that `to_enum`/`enum_for`, called for the current method, has
1059
+ correct arguments.
1060
+ Enabled: true # was pending
1061
+ VersionAdded: '1.1'
1062
+
1063
+ # Supports --autocorrect
1064
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linttojson
1065
+ Lint/ToJSON:
1066
+ Description: 'Ensure #to_json includes an optional argument.'
1067
+ Enabled: true
1068
+ VersionAdded: '0.66'
1069
+
1070
+ # Supports --autocorrect
1071
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linttoplevelreturnwithargument
1072
+ Lint/TopLevelReturnWithArgument:
1073
+ Description: Detects top level return statements with argument.
1074
+ Enabled: true
1075
+ VersionAdded: '0.89'
1076
+ Exclude:
1077
+ - "**/*.jb"
1078
+
1079
+ # Supports --autocorrect
1080
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linttrailingcommainattributedeclaration
1081
+ Lint/TrailingCommaInAttributeDeclaration:
1082
+ Description: Checks for trailing commas in attribute declarations.
1083
+ Enabled: true
1084
+ AutoCorrect: contextual
1085
+ VersionAdded: '0.90'
1086
+ VersionChanged: '1.61'
1087
+
1088
+ # Supports --autocorrect
1089
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linttriplequotes
1090
+ Lint/TripleQuotes:
1091
+ Description: Checks for useless triple quote constructs.
1092
+ Enabled: true # was pending
1093
+ VersionAdded: '1.9'
1094
+
1095
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunderscoreprefixedvariablename
1096
+ Lint/UnderscorePrefixedVariableName:
1097
+ Description: Do not use prefix `_` for a variable that is used.
1098
+ Enabled: true
1099
+ VersionAdded: '0.21'
1100
+ AllowKeywordBlockArguments: false
1101
+
1102
+ # Supports --autocorrect
1103
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunescapedbracketinregexp
1104
+ Lint/UnescapedBracketInRegexp:
1105
+ Description: Checks for unescaped literal `]` in Regexp.
1106
+ Enabled: true # was pending
1107
+ VersionAdded: '1.68'
1108
+
1109
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunexpectedblockarity
1110
+ Lint/UnexpectedBlockArity:
1111
+ Description: Looks for blocks that have fewer arguments that the calling method expects.
1112
+ Enabled: true # was pending
1113
+ Safe: false
1114
+ VersionAdded: '1.5'
1115
+ Methods:
1116
+ chunk_while: 2
1117
+ each_with_index: 2
1118
+ each_with_object: 2
1119
+ inject: 2
1120
+ max: 2
1121
+ min: 2
1122
+ minmax: 2
1123
+ reduce: 2
1124
+ slice_when: 2
1125
+ sort: 2
1126
+
1127
+ # Supports --autocorrect
1128
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunifiedinteger
1129
+ Lint/UnifiedInteger:
1130
+ Description: Use Integer instead of Fixnum or Bignum.
1131
+ Enabled: true
1132
+ VersionAdded: '0.43'
1133
+
1134
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunmodifiedreduceaccumulator
1135
+ Lint/UnmodifiedReduceAccumulator:
1136
+ Description: Checks for `reduce` or `inject` blocks that do not update the accumulator
1137
+ each iteration.
1138
+ Enabled: true # was pending
1139
+ VersionAdded: '1.1'
1140
+ VersionChanged: '1.5'
1141
+
1142
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunreachablecode
1143
+ Lint/UnreachableCode:
1144
+ Description: Unreachable code.
1145
+ Enabled: true
1146
+ VersionAdded: '0.9'
1147
+
1148
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunreachableloop
1149
+ Lint/UnreachableLoop:
1150
+ Description: Checks for loops that will have at most one iteration.
1151
+ Enabled: true
1152
+ VersionAdded: '0.89'
1153
+ VersionChanged: '1.7'
1154
+ AllowedPatterns:
1155
+ - !ruby/regexp /(exactly|at_least|at_most)\(\d+\)\.times/
1156
+
1157
+ # Supports --autocorrect
1158
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunusedblockargument
1159
+ Lint/UnusedBlockArgument:
1160
+ Description: Checks for unused block arguments.
1161
+ StyleGuide: "#underscore-unused-vars"
1162
+ Enabled: true
1163
+ AutoCorrect: contextual
1164
+ VersionAdded: '0.21'
1165
+ VersionChanged: '1.61'
1166
+ IgnoreEmptyBlocks: true
1167
+ AllowUnusedKeywordArguments: false
1168
+
1169
+ # Supports --autocorrect
1170
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunusedmethodargument
1171
+ Lint/UnusedMethodArgument:
1172
+ Description: Checks for unused method arguments.
1173
+ StyleGuide: "#underscore-unused-vars"
1174
+ Enabled: true
1175
+ AutoCorrect: contextual
1176
+ VersionAdded: '0.21'
1177
+ VersionChanged: '1.69'
1178
+ AllowUnusedKeywordArguments: false
1179
+ IgnoreEmptyMethods: true
1180
+ IgnoreNotImplementedMethods: true
1181
+ NotImplementedExceptions:
1182
+ - NotImplementedError
1183
+
1184
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linturiescapeunescape
1185
+ Lint/UriEscapeUnescape:
1186
+ Description: "`URI.escape` method is obsolete and should not be used. Instead, use
1187
+ `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending
1188
+ on your specific use case. Also `URI.unescape` method is obsolete and should not
1189
+ be used. Instead, use `CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component`
1190
+ depending on your specific use case."
1191
+ Enabled: true
1192
+ VersionAdded: '0.50'
1193
+
1194
+ # Supports --autocorrect
1195
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linturiregexp
1196
+ Lint/UriRegexp:
1197
+ Description: Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.
1198
+ Enabled: true
1199
+ VersionAdded: '0.50'
1200
+
1201
+ # Supports --autocorrect
1202
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessaccessmodifier
1203
+ Lint/UselessAccessModifier:
1204
+ Description: Checks for useless access modifiers.
1205
+ Enabled: true
1206
+ AutoCorrect: contextual
1207
+ VersionAdded: '0.20'
1208
+ VersionChanged: '1.61'
1209
+ ContextCreatingMethods: []
1210
+ MethodCreatingMethods: []
1211
+
1212
+ # Supports --autocorrect
1213
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessassignment
1214
+ Lint/UselessAssignment:
1215
+ Description: Checks for useless assignment to a local variable.
1216
+ StyleGuide: "#underscore-unused-vars"
1217
+ Enabled: true
1218
+ AutoCorrect: contextual
1219
+ VersionAdded: '0.11'
1220
+ VersionChanged: '1.66'
1221
+
1222
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessconstantscoping
1223
+ Lint/UselessConstantScoping:
1224
+ Description: Checks for useless constant scoping.
1225
+ Enabled: true # was pending
1226
+ VersionAdded: '1.72'
1227
+
1228
+ # Supports --autocorrect
1229
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessdefaultvalueargument
1230
+ Lint/UselessDefaultValueArgument:
1231
+ Description: Checks for usage of `fetch` or `Array.new` with default value argument
1232
+ and block.
1233
+ Enabled: true # was pending
1234
+ VersionAdded: '1.76'
1235
+ Safe: false
1236
+ AllowedReceivers: []
1237
+
1238
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessdefined
1239
+ Lint/UselessDefined:
1240
+ Description: Checks for calls to `defined?` with strings and symbols. The result of
1241
+ such a call will always be truthy.
1242
+ Enabled: true # was pending
1243
+ VersionAdded: '1.69'
1244
+
1245
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselesselsewithoutrescue
1246
+ Lint/UselessElseWithoutRescue:
1247
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
1248
+ Enabled: true
1249
+ VersionAdded: '0.17'
1250
+ VersionChanged: '1.31'
1251
+
1252
+ # Supports --autocorrect
1253
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessmethoddefinition
1254
+ Lint/UselessMethodDefinition:
1255
+ Description: Checks for useless method definitions.
1256
+ Enabled: true
1257
+ AutoCorrect: contextual
1258
+ VersionAdded: '0.90'
1259
+ VersionChanged: '1.61'
1260
+ Safe: false
1261
+
1262
+ # Supports --autocorrect
1263
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessnumericoperation
1264
+ Lint/UselessNumericOperation:
1265
+ Description: Checks for useless numeric operations.
1266
+ Enabled: true # was pending
1267
+ VersionAdded: '1.66'
1268
+
1269
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessor
1270
+ Lint/UselessOr:
1271
+ Description: Checks for useless OR expressions.
1272
+ Enabled: true # was pending
1273
+ VersionAdded: '1.76'
1274
+
1275
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessrescue
1276
+ Lint/UselessRescue:
1277
+ Description: Checks for useless `rescue`s.
1278
+ Enabled: true # was pending
1279
+ VersionAdded: '1.43'
1280
+
1281
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessruby2keywords
1282
+ Lint/UselessRuby2Keywords:
1283
+ Description: Finds unnecessary uses of `ruby2_keywords`.
1284
+ Enabled: true # was pending
1285
+ VersionAdded: '1.23'
1286
+
1287
+ # Supports --autocorrect
1288
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselesssettercall
1289
+ Lint/UselessSetterCall:
1290
+ Description: Checks for useless setter call to a local variable.
1291
+ Enabled: true
1292
+ Safe: false
1293
+ VersionAdded: '0.13'
1294
+ VersionChanged: '1.2'
1295
+
1296
+ # Supports --autocorrect
1297
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintuselesstimes
1298
+ Lint/UselessTimes:
1299
+ Description: Checks for useless `Integer#times` calls.
1300
+ Enabled: true
1301
+ Safe: false
1302
+ AutoCorrect: contextual
1303
+ VersionAdded: '0.91'
1304
+ VersionChanged: '1.61'
1305
+
1306
+ # Supports --autocorrect
1307
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintvoid
1308
+ Lint/Void:
1309
+ Description: Possible use of operator/literal/variable in void context.
1310
+ Enabled: true
1311
+ AutoCorrect: contextual
1312
+ VersionAdded: '0.9'
1313
+ VersionChanged: '1.61'
1314
+ CheckForMethodsWithNoSideEffects: false
1315
+