ectoplasm 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/.rubocop.yml ADDED
@@ -0,0 +1,4522 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.0
3
+ DocumentationBaseURL: https://docs.rubocop.org/rubocop
4
+
5
+ # Department 'Bundler' (6):
6
+ Bundler/DuplicatedGem:
7
+ Description: Checks for duplicate gem entries in Gemfile.
8
+ Enabled: true
9
+ VersionAdded: '0.46'
10
+ Include:
11
+ - "**/*.gemfile"
12
+ - "**/Gemfile"
13
+ - "**/gems.rb"
14
+
15
+ Bundler/GemComment:
16
+ Description: Add a comment describing each gem.
17
+ Enabled: false
18
+ VersionAdded: '0.59'
19
+ VersionChanged: '0.85'
20
+ Include:
21
+ - "**/*.gemfile"
22
+ - "**/Gemfile"
23
+ - "**/gems.rb"
24
+ IgnoredGems: []
25
+ OnlyFor: []
26
+
27
+ Bundler/GemFilename:
28
+ Description: Enforces the filename for managing gems.
29
+ Enabled: true
30
+ VersionAdded: '1.20'
31
+ EnforcedStyle: Gemfile
32
+ SupportedStyles:
33
+ - Gemfile
34
+ - gems.rb
35
+ Include:
36
+ - "**/Gemfile"
37
+ - "**/gems.rb"
38
+ - "**/Gemfile.lock"
39
+ - "**/gems.locked"
40
+
41
+ Bundler/GemVersion:
42
+ Description: Requires or forbids specifying gem versions.
43
+ Enabled: true
44
+ VersionAdded: '1.14'
45
+ EnforcedStyle: required
46
+ SupportedStyles:
47
+ - required
48
+ - forbidden
49
+ Include:
50
+ - "**/*.gemfile"
51
+ - "**/Gemfile"
52
+ - "**/gems.rb"
53
+ AllowedGems: []
54
+
55
+ # Supports --auto-correct
56
+ Bundler/InsecureProtocolSource:
57
+ Description: The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated
58
+ because HTTP requests are insecure. Please change your source to 'https://rubygems.org'
59
+ if possible, or 'http://rubygems.org' if not.
60
+ Enabled: true
61
+ VersionAdded: '0.50'
62
+ AllowHttpProtocol: true
63
+ Include:
64
+ - "**/*.gemfile"
65
+ - "**/Gemfile"
66
+ - "**/gems.rb"
67
+
68
+ # Supports --auto-correct
69
+ Bundler/OrderedGems:
70
+ Description: Gems within groups in the Gemfile should be alphabetically sorted.
71
+ Enabled: false
72
+ VersionAdded: '0.46'
73
+ VersionChanged: '0.47'
74
+ TreatCommentsAsGroupSeparators: true
75
+ ConsiderPunctuation: false
76
+ Include:
77
+ - "**/*.gemfile"
78
+ - "**/Gemfile"
79
+ - "**/gems.rb"
80
+
81
+ # Department 'Gemspec' (6):
82
+ # Supports --auto-correct
83
+ Gemspec/DateAssignment:
84
+ Description: Checks that `date =` is not used in gemspec file, it is set automatically
85
+ when the gem is packaged.
86
+ Enabled: true
87
+ VersionAdded: '1.10'
88
+ Include:
89
+ - "**/*.gemspec"
90
+
91
+ Gemspec/DuplicatedAssignment:
92
+ Description: An attribute assignment method calls should be listed only once in a
93
+ gemspec.
94
+ Enabled: true
95
+ VersionAdded: '0.52'
96
+ Include:
97
+ - "**/*.gemspec"
98
+
99
+ # Supports --auto-correct
100
+ Gemspec/OrderedDependencies:
101
+ Description: Dependencies in the gemspec should be alphabetically sorted.
102
+ Enabled: false
103
+ VersionAdded: '0.51'
104
+ TreatCommentsAsGroupSeparators: true
105
+ ConsiderPunctuation: false
106
+ Include:
107
+ - "**/*.gemspec"
108
+
109
+ # Supports --auto-correct
110
+ Gemspec/RequireMFA:
111
+ Description: Checks that the gemspec has metadata to require MFA from RubyGems.
112
+ Enabled: false
113
+ VersionAdded: '1.23'
114
+ Reference:
115
+ - https://guides.rubygems.org/mfa-requirement-opt-in/
116
+ Include:
117
+ - "**/*.gemspec"
118
+
119
+ Gemspec/RequiredRubyVersion:
120
+ Description: Checks that `required_ruby_version` of gemspec is specified and equal
121
+ to `TargetRubyVersion` of .rubocop.yml.
122
+ Enabled: true
123
+ VersionAdded: '0.52'
124
+ VersionChanged: '0.89'
125
+ Include:
126
+ - "**/*.gemspec"
127
+
128
+ Gemspec/RubyVersionGlobalsUsage:
129
+ Description: Checks usage of RUBY_VERSION in gemspec.
130
+ StyleGuide: "#no-ruby-version-in-the-gemspec"
131
+ Enabled: false
132
+ VersionAdded: '0.72'
133
+ Include:
134
+ - "**/*.gemspec"
135
+
136
+ # Department 'Layout' (96):
137
+ # Supports --auto-correct
138
+ Layout/AccessModifierIndentation:
139
+ Description: Check indentation of private/protected visibility modifiers.
140
+ StyleGuide: "#indent-public-private-protected"
141
+ Enabled: false
142
+ VersionAdded: '0.49'
143
+ EnforcedStyle: indent
144
+ SupportedStyles:
145
+ - outdent
146
+ - indent
147
+
148
+ # Supports --auto-correct
149
+ Layout/ArgumentAlignment:
150
+ Description: Align the arguments of a method call if they span more than one line.
151
+ StyleGuide: "#no-double-indent"
152
+ Enabled: false
153
+ VersionAdded: '0.68'
154
+ VersionChanged: '0.77'
155
+ EnforcedStyle: with_first_argument
156
+ SupportedStyles:
157
+ - with_first_argument
158
+ - with_fixed_indentation
159
+
160
+ # Supports --auto-correct
161
+ Layout/ArrayAlignment:
162
+ Description: Align the elements of an array literal if they span more than one line.
163
+ StyleGuide: "#no-double-indent"
164
+ Enabled: false
165
+ VersionAdded: '0.49'
166
+ VersionChanged: '0.77'
167
+ EnforcedStyle: with_first_element
168
+ SupportedStyles:
169
+ - with_first_element
170
+ - with_fixed_indentation
171
+
172
+ # Supports --auto-correct
173
+ Layout/AssignmentIndentation:
174
+ Description: Checks the indentation of the first line of the right-hand-side of a
175
+ multi-line assignment.
176
+ Enabled: false
177
+ VersionAdded: '0.49'
178
+ VersionChanged: '0.77'
179
+
180
+ # Supports --auto-correct
181
+ Layout/BeginEndAlignment:
182
+ Description: Align ends corresponding to begins correctly.
183
+ Enabled: true
184
+ VersionAdded: '0.91'
185
+ EnforcedStyleAlignWith: start_of_line
186
+ SupportedStylesAlignWith:
187
+ - start_of_line
188
+ - begin
189
+ Severity: warning
190
+
191
+ # Supports --auto-correct
192
+ Layout/BlockAlignment:
193
+ Description: Align block ends correctly.
194
+ Enabled: true
195
+ VersionAdded: '0.53'
196
+ EnforcedStyleAlignWith: either
197
+ SupportedStylesAlignWith:
198
+ - either
199
+ - start_of_block
200
+ - start_of_line
201
+
202
+ # Supports --auto-correct
203
+ Layout/BlockEndNewline:
204
+ Description: Put end statement of multiline block on its own line.
205
+ Enabled: true
206
+ VersionAdded: '0.49'
207
+
208
+ # Supports --auto-correct
209
+ Layout/CaseIndentation:
210
+ Description: Indentation of when in a case/when/[else/]end.
211
+ StyleGuide: "#indent-when-to-case"
212
+ Enabled: true
213
+ VersionAdded: '0.49'
214
+ VersionChanged: '1.16'
215
+ EnforcedStyle: case
216
+ SupportedStyles:
217
+ - case
218
+ - end
219
+ IndentOneStep: false
220
+
221
+ # Supports --auto-correct
222
+ Layout/ClassStructure:
223
+ Description: Enforces a configured order of definitions within a class body.
224
+ StyleGuide: "#consistent-classes"
225
+ Enabled: true
226
+ VersionAdded: '0.52'
227
+ Categories:
228
+ module_inclusion:
229
+ - include
230
+ - prepend
231
+ - extend
232
+ ExpectedOrder:
233
+ - module_inclusion
234
+ - constants
235
+ - public_class_methods
236
+ - initializer
237
+ - public_methods
238
+ - protected_methods
239
+ - private_methods
240
+
241
+ # Supports --auto-correct
242
+ Layout/ClosingHeredocIndentation:
243
+ Description: Checks the indentation of here document closings.
244
+ Enabled: false
245
+ VersionAdded: '0.57'
246
+
247
+ # Supports --auto-correct
248
+ Layout/ClosingParenthesisIndentation:
249
+ Description: Checks the indentation of hanging closing parentheses.
250
+ Enabled: true
251
+ VersionAdded: '0.49'
252
+
253
+ # Supports --auto-correct
254
+ Layout/CommentIndentation:
255
+ Description: Indentation of comments.
256
+ Enabled: true
257
+ VersionAdded: '0.49'
258
+
259
+ # Supports --auto-correct
260
+ Layout/ConditionPosition:
261
+ Description: Checks for condition placed in a confusing position relative to the keyword.
262
+ StyleGuide: "#same-line-condition"
263
+ Enabled: true
264
+ VersionAdded: '0.53'
265
+ VersionChanged: '0.83'
266
+
267
+ # Supports --auto-correct
268
+ Layout/DefEndAlignment:
269
+ Description: Align ends corresponding to defs correctly.
270
+ Enabled: true
271
+ VersionAdded: '0.53'
272
+ EnforcedStyleAlignWith: start_of_line
273
+ SupportedStylesAlignWith:
274
+ - start_of_line
275
+ - def
276
+ Severity: warning
277
+
278
+ # Supports --auto-correct
279
+ Layout/DotPosition:
280
+ Description: Checks the position of the dot in multi-line method calls.
281
+ StyleGuide: "#consistent-multi-line-chains"
282
+ Enabled: true
283
+ VersionAdded: '0.49'
284
+ EnforcedStyle: leading
285
+ SupportedStyles:
286
+ - leading
287
+ - trailing
288
+
289
+ # Supports --auto-correct
290
+ Layout/ElseAlignment:
291
+ Description: Align elses and elsifs correctly.
292
+ Enabled: true
293
+ VersionAdded: '0.49'
294
+
295
+ # Supports --auto-correct
296
+ Layout/EmptyComment:
297
+ Description: Checks empty comment.
298
+ Enabled: true
299
+ VersionAdded: '0.53'
300
+ AllowBorderComment: true
301
+ AllowMarginComment: true
302
+
303
+ # Supports --auto-correct
304
+ Layout/EmptyLineAfterGuardClause:
305
+ Description: Add empty line after guard clause.
306
+ Enabled: true
307
+ VersionAdded: '0.56'
308
+ VersionChanged: '0.59'
309
+
310
+ # Supports --auto-correct
311
+ Layout/EmptyLineAfterMagicComment:
312
+ Description: Add an empty line after magic comments to separate them from code.
313
+ StyleGuide: "#separate-magic-comments-from-code"
314
+ Enabled: true
315
+ VersionAdded: '0.49'
316
+
317
+ # Supports --auto-correct
318
+ Layout/EmptyLineAfterMultilineCondition:
319
+ Description: Enforces empty line after multiline condition.
320
+ Enabled: true
321
+ VersionAdded: '0.90'
322
+ Reference:
323
+ - https://github.com/airbnb/ruby#multiline-if-newline
324
+
325
+ # Supports --auto-correct
326
+ Layout/EmptyLineBetweenDefs:
327
+ Description: Use empty lines between class/module/method defs.
328
+ StyleGuide: "#empty-lines-between-methods"
329
+ Enabled: true
330
+ VersionAdded: '0.49'
331
+ VersionChanged: '1.7'
332
+ EmptyLineBetweenMethodDefs: true
333
+ EmptyLineBetweenClassDefs: true
334
+ EmptyLineBetweenModuleDefs: true
335
+ AllowAdjacentOneLineDefs: false
336
+ NumberOfEmptyLines: 1
337
+
338
+ # Supports --auto-correct
339
+ Layout/EmptyLines:
340
+ Description: Don't use several empty lines in a row.
341
+ StyleGuide: "#two-or-more-empty-lines"
342
+ Enabled: false
343
+ VersionAdded: '0.49'
344
+
345
+ # Supports --auto-correct
346
+ Layout/EmptyLinesAroundAccessModifier:
347
+ Description: Keep blank lines around access modifiers.
348
+ StyleGuide: "#empty-lines-around-access-modifier"
349
+ Enabled: true
350
+ VersionAdded: '0.49'
351
+ EnforcedStyle: around
352
+ SupportedStyles:
353
+ - around
354
+ - only_before
355
+ Reference:
356
+ - https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
357
+
358
+ # Supports --auto-correct
359
+ Layout/EmptyLinesAroundArguments:
360
+ Description: Keeps track of empty lines around method arguments.
361
+ Enabled: true
362
+ VersionAdded: '0.52'
363
+
364
+ # Supports --auto-correct
365
+ Layout/EmptyLinesAroundAttributeAccessor:
366
+ Description: Keep blank lines around attribute accessors.
367
+ StyleGuide: "#empty-lines-around-attribute-accessor"
368
+ Enabled: true
369
+ VersionAdded: '0.83'
370
+ VersionChanged: '0.84'
371
+ AllowAliasSyntax: true
372
+ AllowedMethods:
373
+ - alias_method
374
+ - public
375
+ - protected
376
+ - private
377
+
378
+ # Supports --auto-correct
379
+ Layout/EmptyLinesAroundBeginBody:
380
+ Description: Keeps track of empty lines around begin-end bodies.
381
+ StyleGuide: "#empty-lines-around-bodies"
382
+ Enabled: true
383
+ VersionAdded: '0.49'
384
+
385
+ # Supports --auto-correct
386
+ Layout/EmptyLinesAroundBlockBody:
387
+ Description: Keeps track of empty lines around block bodies.
388
+ StyleGuide: "#empty-lines-around-bodies"
389
+ Enabled: true
390
+ VersionAdded: '0.49'
391
+ EnforcedStyle: no_empty_lines
392
+ SupportedStyles:
393
+ - empty_lines
394
+ - no_empty_lines
395
+
396
+ # Supports --auto-correct
397
+ Layout/EmptyLinesAroundClassBody:
398
+ Description: Keeps track of empty lines around class bodies.
399
+ StyleGuide: "#empty-lines-around-bodies"
400
+ Enabled: true
401
+ VersionAdded: '0.49'
402
+ VersionChanged: '0.53'
403
+ EnforcedStyle: no_empty_lines
404
+ SupportedStyles:
405
+ - empty_lines
406
+ - empty_lines_except_namespace
407
+ - empty_lines_special
408
+ - no_empty_lines
409
+ - beginning_only
410
+ - ending_only
411
+
412
+ # Supports --auto-correct
413
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
414
+ Description: Keeps track of empty lines around exception handling keywords.
415
+ StyleGuide: "#empty-lines-around-bodies"
416
+ Enabled: true
417
+ VersionAdded: '0.49'
418
+
419
+ # Supports --auto-correct
420
+ Layout/EmptyLinesAroundMethodBody:
421
+ Description: Keeps track of empty lines around method bodies.
422
+ StyleGuide: "#empty-lines-around-bodies"
423
+ Enabled: true
424
+ VersionAdded: '0.49'
425
+
426
+ # Supports --auto-correct
427
+ Layout/EmptyLinesAroundModuleBody:
428
+ Description: Keeps track of empty lines around module bodies.
429
+ StyleGuide: "#empty-lines-around-bodies"
430
+ Enabled: true
431
+ VersionAdded: '0.49'
432
+ EnforcedStyle: no_empty_lines
433
+ SupportedStyles:
434
+ - empty_lines
435
+ - empty_lines_except_namespace
436
+ - empty_lines_special
437
+ - no_empty_lines
438
+
439
+ # Supports --auto-correct
440
+ Layout/EndAlignment:
441
+ Description: Align ends correctly.
442
+ Enabled: true
443
+ VersionAdded: '0.53'
444
+ EnforcedStyleAlignWith: keyword
445
+ SupportedStylesAlignWith:
446
+ - keyword
447
+ - variable
448
+ - start_of_line
449
+ Severity: warning
450
+
451
+ Layout/EndOfLine:
452
+ Description: Use Unix-style line endings.
453
+ StyleGuide: "#crlf"
454
+ Enabled: true
455
+ VersionAdded: '0.49'
456
+ EnforcedStyle: lf
457
+ SupportedStyles:
458
+ - native
459
+ - lf
460
+ - crlf
461
+
462
+ # Supports --auto-correct
463
+ Layout/ExtraSpacing:
464
+ Description: Do not use unnecessary spacing.
465
+ Enabled: true
466
+ VersionAdded: '0.49'
467
+ AllowForAlignment: true
468
+ AllowBeforeTrailingComments: false
469
+ ForceEqualSignAlignment: false
470
+
471
+ # Supports --auto-correct
472
+ Layout/FirstArrayElementIndentation:
473
+ Description: Checks the indentation of the first element in an array literal.
474
+ Enabled: true
475
+ VersionAdded: '0.68'
476
+ VersionChanged: '0.77'
477
+ EnforcedStyle: consistent
478
+ SupportedStyles:
479
+ - special_inside_parentheses
480
+ - consistent
481
+ - align_brackets
482
+
483
+ # Supports --auto-correct
484
+ Layout/FirstArrayElementLineBreak:
485
+ Description: Checks for a line break before the first element in a multi-line array.
486
+ Enabled: true
487
+ VersionAdded: '0.49'
488
+
489
+ # Supports --auto-correct
490
+ Layout/FirstHashElementIndentation:
491
+ Description: Checks the indentation of the first key in a hash literal.
492
+ Enabled: true
493
+ VersionAdded: '0.68'
494
+ VersionChanged: '0.77'
495
+ EnforcedStyle: consistent
496
+ SupportedStyles:
497
+ - special_inside_parentheses
498
+ - consistent
499
+ - align_braces
500
+
501
+ # Supports --auto-correct
502
+ Layout/FirstHashElementLineBreak:
503
+ Description: Checks for a line break before the first element in a multi-line hash.
504
+ Enabled: true
505
+ VersionAdded: '0.49'
506
+
507
+ # Supports --auto-correct
508
+ Layout/FirstMethodArgumentLineBreak:
509
+ Description: Checks for a line break before the first argument in a multi-line method
510
+ call.
511
+ Enabled: false
512
+ VersionAdded: '0.49'
513
+
514
+ # Supports --auto-correct
515
+ Layout/FirstMethodParameterLineBreak:
516
+ Description: Checks for a line break before the first parameter in a multi-line method
517
+ parameter definition.
518
+ Enabled: true
519
+ VersionAdded: '0.49'
520
+
521
+ # Supports --auto-correct
522
+ Layout/FirstArgumentIndentation:
523
+ Description: Checks the indentation of the first parameter in a method definition.
524
+ Enabled: true
525
+ VersionAdded: '0.49'
526
+ VersionChanged: '0.77'
527
+ EnforcedStyle: consistent
528
+ SupportedStyles:
529
+ - consistent
530
+ - align_parentheses
531
+
532
+ # Supports --auto-correct
533
+ Layout/HashAlignment:
534
+ Description: Align the elements of a hash literal if they span more than one line.
535
+ Enabled: true
536
+ AllowMultipleStyles: true
537
+ VersionAdded: '0.49'
538
+ VersionChanged: '0.77'
539
+ EnforcedHashRocketStyle: key
540
+ SupportedHashRocketStyles:
541
+ - key
542
+ - separator
543
+ - table
544
+ EnforcedColonStyle: key
545
+ SupportedColonStyles:
546
+ - key
547
+ - separator
548
+ - table
549
+ EnforcedLastArgumentHashStyle: always_inspect
550
+ SupportedLastArgumentHashStyles:
551
+ - always_inspect
552
+ - always_ignore
553
+ - ignore_implicit
554
+ - ignore_explicit
555
+
556
+ # Supports --auto-correct
557
+ Layout/HeredocArgumentClosingParenthesis:
558
+ Description: Checks for the placement of the closing parenthesis in a method call
559
+ that passes a HEREDOC string as an argument.
560
+ Enabled: false
561
+ StyleGuide: "#heredoc-argument-closing-parentheses"
562
+ VersionAdded: '0.68'
563
+
564
+ # Supports --auto-correct
565
+ Layout/HeredocIndentation:
566
+ Description: This cop checks the indentation of the here document bodies.
567
+ StyleGuide: "#squiggly-heredocs"
568
+ Enabled: false
569
+ VersionAdded: '0.49'
570
+ VersionChanged: '0.85'
571
+
572
+ # Supports --auto-correct
573
+ Layout/IndentationConsistency:
574
+ Description: Keep indentation straight.
575
+ StyleGuide: "#spaces-indentation"
576
+ Enabled: true
577
+ VersionAdded: '0.49'
578
+ EnforcedStyle: normal
579
+ SupportedStyles:
580
+ - normal
581
+ - indented_internal_methods
582
+ Reference:
583
+ - https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
584
+
585
+ # Supports --auto-correct
586
+ Layout/IndentationStyle:
587
+ Description: Consistent indentation either with tabs only or spaces only.
588
+ StyleGuide: "#spaces-indentation"
589
+ Enabled: true
590
+ VersionAdded: '0.49'
591
+ VersionChanged: '0.82'
592
+ EnforcedStyle: spaces
593
+ SupportedStyles:
594
+ - spaces
595
+ - tabs
596
+
597
+ # Supports --auto-correct
598
+ Layout/IndentationWidth:
599
+ Description: Use 2 spaces for indentation.
600
+ StyleGuide: "#spaces-indentation"
601
+ Enabled: true
602
+ VersionAdded: '0.49'
603
+ Width: 2
604
+ AllowedPatterns: []
605
+
606
+ # Supports --auto-correct
607
+ Layout/InitialIndentation:
608
+ Description: Checks the indentation of the first non-blank non-comment line in a file.
609
+ Enabled: true
610
+ VersionAdded: '0.49'
611
+
612
+ # Supports --auto-correct
613
+ Layout/LeadingCommentSpace:
614
+ Description: Comments should start with a space.
615
+ StyleGuide: "#hash-space"
616
+ Enabled: false
617
+ VersionAdded: '0.49'
618
+ VersionChanged: '0.73'
619
+ AllowDoxygenCommentStyle: false
620
+ AllowGemfileRubyComment: false
621
+
622
+ # Supports --auto-correct
623
+ Layout/LeadingEmptyLines:
624
+ Description: Check for unnecessary blank lines at the beginning of a file.
625
+ Enabled: true
626
+ VersionAdded: '0.57'
627
+ VersionChanged: '0.77'
628
+
629
+ # Supports --auto-correct
630
+ Layout/LineEndStringConcatenationIndentation:
631
+ Description: Checks the indentation of the next line after a line that ends with a
632
+ string literal and a backslash.
633
+ Enabled: false
634
+ VersionAdded: '1.18'
635
+ EnforcedStyle: aligned
636
+ SupportedStyles:
637
+ - aligned
638
+ - indented
639
+ IndentationWidth:
640
+
641
+ # Supports --auto-correct
642
+ Layout/LineLength:
643
+ Description: Checks that line length does not exceed the configured limit.
644
+ StyleGuide: "#max-line-length"
645
+ Enabled: false
646
+ VersionAdded: '0.25'
647
+ VersionChanged: '1.4'
648
+ Max: 120
649
+ AllowHeredoc: true
650
+ AllowURI: true
651
+ URISchemes:
652
+ - http
653
+ - https
654
+ IgnoreCopDirectives: true
655
+ AllowedPatterns: []
656
+ AutoCorrect: true
657
+
658
+ # Supports --auto-correct
659
+ Layout/MultilineArrayBraceLayout:
660
+ Description: Checks that the closing brace in an array literal is either on the same
661
+ line as the last array element, or a new line.
662
+ Enabled: false
663
+ VersionAdded: '0.49'
664
+ EnforcedStyle: symmetrical
665
+ SupportedStyles:
666
+ - symmetrical
667
+ - new_line
668
+ - same_line
669
+
670
+ # Supports --auto-correct
671
+ Layout/MultilineArrayLineBreaks:
672
+ Description: Checks that each item in a multi-line array literal starts on a separate
673
+ line.
674
+ Enabled: false
675
+ VersionAdded: '0.67'
676
+
677
+ # Supports --auto-correct
678
+ Layout/MultilineAssignmentLayout:
679
+ Description: Check for a newline after the assignment operator in multi-line assignments.
680
+ StyleGuide: "#indent-conditional-assignment"
681
+ Enabled: false
682
+ VersionAdded: '0.49'
683
+ SupportedTypes:
684
+ - block
685
+ - case
686
+ - class
687
+ - if
688
+ - kwbegin
689
+ - module
690
+ EnforcedStyle: new_line
691
+ SupportedStyles:
692
+ - same_line
693
+ - new_line
694
+
695
+ # Supports --auto-correct
696
+ Layout/MultilineBlockLayout:
697
+ Description: Ensures newlines after multiline block do statements.
698
+ Enabled: true
699
+ VersionAdded: '0.49'
700
+
701
+ # Supports --auto-correct
702
+ Layout/MultilineHashBraceLayout:
703
+ Description: Checks that the closing brace in a hash literal is either on the same
704
+ line as the last hash element, or a new line.
705
+ Enabled: false
706
+ VersionAdded: '0.49'
707
+ EnforcedStyle: symmetrical
708
+ SupportedStyles:
709
+ - symmetrical
710
+ - new_line
711
+ - same_line
712
+
713
+ # Supports --auto-correct
714
+ Layout/MultilineHashKeyLineBreaks:
715
+ Description: Checks that each item in a multi-line hash literal starts on a separate
716
+ line.
717
+ Enabled: false
718
+ VersionAdded: '0.67'
719
+
720
+ # Supports --auto-correct
721
+ Layout/MultilineMethodArgumentLineBreaks:
722
+ Description: Checks that each argument in a multi-line method call starts on a separate
723
+ line.
724
+ Enabled: false
725
+ VersionAdded: '0.67'
726
+
727
+ # Supports --auto-correct
728
+ Layout/MultilineMethodCallBraceLayout:
729
+ Description: Checks that the closing brace in a method call is either on the same
730
+ line as the last method argument, or a new line.
731
+ Enabled: false
732
+ VersionAdded: '0.49'
733
+ EnforcedStyle: symmetrical
734
+ SupportedStyles:
735
+ - symmetrical
736
+ - new_line
737
+ - same_line
738
+
739
+ # Supports --auto-correct
740
+ Layout/MultilineMethodCallIndentation:
741
+ Description: Checks indentation of method calls with the dot operator that span more
742
+ than one line.
743
+ Enabled: false
744
+ VersionAdded: '0.49'
745
+ EnforcedStyle: aligned
746
+ SupportedStyles:
747
+ - aligned
748
+ - indented
749
+ - indented_relative_to_receiver
750
+
751
+ # Supports --auto-correct
752
+ Layout/MultilineMethodDefinitionBraceLayout:
753
+ Description: Checks that the closing brace in a method definition is either on the
754
+ same line as the last method parameter, or a new line.
755
+ Enabled: false
756
+ VersionAdded: '0.49'
757
+ EnforcedStyle: symmetrical
758
+ SupportedStyles:
759
+ - symmetrical
760
+ - new_line
761
+ - same_line
762
+
763
+ # Supports --auto-correct
764
+ Layout/MultilineOperationIndentation:
765
+ Description: Checks indentation of binary operations that span more than one line.
766
+ Enabled: false
767
+ VersionAdded: '0.49'
768
+ EnforcedStyle: aligned
769
+ SupportedStyles:
770
+ - aligned
771
+ - indented
772
+
773
+ # Supports --auto-correct
774
+ Layout/ParameterAlignment:
775
+ Description: Align the parameters of a method definition if they span more than one
776
+ line.
777
+ StyleGuide: "#no-double-indent"
778
+ Enabled: false
779
+ VersionAdded: '0.49'
780
+ VersionChanged: '0.77'
781
+ EnforcedStyle: with_first_parameter
782
+ SupportedStyles:
783
+ - with_first_parameter
784
+ - with_fixed_indentation
785
+
786
+ # Supports --auto-correct
787
+ Layout/RedundantLineBreak:
788
+ Description: Do not break up an expression into multiple lines when it fits on a single
789
+ line.
790
+ Enabled: false
791
+ InspectBlocks: false
792
+ VersionAdded: '1.13'
793
+
794
+ # Supports --auto-correct
795
+ Layout/RescueEnsureAlignment:
796
+ Description: Align rescues and ensures correctly.
797
+ Enabled: false
798
+ VersionAdded: '0.49'
799
+
800
+ # Supports --auto-correct
801
+ Layout/SingleLineBlockChain:
802
+ Description: Put method call on a separate line if chained to a single line block.
803
+ Enabled: false
804
+ VersionAdded: '1.14'
805
+
806
+ # Supports --auto-correct
807
+ Layout/SpaceAfterColon:
808
+ Description: Use spaces after colons.
809
+ StyleGuide: "#spaces-operators"
810
+ Enabled: false
811
+ VersionAdded: '0.49'
812
+
813
+ # Supports --auto-correct
814
+ Layout/SpaceAfterComma:
815
+ Description: Use spaces after commas.
816
+ StyleGuide: "#spaces-operators"
817
+ Enabled: false
818
+ VersionAdded: '0.49'
819
+
820
+ # Supports --auto-correct
821
+ Layout/SpaceAfterMethodName:
822
+ Description: Do not put a space between a method name and the opening parenthesis
823
+ in a method definition.
824
+ StyleGuide: "#parens-no-spaces"
825
+ Enabled: false
826
+ VersionAdded: '0.49'
827
+
828
+ # Supports --auto-correct
829
+ Layout/SpaceAfterNot:
830
+ Description: Tracks redundant space after the ! operator.
831
+ StyleGuide: "#no-space-bang"
832
+ Enabled: false
833
+ VersionAdded: '0.49'
834
+
835
+ # Supports --auto-correct
836
+ Layout/SpaceAfterSemicolon:
837
+ Description: Use spaces after semicolons.
838
+ StyleGuide: "#spaces-operators"
839
+ Enabled: false
840
+ VersionAdded: '0.49'
841
+
842
+ # Supports --auto-correct
843
+ Layout/SpaceAroundBlockParameters:
844
+ Description: Checks the spacing inside and after block parameters pipes.
845
+ Enabled: false
846
+ VersionAdded: '0.49'
847
+ EnforcedStyleInsidePipes: no_space
848
+ SupportedStylesInsidePipes:
849
+ - space
850
+ - no_space
851
+
852
+ # Supports --auto-correct
853
+ Layout/SpaceAroundEqualsInParameterDefault:
854
+ Description: Checks that the equals signs in parameter default assignments have or
855
+ don't have surrounding space depending on configuration.
856
+ StyleGuide: "#spaces-around-equals"
857
+ Enabled: false
858
+ VersionAdded: '0.49'
859
+ EnforcedStyle: space
860
+ SupportedStyles:
861
+ - space
862
+ - no_space
863
+
864
+ # Supports --auto-correct
865
+ Layout/SpaceAroundKeyword:
866
+ Description: Use a space around keywords if appropriate.
867
+ Enabled: false
868
+ VersionAdded: '0.49'
869
+
870
+ # Supports --auto-correct
871
+ Layout/SpaceAroundMethodCallOperator:
872
+ Description: Checks method call operators to not have spaces around them.
873
+ Enabled: false
874
+ VersionAdded: '0.82'
875
+
876
+ # Supports --auto-correct
877
+ Layout/SpaceAroundOperators:
878
+ Description: Use a single space around operators.
879
+ StyleGuide: "#spaces-operators"
880
+ Enabled: false
881
+ VersionAdded: '0.49'
882
+ AllowForAlignment: true
883
+ EnforcedStyleForExponentOperator: no_space
884
+ SupportedStylesForExponentOperator:
885
+ - space
886
+ - no_space
887
+
888
+ # Supports --auto-correct
889
+ Layout/SpaceBeforeBlockBraces:
890
+ Description: Checks that the left block brace has or doesn't have space before it.
891
+ Enabled: false
892
+ VersionAdded: '0.49'
893
+ EnforcedStyle: space
894
+ SupportedStyles:
895
+ - space
896
+ - no_space
897
+ EnforcedStyleForEmptyBraces: space
898
+ SupportedStylesForEmptyBraces:
899
+ - space
900
+ - no_space
901
+ VersionChanged: '0.52'
902
+
903
+ # Supports --auto-correct
904
+ Layout/SpaceBeforeBrackets:
905
+ Description: Checks for receiver with a space before the opening brackets.
906
+ StyleGuide: "#space-in-brackets-access"
907
+ Enabled: false
908
+ VersionAdded: '1.7'
909
+
910
+ # Supports --auto-correct
911
+ Layout/SpaceBeforeComma:
912
+ Description: No spaces before commas.
913
+ Enabled: false
914
+ VersionAdded: '0.49'
915
+
916
+ # Supports --auto-correct
917
+ Layout/SpaceBeforeComment:
918
+ Description: Checks for missing space between code and a comment on the same line.
919
+ Enabled: false
920
+ VersionAdded: '0.49'
921
+
922
+ # Supports --auto-correct
923
+ Layout/SpaceBeforeFirstArg:
924
+ Description: Checks that exactly one space is used between a method name and the first
925
+ argument for method calls without parentheses.
926
+ Enabled: false
927
+ VersionAdded: '0.49'
928
+ AllowForAlignment: true
929
+
930
+ # Supports --auto-correct
931
+ Layout/SpaceBeforeSemicolon:
932
+ Description: No spaces before semicolons.
933
+ Enabled: false
934
+ VersionAdded: '0.49'
935
+
936
+ # Supports --auto-correct
937
+ Layout/SpaceInLambdaLiteral:
938
+ Description: Checks for spaces in lambda literals.
939
+ Enabled: false
940
+ VersionAdded: '0.49'
941
+ EnforcedStyle: require_no_space
942
+ SupportedStyles:
943
+ - require_no_space
944
+ - require_space
945
+
946
+ # Supports --auto-correct
947
+ Layout/SpaceInsideArrayLiteralBrackets:
948
+ Description: Checks the spacing inside array literal brackets.
949
+ Enabled: false
950
+ VersionAdded: '0.52'
951
+ EnforcedStyle: no_space
952
+ SupportedStyles:
953
+ - space
954
+ - no_space
955
+ - compact
956
+ EnforcedStyleForEmptyBrackets: no_space
957
+ SupportedStylesForEmptyBrackets:
958
+ - space
959
+ - no_space
960
+
961
+ # Supports --auto-correct
962
+ Layout/SpaceInsideArrayPercentLiteral:
963
+ Description: No unnecessary additional spaces between elements in %i/%w literals.
964
+ Enabled: false
965
+ VersionAdded: '0.49'
966
+
967
+ # Supports --auto-correct
968
+ Layout/SpaceInsideBlockBraces:
969
+ Description: Checks that block braces have or don't have surrounding space. For blocks
970
+ taking parameters, checks that the left brace has or doesn't have trailing space.
971
+ Enabled: false
972
+ VersionAdded: '0.49'
973
+ EnforcedStyle: space
974
+ SupportedStyles:
975
+ - space
976
+ - no_space
977
+ EnforcedStyleForEmptyBraces: no_space
978
+ SupportedStylesForEmptyBraces:
979
+ - space
980
+ - no_space
981
+ SpaceBeforeBlockParameters: true
982
+
983
+ # Supports --auto-correct
984
+ Layout/SpaceInsideHashLiteralBraces:
985
+ Description: Use spaces inside hash literal braces - or don't.
986
+ StyleGuide: "#spaces-braces"
987
+ Enabled: false
988
+ VersionAdded: '0.49'
989
+ EnforcedStyle: space
990
+ SupportedStyles:
991
+ - space
992
+ - no_space
993
+ - compact
994
+ EnforcedStyleForEmptyBraces: no_space
995
+ SupportedStylesForEmptyBraces:
996
+ - space
997
+ - no_space
998
+
999
+ # Supports --auto-correct
1000
+ Layout/SpaceInsideParens:
1001
+ Description: No spaces after ( or before ).
1002
+ StyleGuide: "#spaces-braces"
1003
+ Enabled: false
1004
+ VersionAdded: '0.49'
1005
+ VersionChanged: '0.55'
1006
+ EnforcedStyle: no_space
1007
+ SupportedStyles:
1008
+ - space
1009
+ - no_space
1010
+
1011
+ # Supports --auto-correct
1012
+ Layout/SpaceInsidePercentLiteralDelimiters:
1013
+ Description: No unnecessary spaces inside delimiters of %i/%w/%x literals.
1014
+ Enabled: false
1015
+ VersionAdded: '0.49'
1016
+
1017
+ # Supports --auto-correct
1018
+ Layout/SpaceInsideRangeLiteral:
1019
+ Description: No spaces inside range literals.
1020
+ StyleGuide: "#no-space-inside-range-literals"
1021
+ Enabled: false
1022
+ VersionAdded: '0.49'
1023
+
1024
+ # Supports --auto-correct
1025
+ Layout/SpaceInsideReferenceBrackets:
1026
+ Description: Checks the spacing inside referential brackets.
1027
+ Enabled: false
1028
+ VersionAdded: '0.52'
1029
+ VersionChanged: '0.53'
1030
+ EnforcedStyle: no_space
1031
+ SupportedStyles:
1032
+ - space
1033
+ - no_space
1034
+ EnforcedStyleForEmptyBrackets: no_space
1035
+ SupportedStylesForEmptyBrackets:
1036
+ - space
1037
+ - no_space
1038
+
1039
+ # Supports --auto-correct
1040
+ Layout/SpaceInsideStringInterpolation:
1041
+ Description: Checks for padding/surrounding spaces inside string interpolation.
1042
+ StyleGuide: "#string-interpolation"
1043
+ Enabled: false
1044
+ VersionAdded: '0.49'
1045
+ EnforcedStyle: no_space
1046
+ SupportedStyles:
1047
+ - space
1048
+ - no_space
1049
+
1050
+ # Supports --auto-correct
1051
+ Layout/TrailingEmptyLines:
1052
+ Description: Checks trailing blank lines and final newline.
1053
+ StyleGuide: "#newline-eof"
1054
+ Enabled: true
1055
+ VersionAdded: '0.49'
1056
+ VersionChanged: '0.77'
1057
+ EnforcedStyle: final_newline
1058
+ SupportedStyles:
1059
+ - final_newline
1060
+ - final_blank_line
1061
+
1062
+ # Supports --auto-correct
1063
+ Layout/TrailingWhitespace:
1064
+ Description: Avoid trailing whitespace.
1065
+ StyleGuide: "#no-trailing-whitespace"
1066
+ Enabled: true
1067
+ VersionAdded: '0.49'
1068
+ VersionChanged: '1.0'
1069
+ AllowInHeredoc: false
1070
+
1071
+ # Department 'Lint' (126):
1072
+ Lint/AmbiguousAssignment:
1073
+ Description: Checks for mistyped shorthand assignments.
1074
+ Enabled: false
1075
+ VersionAdded: '1.7'
1076
+
1077
+ Lint/AmbiguousBlockAssociation:
1078
+ Description: Checks for ambiguous block association with method when param passed
1079
+ without parentheses.
1080
+ StyleGuide: "#syntax"
1081
+ Enabled: false
1082
+ VersionAdded: '0.48'
1083
+ VersionChanged: '1.13'
1084
+ IgnoredMethods: []
1085
+
1086
+ # Supports --auto-correct
1087
+ Lint/AmbiguousOperator:
1088
+ Description: Checks for ambiguous operators in the first argument of a method invocation
1089
+ without parentheses.
1090
+ StyleGuide: "#method-invocation-parens"
1091
+ Enabled: false
1092
+ VersionAdded: '0.17'
1093
+ VersionChanged: '0.83'
1094
+
1095
+ # Supports --auto-correct
1096
+ Lint/AmbiguousOperatorPrecedence:
1097
+ Description: Checks for expressions containing multiple binary operations with ambiguous
1098
+ precedence.
1099
+ Enabled: false
1100
+ VersionAdded: '1.21'
1101
+
1102
+ # Supports --auto-correct
1103
+ Lint/AmbiguousRange:
1104
+ Description: Checks for ranges with ambiguous boundaries.
1105
+ Enabled: false
1106
+ VersionAdded: '1.19'
1107
+ SafeAutoCorrect: false
1108
+ RequireParenthesesForMethodChains: false
1109
+
1110
+ # Supports --auto-correct
1111
+ Lint/AmbiguousRegexpLiteral:
1112
+ Description: Checks for ambiguous regexp literals in the first argument of a method
1113
+ invocation without parentheses.
1114
+ Enabled: false
1115
+ VersionAdded: '0.17'
1116
+ VersionChanged: '0.83'
1117
+
1118
+ Lint/AssignmentInCondition:
1119
+ Description: Don't use assignment in conditions.
1120
+ StyleGuide: "#safe-assignment-in-condition"
1121
+ Enabled: false
1122
+ VersionAdded: '0.9'
1123
+ AllowSafeAssignment: true
1124
+
1125
+ # Supports --auto-correct
1126
+ Lint/BigDecimalNew:
1127
+ Description: "`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead."
1128
+ Enabled: false
1129
+ VersionAdded: '0.53'
1130
+
1131
+ Lint/BinaryOperatorWithIdenticalOperands:
1132
+ Description: This cop checks for places where binary operator has identical operands.
1133
+ Enabled: false
1134
+ Safe: false
1135
+ VersionAdded: '0.89'
1136
+ VersionChanged: '1.7'
1137
+
1138
+ # Supports --auto-correct
1139
+ Lint/BooleanSymbol:
1140
+ Description: Check for `:true` and `:false` symbols.
1141
+ Enabled: false
1142
+ SafeAutoCorrect: false
1143
+ VersionAdded: '0.50'
1144
+ VersionChanged: '0.83'
1145
+
1146
+ Lint/CircularArgumentReference:
1147
+ Description: Default values in optional keyword arguments and optional ordinal arguments
1148
+ should not refer back to the name of the argument.
1149
+ Enabled: false
1150
+ VersionAdded: '0.33'
1151
+
1152
+ Lint/ConstantDefinitionInBlock:
1153
+ Description: Do not define constants within a block.
1154
+ StyleGuide: "#no-constant-definition-in-block"
1155
+ Enabled: false
1156
+ VersionAdded: '0.91'
1157
+ VersionChanged: '1.3'
1158
+ AllowedMethods:
1159
+ - enums
1160
+
1161
+ Lint/ConstantResolution:
1162
+ Description: Check that constants are fully qualified with `::`.
1163
+ Enabled: false
1164
+ VersionAdded: '0.86'
1165
+ Only: []
1166
+ Ignore: []
1167
+
1168
+ Lint/Debugger:
1169
+ Description: Check for debugger calls.
1170
+ Enabled: false
1171
+ VersionAdded: '0.14'
1172
+ VersionChanged: '1.10'
1173
+ DebuggerMethods:
1174
+ Kernel:
1175
+ - binding.irb
1176
+ Byebug:
1177
+ - byebug
1178
+ - remote_byebug
1179
+ - Kernel.byebug
1180
+ - Kernel.remote_byebug
1181
+ Capybara:
1182
+ - save_and_open_page
1183
+ - save_and_open_screenshot
1184
+ debug.rb:
1185
+ - binding.b
1186
+ - binding.break
1187
+ - Kernel.binding.b
1188
+ - Kernel.binding.break
1189
+ Pry:
1190
+ - binding.pry
1191
+ - binding.remote_pry
1192
+ - binding.pry_remote
1193
+ - Pry.rescue
1194
+ Rails:
1195
+ - debugger
1196
+ - Kernel.debugger
1197
+ RubyJard:
1198
+ - jard
1199
+ WebConsole:
1200
+ - binding.console
1201
+
1202
+ # Supports --auto-correct
1203
+ Lint/DeprecatedClassMethods:
1204
+ Description: Check for deprecated class method calls.
1205
+ Enabled: false
1206
+ VersionAdded: '0.19'
1207
+
1208
+ # Supports --auto-correct
1209
+ Lint/DeprecatedConstants:
1210
+ Description: Checks for deprecated constants.
1211
+ Enabled: false
1212
+ VersionAdded: '1.8'
1213
+ VersionChanged: '1.22'
1214
+ DeprecatedConstants:
1215
+ NIL:
1216
+ Alternative: nil
1217
+ DeprecatedVersion: '2.4'
1218
+ 'TRUE':
1219
+ Alternative: 'true'
1220
+ DeprecatedVersion: '2.4'
1221
+ 'FALSE':
1222
+ Alternative: 'false'
1223
+ DeprecatedVersion: '2.4'
1224
+ Net::HTTPServerException:
1225
+ Alternative: Net::HTTPClientException
1226
+ DeprecatedVersion: '2.6'
1227
+ Random::DEFAULT:
1228
+ Alternative: Random.new
1229
+ DeprecatedVersion: '3.0'
1230
+
1231
+ # Supports --auto-correct
1232
+ Lint/DeprecatedOpenSSLConstant:
1233
+ Description: Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`.
1234
+ Enabled: false
1235
+ VersionAdded: '0.84'
1236
+
1237
+ # Supports --auto-correct
1238
+ Lint/DisjunctiveAssignmentInConstructor:
1239
+ Description: In constructor, plain assignment is preferred over disjunctive.
1240
+ Enabled: false
1241
+ Safe: false
1242
+ VersionAdded: '0.62'
1243
+ VersionChanged: '0.88'
1244
+
1245
+ Lint/DuplicateBranch:
1246
+ Description: Checks that there are no repeated bodies within `if/unless`, `case-when`
1247
+ and `rescue` constructs.
1248
+ Enabled: false
1249
+ VersionAdded: '1.3'
1250
+ VersionChanged: '1.7'
1251
+ IgnoreLiteralBranches: false
1252
+ IgnoreConstantBranches: false
1253
+
1254
+ Lint/DuplicateCaseCondition:
1255
+ Description: Do not repeat values in case conditionals.
1256
+ Enabled: false
1257
+ VersionAdded: '0.45'
1258
+
1259
+ Lint/DuplicateElsifCondition:
1260
+ Description: Do not repeat conditions used in if `elsif`.
1261
+ Enabled: false
1262
+ VersionAdded: '0.88'
1263
+
1264
+ Lint/DuplicateHashKey:
1265
+ Description: Check for duplicate keys in hash literals.
1266
+ Enabled: false
1267
+ VersionAdded: '0.34'
1268
+ VersionChanged: '0.77'
1269
+
1270
+ Lint/DuplicateMethods:
1271
+ Description: Check for duplicate method definitions.
1272
+ Enabled: false
1273
+ VersionAdded: '0.29'
1274
+
1275
+ # Supports --auto-correct
1276
+ Lint/DuplicateRegexpCharacterClassElement:
1277
+ Description: Checks for duplicate elements in Regexp character classes.
1278
+ Enabled: false
1279
+ VersionAdded: '1.1'
1280
+
1281
+ Lint/DuplicateRequire:
1282
+ Description: Check for duplicate `require`s and `require_relative`s.
1283
+ Enabled: false
1284
+ VersionAdded: '0.90'
1285
+
1286
+ Lint/DuplicateRescueException:
1287
+ Description: Checks that there are no repeated exceptions used in `rescue` expressions.
1288
+ Enabled: false
1289
+ VersionAdded: '0.89'
1290
+
1291
+ Lint/EachWithObjectArgument:
1292
+ Description: Check for immutable argument given to each_with_object.
1293
+ Enabled: false
1294
+ VersionAdded: '0.31'
1295
+
1296
+ # Supports --auto-correct
1297
+ Lint/ElseLayout:
1298
+ Description: Check for odd code arrangement in an else block.
1299
+ Enabled: false
1300
+ VersionAdded: '0.17'
1301
+ VersionChanged: '1.2'
1302
+
1303
+ Lint/EmptyBlock:
1304
+ Description: This cop checks for blocks without a body.
1305
+ Enabled: false
1306
+ VersionAdded: '1.1'
1307
+ VersionChanged: '1.15'
1308
+ AllowComments: true
1309
+ AllowEmptyLambdas: true
1310
+
1311
+ Lint/EmptyClass:
1312
+ Description: Checks for classes and metaclasses without a body.
1313
+ Enabled: false
1314
+ VersionAdded: '1.3'
1315
+ AllowComments: false
1316
+
1317
+ Lint/EmptyConditionalBody:
1318
+ Description: This cop checks for the presence of `if`, `elsif` and `unless` branches
1319
+ without a body.
1320
+ Enabled: false
1321
+ AllowComments: true
1322
+ VersionAdded: '0.89'
1323
+
1324
+ # Supports --auto-correct
1325
+ Lint/EmptyEnsure:
1326
+ Description: Checks for empty ensure block.
1327
+ Enabled: false
1328
+ VersionAdded: '0.10'
1329
+ VersionChanged: '0.48'
1330
+
1331
+ Lint/EmptyExpression:
1332
+ Description: Checks for empty expressions.
1333
+ Enabled: false
1334
+ VersionAdded: '0.45'
1335
+
1336
+ Lint/EmptyFile:
1337
+ Description: Enforces that Ruby source files are not empty.
1338
+ Enabled: false
1339
+ AllowComments: true
1340
+ VersionAdded: '0.90'
1341
+
1342
+ Lint/EmptyInPattern:
1343
+ Description: Checks for the presence of `in` pattern branches without a body.
1344
+ Enabled: false
1345
+ AllowComments: true
1346
+ VersionAdded: '1.16'
1347
+
1348
+ # Supports --auto-correct
1349
+ Lint/EmptyInterpolation:
1350
+ Description: Checks for empty string interpolation.
1351
+ Enabled: false
1352
+ VersionAdded: '0.20'
1353
+ VersionChanged: '0.45'
1354
+
1355
+ Lint/EmptyWhen:
1356
+ Description: Checks for `when` branches with empty bodies.
1357
+ Enabled: false
1358
+ AllowComments: true
1359
+ VersionAdded: '0.45'
1360
+ VersionChanged: '0.83'
1361
+
1362
+ # Supports --auto-correct
1363
+ Lint/EnsureReturn:
1364
+ Description: Do not use return in an ensure block.
1365
+ StyleGuide: "#no-return-ensure"
1366
+ Enabled: false
1367
+ VersionAdded: '0.9'
1368
+ VersionChanged: '0.83'
1369
+
1370
+ # Supports --auto-correct
1371
+ Lint/ErbNewArguments:
1372
+ Description: Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`.
1373
+ Enabled: false
1374
+ VersionAdded: '0.56'
1375
+
1376
+ Lint/FlipFlop:
1377
+ Description: Checks for flip-flops.
1378
+ StyleGuide: "#no-flip-flops"
1379
+ Enabled: false
1380
+ VersionAdded: '0.16'
1381
+
1382
+ Lint/FloatComparison:
1383
+ Description: Checks for the presence of precise comparison of floating point numbers.
1384
+ StyleGuide: "#float-comparison"
1385
+ Enabled: false
1386
+ VersionAdded: '0.89'
1387
+
1388
+ Lint/FloatOutOfRange:
1389
+ Description: Catches floating-point literals too large or small for Ruby to represent.
1390
+ Enabled: false
1391
+ VersionAdded: '0.36'
1392
+
1393
+ Lint/FormatParameterMismatch:
1394
+ Description: The number of parameters to format/sprint must match the fields.
1395
+ Enabled: false
1396
+ VersionAdded: '0.33'
1397
+
1398
+ Lint/HashCompareByIdentity:
1399
+ Description: Prefer using `Hash#compare_by_identity` than using `object_id` for keys.
1400
+ StyleGuide: "#identity-comparison"
1401
+ Enabled: false
1402
+ Safe: false
1403
+ VersionAdded: '0.93'
1404
+
1405
+ # Supports --auto-correct
1406
+ Lint/HeredocMethodCallPosition:
1407
+ Description: Checks for the ordering of a method call where the receiver of the call
1408
+ is a HEREDOC.
1409
+ Enabled: false
1410
+ StyleGuide: "#heredoc-method-calls"
1411
+ VersionAdded: '0.68'
1412
+
1413
+ # Supports --auto-correct
1414
+ Lint/IdentityComparison:
1415
+ Description: Prefer `equal?` over `==` when comparing `object_id`.
1416
+ Enabled: false
1417
+ StyleGuide: "#identity-comparison"
1418
+ VersionAdded: '0.91'
1419
+
1420
+ Lint/ImplicitStringConcatenation:
1421
+ Description: Checks for adjacent string literals on the same line, which could better
1422
+ be represented as a single string literal.
1423
+ Enabled: false
1424
+ VersionAdded: '0.36'
1425
+
1426
+ # Supports --auto-correct
1427
+ Lint/IncompatibleIoSelectWithFiberScheduler:
1428
+ Description: Checks for `IO.select` that is incompatible with Fiber Scheduler.
1429
+ Enabled: false
1430
+ VersionAdded: '1.21'
1431
+
1432
+ Lint/IneffectiveAccessModifier:
1433
+ Description: Checks for attempts to use `private` or `protected` to set the visibility
1434
+ of a class method, which does not work.
1435
+ Enabled: false
1436
+ VersionAdded: '0.36'
1437
+
1438
+ # Supports --auto-correct
1439
+ Lint/InheritException:
1440
+ Description: Avoid inheriting from the `Exception` class.
1441
+ Enabled: false
1442
+ VersionAdded: '0.41'
1443
+ EnforcedStyle: runtime_error
1444
+ SupportedStyles:
1445
+ - runtime_error
1446
+ - standard_error
1447
+
1448
+ # Supports --auto-correct
1449
+ Lint/InterpolationCheck:
1450
+ Description: Raise warning for interpolation in single q strs.
1451
+ Enabled: false
1452
+ Safe: false
1453
+ VersionAdded: '0.50'
1454
+ VersionChanged: '0.87'
1455
+
1456
+ # Supports --auto-correct
1457
+ Lint/LambdaWithoutLiteralBlock:
1458
+ Description: Checks uses of lambda without a literal block.
1459
+ Enabled: false
1460
+ VersionAdded: '1.8'
1461
+
1462
+ Lint/LiteralAsCondition:
1463
+ Description: Checks of literals used in conditions.
1464
+ Enabled: false
1465
+ VersionAdded: '0.51'
1466
+
1467
+ # Supports --auto-correct
1468
+ Lint/LiteralInInterpolation:
1469
+ Description: Checks for literals used in interpolation.
1470
+ Enabled: false
1471
+ VersionAdded: '0.19'
1472
+ VersionChanged: '0.32'
1473
+
1474
+ # Supports --auto-correct
1475
+ Lint/Loop:
1476
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1477
+ for post-loop tests.
1478
+ StyleGuide: "#loop-with-break"
1479
+ Enabled: false
1480
+ VersionAdded: '0.9'
1481
+ VersionChanged: '1.3'
1482
+ Safe: false
1483
+
1484
+ Lint/MissingCopEnableDirective:
1485
+ Description: Checks for a `# rubocop:enable` after `# rubocop:disable`.
1486
+ Enabled: false
1487
+ VersionAdded: '0.52'
1488
+ MaximumRangeSize: .inf
1489
+
1490
+ Lint/MissingSuper:
1491
+ Description: This cop checks for the presence of constructors and lifecycle callbacks
1492
+ without calls to `super`'.
1493
+ Enabled: false
1494
+ VersionAdded: '0.89'
1495
+ VersionChanged: '1.4'
1496
+
1497
+ Lint/MixedRegexpCaptureTypes:
1498
+ Description: Do not mix named captures and numbered captures in a Regexp literal.
1499
+ Enabled: false
1500
+ VersionAdded: '0.85'
1501
+
1502
+ # Supports --auto-correct
1503
+ Lint/MultipleComparison:
1504
+ Description: Use `&&` operator to compare multiple values.
1505
+ Enabled: false
1506
+ VersionAdded: '0.47'
1507
+ VersionChanged: '1.1'
1508
+
1509
+ Lint/NestedMethodDefinition:
1510
+ Description: Do not use nested method definitions.
1511
+ StyleGuide: "#no-nested-methods"
1512
+ Enabled: false
1513
+ VersionAdded: '0.32'
1514
+
1515
+ Lint/NestedPercentLiteral:
1516
+ Description: Checks for nested percent literals.
1517
+ Enabled: false
1518
+ VersionAdded: '0.52'
1519
+
1520
+ Lint/NextWithoutAccumulator:
1521
+ Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
1522
+ block.
1523
+ Enabled: false
1524
+ VersionAdded: '0.36'
1525
+
1526
+ Lint/NoReturnInBeginEndBlocks:
1527
+ Description: Do not `return` inside `begin..end` blocks in assignment contexts.
1528
+ Enabled: false
1529
+ VersionAdded: '1.2'
1530
+
1531
+ # Supports --auto-correct
1532
+ Lint/NonDeterministicRequireOrder:
1533
+ Description: Always sort arrays returned by Dir.glob when requiring files.
1534
+ Enabled: false
1535
+ VersionAdded: '0.78'
1536
+ Safe: false
1537
+
1538
+ Lint/NonLocalExitFromIterator:
1539
+ Description: Do not use return in iterator to cause non-local exit.
1540
+ Enabled: false
1541
+ VersionAdded: '0.30'
1542
+
1543
+ # Supports --auto-correct
1544
+ Lint/NumberConversion:
1545
+ Description: Checks unsafe usage of number conversion methods.
1546
+ Enabled: false
1547
+ VersionAdded: '0.53'
1548
+ VersionChanged: '1.1'
1549
+ SafeAutoCorrect: false
1550
+ IgnoredMethods: []
1551
+ IgnoredClasses:
1552
+ - Time
1553
+ - DateTime
1554
+
1555
+ Lint/NumberedParameterAssignment:
1556
+ Description: Checks for uses of numbered parameter assignment.
1557
+ Enabled: false
1558
+ VersionAdded: '1.9'
1559
+
1560
+ # Supports --auto-correct
1561
+ Lint/OrAssignmentToConstant:
1562
+ Description: Checks unintended or-assignment to constant.
1563
+ Enabled: false
1564
+ Safe: false
1565
+ VersionAdded: '1.9'
1566
+
1567
+ # Supports --auto-correct
1568
+ Lint/OrderedMagicComments:
1569
+ Description: Checks the proper ordering of magic comments and whether a magic comment
1570
+ is not placed before a shebang.
1571
+ Enabled: false
1572
+ VersionAdded: '0.53'
1573
+
1574
+ Lint/OutOfRangeRegexpRef:
1575
+ Description: Checks for out of range reference for Regexp because it always returns
1576
+ nil.
1577
+ Enabled: false
1578
+ Safe: false
1579
+ VersionAdded: '0.89'
1580
+
1581
+ # Supports --auto-correct
1582
+ Lint/ParenthesesAsGroupedExpression:
1583
+ Description: Checks for method calls with a space before the opening parenthesis.
1584
+ StyleGuide: "#parens-no-spaces"
1585
+ Enabled: false
1586
+ VersionAdded: '0.12'
1587
+ VersionChanged: '0.83'
1588
+
1589
+ # Supports --auto-correct
1590
+ Lint/PercentStringArray:
1591
+ Description: Checks for unwanted commas and quotes in %w/%W literals.
1592
+ Enabled: false
1593
+ Safe: false
1594
+ VersionAdded: '0.41'
1595
+
1596
+ # Supports --auto-correct
1597
+ Lint/PercentSymbolArray:
1598
+ Description: Checks for unwanted commas and colons in %i/%I literals.
1599
+ Enabled: false
1600
+ VersionAdded: '0.41'
1601
+
1602
+ # Supports --auto-correct
1603
+ Lint/RaiseException:
1604
+ Description: Checks for `raise` or `fail` statements which are raising `Exception`
1605
+ class.
1606
+ StyleGuide: "#raise-exception"
1607
+ Enabled: false
1608
+ Safe: false
1609
+ VersionAdded: '0.81'
1610
+ VersionChanged: '0.86'
1611
+ AllowedImplicitNamespaces:
1612
+ - Gem
1613
+
1614
+ Lint/RandOne:
1615
+ Description: Checks for `rand(1)` calls. Such calls always return `0` and most likely
1616
+ a mistake.
1617
+ Enabled: false
1618
+ VersionAdded: '0.36'
1619
+
1620
+ # Supports --auto-correct
1621
+ Lint/RedundantCopDisableDirective:
1622
+ Description: 'Checks for rubocop:disable comments that can be removed. Note: this
1623
+ cop is not disabled when disabling all cops. It must be explicitly disabled.'
1624
+ Enabled: false
1625
+ VersionAdded: '0.76'
1626
+
1627
+ # Supports --auto-correct
1628
+ Lint/RedundantCopEnableDirective:
1629
+ Description: Checks for rubocop:enable comments that can be removed.
1630
+ Enabled: false
1631
+ VersionAdded: '0.76'
1632
+
1633
+ # Supports --auto-correct
1634
+ Lint/RedundantDirGlobSort:
1635
+ Description: Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.
1636
+ Enabled: false
1637
+ VersionAdded: '1.8'
1638
+
1639
+ # Supports --auto-correct
1640
+ Lint/RedundantRequireStatement:
1641
+ Description: Checks for unnecessary `require` statement.
1642
+ Enabled: false
1643
+ VersionAdded: '0.76'
1644
+
1645
+ # Supports --auto-correct
1646
+ Lint/RedundantSafeNavigation:
1647
+ Description: Checks for redundant safe navigation calls.
1648
+ Enabled: false
1649
+ VersionAdded: '0.93'
1650
+ AllowedMethods:
1651
+ - instance_of?
1652
+ - kind_of?
1653
+ - is_a?
1654
+ - eql?
1655
+ - respond_to?
1656
+ - equal?
1657
+ Safe: false
1658
+
1659
+ # Supports --auto-correct
1660
+ Lint/RedundantSplatExpansion:
1661
+ Description: Checks for splat unnecessarily being called on literals.
1662
+ Enabled: false
1663
+ VersionAdded: '0.76'
1664
+ VersionChanged: '1.7'
1665
+ AllowPercentLiteralArrayArgument: true
1666
+
1667
+ # Supports --auto-correct
1668
+ Lint/RedundantStringCoercion:
1669
+ Description: Checks for Object#to_s usage in string interpolation.
1670
+ StyleGuide: "#no-to-s"
1671
+ Enabled: false
1672
+ VersionAdded: '0.19'
1673
+ VersionChanged: '0.77'
1674
+
1675
+ # Supports --auto-correct
1676
+ Lint/RedundantWithIndex:
1677
+ Description: Checks for redundant `with_index`.
1678
+ Enabled: false
1679
+ VersionAdded: '0.50'
1680
+
1681
+ # Supports --auto-correct
1682
+ Lint/RedundantWithObject:
1683
+ Description: Checks for redundant `with_object`.
1684
+ Enabled: false
1685
+ VersionAdded: '0.51'
1686
+
1687
+ # Supports --auto-correct
1688
+ Lint/RegexpAsCondition:
1689
+ Description: Do not use regexp literal as a condition. The regexp literal matches
1690
+ `$_` implicitly.
1691
+ Enabled: false
1692
+ VersionAdded: '0.51'
1693
+ VersionChanged: '0.86'
1694
+
1695
+ Lint/RequireParentheses:
1696
+ Description: Use parentheses in the method call to avoid confusion about precedence.
1697
+ Enabled: false
1698
+ VersionAdded: '0.18'
1699
+
1700
+ # Supports --auto-correct
1701
+ Lint/RequireRelativeSelfPath:
1702
+ Description: Checks for uses a file requiring itself with `require_relative`.
1703
+ Enabled: true
1704
+ VersionAdded: '1.22'
1705
+
1706
+ Lint/RescueException:
1707
+ Description: Avoid rescuing the Exception class.
1708
+ StyleGuide: "#no-blind-rescues"
1709
+ Enabled: false
1710
+ VersionAdded: '0.9'
1711
+ VersionChanged: '0.27'
1712
+
1713
+ # Supports --auto-correct
1714
+ Lint/RescueType:
1715
+ Description: Avoid rescuing from non constants that could result in a `TypeError`.
1716
+ Enabled: false
1717
+ VersionAdded: '0.49'
1718
+
1719
+ Lint/ReturnInVoidContext:
1720
+ Description: Checks for return in void context.
1721
+ Enabled: false
1722
+ VersionAdded: '0.50'
1723
+
1724
+ Lint/SafeNavigationChain:
1725
+ Description: Do not chain ordinary method call after safe navigation operator.
1726
+ Enabled: false
1727
+ VersionAdded: '0.47'
1728
+ VersionChanged: '0.77'
1729
+ AllowedMethods:
1730
+ - present?
1731
+ - blank?
1732
+ - presence
1733
+ - try
1734
+ - try!
1735
+ - in?
1736
+
1737
+ # Supports --auto-correct
1738
+ Lint/SafeNavigationConsistency:
1739
+ Description: Check to make sure that if safe navigation is used for a method call
1740
+ in an `&&` or `||` condition that safe navigation is used for all method calls on
1741
+ that same object.
1742
+ Enabled: false
1743
+ VersionAdded: '0.55'
1744
+ VersionChanged: '0.77'
1745
+ AllowedMethods:
1746
+ - present?
1747
+ - blank?
1748
+ - presence
1749
+ - try
1750
+ - try!
1751
+
1752
+ # Supports --auto-correct
1753
+ Lint/SafeNavigationWithEmpty:
1754
+ Description: Avoid `foo&.empty?` in conditionals.
1755
+ Enabled: false
1756
+ VersionAdded: '0.62'
1757
+ VersionChanged: '0.87'
1758
+
1759
+ # Supports --auto-correct
1760
+ Lint/ScriptPermission:
1761
+ Description: Grant script file execute permission.
1762
+ Enabled: false
1763
+ VersionAdded: '0.49'
1764
+ VersionChanged: '0.50'
1765
+
1766
+ Lint/SelfAssignment:
1767
+ Description: Checks for self-assignments.
1768
+ Enabled: false
1769
+ VersionAdded: '0.89'
1770
+
1771
+ # Supports --auto-correct
1772
+ Lint/SendWithMixinArgument:
1773
+ Description: Checks for `send` method when using mixin.
1774
+ Enabled: false
1775
+ VersionAdded: '0.75'
1776
+
1777
+ Lint/ShadowedArgument:
1778
+ Description: Avoid reassigning arguments before they were used.
1779
+ Enabled: false
1780
+ VersionAdded: '0.52'
1781
+ IgnoreImplicitReferences: false
1782
+
1783
+ Lint/ShadowedException:
1784
+ Description: Avoid rescuing a higher level exception before a lower level exception.
1785
+ Enabled: false
1786
+ VersionAdded: '0.41'
1787
+
1788
+ Lint/ShadowingOuterLocalVariable:
1789
+ Description: Do not use the same name as outer local variable for block arguments
1790
+ or block local variables.
1791
+ Enabled: true
1792
+ VersionAdded: '0.9'
1793
+
1794
+ Lint/StructNewOverride:
1795
+ Description: Disallow overriding the `Struct` built-in methods via `Struct.new`.
1796
+ Enabled: false
1797
+ VersionAdded: '0.81'
1798
+
1799
+ Lint/SuppressedException:
1800
+ Description: Don't suppress exceptions.
1801
+ StyleGuide: "#dont-hide-exceptions"
1802
+ Enabled: false
1803
+ AllowComments: true
1804
+ AllowNil: true
1805
+ VersionAdded: '0.9'
1806
+ VersionChanged: '1.12'
1807
+
1808
+ # Supports --auto-correct
1809
+ Lint/SymbolConversion:
1810
+ Description: Checks for unnecessary symbol conversions.
1811
+ Enabled: false
1812
+ VersionAdded: '1.9'
1813
+ VersionChanged: '1.16'
1814
+ EnforcedStyle: strict
1815
+ SupportedStyles:
1816
+ - strict
1817
+ - consistent
1818
+
1819
+ Lint/Syntax:
1820
+ Description: Checks for syntax errors.
1821
+ Enabled: true
1822
+ VersionAdded: '0.9'
1823
+
1824
+ Lint/ToEnumArguments:
1825
+ Description: This cop ensures that `to_enum`/`enum_for`, called for the current method,
1826
+ has correct arguments.
1827
+ Enabled: true
1828
+ VersionAdded: '1.1'
1829
+
1830
+ # Supports --auto-correct
1831
+ Lint/ToJSON:
1832
+ Description: 'Ensure #to_json includes an optional argument.'
1833
+ Enabled: true
1834
+ VersionAdded: '0.66'
1835
+
1836
+ Lint/TopLevelReturnWithArgument:
1837
+ Description: This cop detects top level return statements with argument.
1838
+ Enabled: true
1839
+ VersionAdded: '0.89'
1840
+
1841
+ # Supports --auto-correct
1842
+ Lint/TrailingCommaInAttributeDeclaration:
1843
+ Description: This cop checks for trailing commas in attribute declarations.
1844
+ Enabled: true
1845
+ VersionAdded: '0.90'
1846
+
1847
+ # Supports --auto-correct
1848
+ Lint/TripleQuotes:
1849
+ Description: Checks for useless triple quote constructs.
1850
+ Enabled: true
1851
+ VersionAdded: '1.9'
1852
+
1853
+ Lint/UnderscorePrefixedVariableName:
1854
+ Description: Do not use prefix `_` for a variable that is used.
1855
+ Enabled: true
1856
+ VersionAdded: '0.21'
1857
+ AllowKeywordBlockArguments: false
1858
+
1859
+ Lint/UnexpectedBlockArity:
1860
+ Description: Looks for blocks that have fewer arguments that the calling method expects.
1861
+ Enabled: true
1862
+ Safe: false
1863
+ VersionAdded: '1.5'
1864
+ Methods:
1865
+ chunk_while: 2
1866
+ each_with_index: 2
1867
+ each_with_object: 2
1868
+ inject: 2
1869
+ max: 2
1870
+ min: 2
1871
+ minmax: 2
1872
+ reduce: 2
1873
+ slice_when: 2
1874
+ sort: 2
1875
+
1876
+ # Supports --auto-correct
1877
+ Lint/UnifiedInteger:
1878
+ Description: Use Integer instead of Fixnum or Bignum.
1879
+ Enabled: true
1880
+ VersionAdded: '0.43'
1881
+
1882
+ Lint/UnmodifiedReduceAccumulator:
1883
+ Description: Checks for `reduce` or `inject` blocks that do not update the accumulator
1884
+ each iteration.
1885
+ Enabled: false
1886
+ VersionAdded: '1.1'
1887
+ VersionChanged: '1.5'
1888
+
1889
+ Lint/UnreachableCode:
1890
+ Description: Unreachable code.
1891
+ Enabled: true
1892
+ VersionAdded: '0.9'
1893
+
1894
+ Lint/UnreachableLoop:
1895
+ Description: This cop checks for loops that will have at most one iteration.
1896
+ Enabled: false
1897
+ VersionAdded: '0.89'
1898
+ VersionChanged: '1.7'
1899
+ AllowedPatterns:
1900
+ - !ruby/regexp /(exactly|at_least|at_most)\(\d+\)\.times/
1901
+
1902
+ # Supports --auto-correct
1903
+ Lint/UnusedBlockArgument:
1904
+ Description: Checks for unused block arguments.
1905
+ StyleGuide: "#underscore-unused-vars"
1906
+ Enabled: true
1907
+ VersionAdded: '0.21'
1908
+ VersionChanged: '0.22'
1909
+ IgnoreEmptyBlocks: true
1910
+ AllowUnusedKeywordArguments: false
1911
+
1912
+ # Supports --auto-correct
1913
+ Lint/UnusedMethodArgument:
1914
+ Description: Checks for unused method arguments.
1915
+ StyleGuide: "#underscore-unused-vars"
1916
+ Enabled: true
1917
+ VersionAdded: '0.21'
1918
+ VersionChanged: '0.81'
1919
+ AllowUnusedKeywordArguments: false
1920
+ IgnoreEmptyMethods: true
1921
+ IgnoreNotImplementedMethods: true
1922
+
1923
+ Lint/UriEscapeUnescape:
1924
+ Description: "`URI.escape` method is obsolete and should not be used. Instead, use
1925
+ `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending
1926
+ on your specific use case. Also `URI.unescape` method is obsolete and should not
1927
+ be used. Instead, use `CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component`
1928
+ depending on your specific use case."
1929
+ Enabled: true
1930
+ VersionAdded: '0.50'
1931
+
1932
+ # Supports --auto-correct
1933
+ Lint/UriRegexp:
1934
+ Description: Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.
1935
+ Enabled: true
1936
+ VersionAdded: '0.50'
1937
+
1938
+ # Supports --auto-correct
1939
+ Lint/UselessAccessModifier:
1940
+ Description: Checks for useless access modifiers.
1941
+ Enabled: true
1942
+ VersionAdded: '0.20'
1943
+ VersionChanged: '0.83'
1944
+ ContextCreatingMethods: []
1945
+ MethodCreatingMethods: []
1946
+
1947
+ Lint/UselessAssignment:
1948
+ Description: Checks for useless assignment to a local variable.
1949
+ StyleGuide: "#underscore-unused-vars"
1950
+ Enabled: true
1951
+ VersionAdded: '0.11'
1952
+
1953
+ Lint/UselessElseWithoutRescue:
1954
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
1955
+ Enabled: false
1956
+ VersionAdded: '0.17'
1957
+
1958
+ # Supports --auto-correct
1959
+ Lint/UselessMethodDefinition:
1960
+ Description: Checks for useless method definitions.
1961
+ Enabled: true
1962
+ VersionAdded: '0.90'
1963
+ Safe: false
1964
+
1965
+ Lint/UselessRuby2Keywords:
1966
+ Description: Finds unnecessary uses of `ruby2_keywords`.
1967
+ Enabled: true
1968
+ VersionAdded: '1.23'
1969
+
1970
+ # Supports --auto-correct
1971
+ Lint/UselessSetterCall:
1972
+ Description: Checks for useless setter call to a local variable.
1973
+ Enabled: false
1974
+ SafeAutoCorrect: false
1975
+ VersionAdded: '0.13'
1976
+ VersionChanged: '1.2'
1977
+ Safe: false
1978
+
1979
+ # Supports --auto-correct
1980
+ Lint/UselessTimes:
1981
+ Description: Checks for useless `Integer#times` calls.
1982
+ Enabled: false
1983
+ VersionAdded: '0.91'
1984
+ Safe: false
1985
+
1986
+ Lint/Void:
1987
+ Description: Possible use of operator/literal/variable in void context.
1988
+ Enabled: false
1989
+ VersionAdded: '0.9'
1990
+ CheckForMethodsWithNoSideEffects: false
1991
+
1992
+ # Department 'Metrics' (9):
1993
+ Metrics/AbcSize:
1994
+ Description: A calculated magnitude based on number of assignments, branches, and
1995
+ conditions.
1996
+ Reference:
1997
+ - http://c2.com/cgi/wiki?AbcMetric
1998
+ - https://en.wikipedia.org/wiki/ABC_Software_Metric
1999
+ Enabled: false
2000
+ VersionAdded: '0.27'
2001
+ VersionChanged: '1.5'
2002
+ IgnoredMethods: []
2003
+ CountRepeatedAttributes: true
2004
+ Max: 17
2005
+
2006
+ Metrics/BlockLength:
2007
+ Description: Avoid long blocks with many lines.
2008
+ Enabled: false
2009
+ VersionAdded: '0.44'
2010
+ VersionChanged: '1.5'
2011
+ CountComments: false
2012
+ Max: 25
2013
+ CountAsOne: []
2014
+ IgnoredMethods:
2015
+ - refine
2016
+ Exclude: []
2017
+
2018
+ Metrics/BlockNesting:
2019
+ Description: Avoid excessive block nesting.
2020
+ StyleGuide: "#three-is-the-number-thou-shalt-count"
2021
+ Enabled: false
2022
+ VersionAdded: '0.25'
2023
+ VersionChanged: '0.47'
2024
+ CountBlocks: false
2025
+ Max: 3
2026
+
2027
+ Metrics/ClassLength:
2028
+ Description: Avoid classes longer than 100 lines of code.
2029
+ Enabled: false
2030
+ VersionAdded: '0.25'
2031
+ VersionChanged: '0.87'
2032
+ CountComments: false
2033
+ Max: 100
2034
+ CountAsOne: []
2035
+
2036
+ Metrics/CyclomaticComplexity:
2037
+ Description: A complexity metric that is strongly correlated to the number of test
2038
+ cases needed to validate a method.
2039
+ Enabled: false
2040
+ VersionAdded: '0.25'
2041
+ VersionChanged: '0.81'
2042
+ IgnoredMethods: []
2043
+ Max: 7
2044
+
2045
+ Metrics/MethodLength:
2046
+ Description: Avoid methods longer than 10 lines of code.
2047
+ StyleGuide: "#short-methods"
2048
+ Enabled: false
2049
+ VersionAdded: '0.25'
2050
+ VersionChanged: '1.5'
2051
+ CountComments: false
2052
+ Max: 10
2053
+ CountAsOne: []
2054
+ IgnoredMethods: []
2055
+
2056
+ Metrics/ModuleLength:
2057
+ Description: Avoid modules longer than 100 lines of code.
2058
+ Enabled: false
2059
+ VersionAdded: '0.31'
2060
+ VersionChanged: '0.87'
2061
+ CountComments: false
2062
+ Max: 100
2063
+ CountAsOne: []
2064
+
2065
+ Metrics/ParameterLists:
2066
+ Description: Avoid parameter lists longer than three or four parameters.
2067
+ StyleGuide: "#too-many-params"
2068
+ Enabled: false
2069
+ VersionAdded: '0.25'
2070
+ VersionChanged: '1.5'
2071
+ Max: 5
2072
+ CountKeywordArgs: true
2073
+ MaxOptionalParameters: 3
2074
+
2075
+ Metrics/PerceivedComplexity:
2076
+ Description: A complexity metric geared towards measuring complexity for a human reader.
2077
+ Enabled: false
2078
+ VersionAdded: '0.25'
2079
+ VersionChanged: '0.81'
2080
+ IgnoredMethods: []
2081
+ Max: 8
2082
+
2083
+ # Department 'Migration' (1):
2084
+ # Supports --auto-correct
2085
+ Migration/DepartmentName:
2086
+ Description: Check that cop names in rubocop:disable (etc) comments are given with
2087
+ department name.
2088
+ Enabled: false
2089
+ VersionAdded: '0.75'
2090
+
2091
+ # Department 'Naming' (17):
2092
+ Naming/AccessorMethodName:
2093
+ Description: Check the naming of accessor methods for get_/set_.
2094
+ StyleGuide: "#accessor_mutator_method_names"
2095
+ Enabled: false
2096
+ VersionAdded: '0.50'
2097
+
2098
+ Naming/AsciiIdentifiers:
2099
+ Description: Use only ascii symbols in identifiers and constants.
2100
+ StyleGuide: "#english-identifiers"
2101
+ Enabled: true
2102
+ VersionAdded: '0.50'
2103
+ VersionChanged: '0.87'
2104
+ AsciiConstants: true
2105
+
2106
+ # Supports --auto-correct
2107
+ Naming/BinaryOperatorParameterName:
2108
+ Description: When defining binary operators, name the argument other.
2109
+ StyleGuide: "#other-arg"
2110
+ Enabled: true
2111
+ VersionAdded: '0.50'
2112
+ VersionChanged: '1.2'
2113
+
2114
+ Naming/BlockParameterName:
2115
+ Description: Checks for block parameter names that contain capital letters, end in
2116
+ numbers, or do not meet a minimal length.
2117
+ Enabled: true
2118
+ VersionAdded: '0.53'
2119
+ VersionChanged: '0.77'
2120
+ MinNameLength: 1
2121
+ AllowNamesEndingInNumbers: true
2122
+ AllowedNames: []
2123
+ ForbiddenNames: []
2124
+
2125
+ Naming/ClassAndModuleCamelCase:
2126
+ Description: Use CamelCase for classes and modules.
2127
+ StyleGuide: "#camelcase-classes"
2128
+ Enabled: true
2129
+ VersionAdded: '0.50'
2130
+ VersionChanged: '0.85'
2131
+ AllowedNames:
2132
+ - module_parent
2133
+
2134
+ Naming/ConstantName:
2135
+ Description: Constants should use SCREAMING_SNAKE_CASE.
2136
+ StyleGuide: "#screaming-snake-case"
2137
+ Enabled: true
2138
+ VersionAdded: '0.50'
2139
+
2140
+ Naming/FileName:
2141
+ Description: Use snake_case for source file names.
2142
+ StyleGuide: "#snake-case-files"
2143
+ Enabled: true
2144
+ VersionAdded: '0.50'
2145
+ VersionChanged: '1.23'
2146
+ Exclude: []
2147
+ ExpectMatchingDefinition: false
2148
+ CheckDefinitionPathHierarchy: true
2149
+ CheckDefinitionPathHierarchyRoots:
2150
+ - lib
2151
+ - spec
2152
+ - test
2153
+ - src
2154
+ IgnoreExecutableScripts: true
2155
+ AllowedAcronyms:
2156
+ - CLI
2157
+ - DSL
2158
+ - ACL
2159
+ - API
2160
+ - ASCII
2161
+ - CPU
2162
+ - CSS
2163
+ - DNS
2164
+ - EOF
2165
+ - GUID
2166
+ - HTML
2167
+ - HTTP
2168
+ - HTTPS
2169
+ - ID
2170
+ - IP
2171
+ - JSON
2172
+ - LHS
2173
+ - QPS
2174
+ - RAM
2175
+ - RHS
2176
+ - RPC
2177
+ - SLA
2178
+ - SMTP
2179
+ - SQL
2180
+ - SSH
2181
+ - TCP
2182
+ - TLS
2183
+ - TTL
2184
+ - UDP
2185
+ - UI
2186
+ - UID
2187
+ - UUID
2188
+ - URI
2189
+ - URL
2190
+ - UTF8
2191
+ - VM
2192
+ - XML
2193
+ - XMPP
2194
+ - XSRF
2195
+ - XSS
2196
+
2197
+ # Supports --auto-correct
2198
+ Naming/HeredocDelimiterCase:
2199
+ Description: Use configured case for heredoc delimiters.
2200
+ StyleGuide: "#heredoc-delimiters"
2201
+ Enabled: false
2202
+ VersionAdded: '0.50'
2203
+ VersionChanged: '1.2'
2204
+ EnforcedStyle: uppercase
2205
+ SupportedStyles:
2206
+ - lowercase
2207
+ - uppercase
2208
+
2209
+ Naming/HeredocDelimiterNaming:
2210
+ Description: Use descriptive heredoc delimiters.
2211
+ StyleGuide: "#heredoc-delimiters"
2212
+ Enabled: false
2213
+ VersionAdded: '0.50'
2214
+ ForbiddenDelimiters:
2215
+ - !ruby/regexp /(^|\s)(EO[A-Z]{1}|END)(\s|$)/
2216
+
2217
+ Naming/InclusiveLanguage:
2218
+ Description: Recommend the use of inclusive language instead of problematic terms.
2219
+ Enabled: false
2220
+ VersionAdded: '1.18'
2221
+ VersionChanged: '1.21'
2222
+ CheckIdentifiers: true
2223
+ CheckConstants: true
2224
+ CheckVariables: true
2225
+ CheckStrings: false
2226
+ CheckSymbols: true
2227
+ CheckComments: true
2228
+ CheckFilepaths: true
2229
+ FlaggedTerms:
2230
+ whitelist:
2231
+ Regex: !ruby/regexp /white[-_\s]?list/
2232
+ Suggestions:
2233
+ - allowlist
2234
+ - permit
2235
+ blacklist:
2236
+ Regex: !ruby/regexp /black[-_\s]?list/
2237
+ Suggestions:
2238
+ - denylist
2239
+ - block
2240
+ slave:
2241
+ WholeWord: true
2242
+ Suggestions:
2243
+ - replica
2244
+ - secondary
2245
+ - follower
2246
+
2247
+ Naming/MemoizedInstanceVariableName:
2248
+ Description: Memoized method name should match memo instance variable name.
2249
+ Enabled: false
2250
+ VersionAdded: '0.53'
2251
+ VersionChanged: '1.2'
2252
+ EnforcedStyleForLeadingUnderscores: disallowed
2253
+ SupportedStylesForLeadingUnderscores:
2254
+ - disallowed
2255
+ - required
2256
+ - optional
2257
+ Safe: false
2258
+
2259
+ Naming/MethodName:
2260
+ Description: Use the configured style when naming methods.
2261
+ StyleGuide: "#snake-case-symbols-methods-vars"
2262
+ Enabled: true
2263
+ VersionAdded: '0.50'
2264
+ EnforcedStyle: snake_case
2265
+ SupportedStyles:
2266
+ - snake_case
2267
+ - camelCase
2268
+ AllowedPatterns: []
2269
+
2270
+ Naming/MethodParameterName:
2271
+ Description: Checks for method parameter names that contain capital letters, end in
2272
+ numbers, or do not meet a minimal length.
2273
+ Enabled: true
2274
+ VersionAdded: '0.53'
2275
+ VersionChanged: '0.77'
2276
+ MinNameLength: 3
2277
+ AllowNamesEndingInNumbers: true
2278
+ AllowedNames:
2279
+ - at
2280
+ - by
2281
+ - db
2282
+ - id
2283
+ - in
2284
+ - io
2285
+ - ip
2286
+ - of
2287
+ - 'on'
2288
+ - os
2289
+ - pp
2290
+ - to
2291
+ ForbiddenNames: []
2292
+
2293
+ Naming/PredicateName:
2294
+ Description: Check the names of predicate methods.
2295
+ StyleGuide: "#bool-methods-qmark"
2296
+ Enabled: true
2297
+ VersionAdded: '0.50'
2298
+ VersionChanged: '0.77'
2299
+ NamePrefix:
2300
+ - is_
2301
+ - has_
2302
+ - have_
2303
+ ForbiddenPrefixes:
2304
+ - is_
2305
+ - has_
2306
+ - have_
2307
+ AllowedMethods:
2308
+ - is_a?
2309
+ MethodDefinitionMacros:
2310
+ - define_method
2311
+ - define_singleton_method
2312
+ Exclude: []
2313
+
2314
+ # Supports --auto-correct
2315
+ Naming/RescuedExceptionsVariableName:
2316
+ Description: Use consistent rescued exceptions variables naming.
2317
+ Enabled: false
2318
+ VersionAdded: '0.67'
2319
+ VersionChanged: '0.68'
2320
+ PreferredName: e
2321
+
2322
+ Naming/VariableName:
2323
+ Description: Use the configured style when naming variables.
2324
+ StyleGuide: "#snake-case-symbols-methods-vars"
2325
+ Enabled: true
2326
+ VersionAdded: '0.50'
2327
+ VersionChanged: '1.8'
2328
+ EnforcedStyle: snake_case
2329
+ SupportedStyles:
2330
+ - snake_case
2331
+ - camelCase
2332
+ AllowedIdentifiers: []
2333
+
2334
+ Naming/VariableNumber:
2335
+ Description: Use the configured style when numbering symbols, methods and variables.
2336
+ StyleGuide: "#snake-case-symbols-methods-vars-with-numbers"
2337
+ Enabled: false
2338
+ VersionAdded: '0.50'
2339
+ VersionChanged: '1.4'
2340
+ EnforcedStyle: normalcase
2341
+ SupportedStyles:
2342
+ - snake_case
2343
+ - normalcase
2344
+ - non_integer
2345
+ CheckMethodNames: true
2346
+ CheckSymbols: true
2347
+ AllowedIdentifiers:
2348
+ - capture3
2349
+ - iso8601
2350
+ - rfc1123_date
2351
+ - rfc822
2352
+ - rfc2822
2353
+ - rfc3339
2354
+
2355
+ # Department 'Security' (6):
2356
+ Security/Eval:
2357
+ Description: The use of eval represents a serious security risk.
2358
+ Enabled: false
2359
+ VersionAdded: '0.47'
2360
+
2361
+ # Supports --auto-correct
2362
+ Security/IoMethods:
2363
+ Description: Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`,
2364
+ `IO.binwrite`, `IO.foreach`, and `IO.readlines`.
2365
+ Enabled: true
2366
+ Safe: false
2367
+ VersionAdded: '1.22'
2368
+
2369
+ # Supports --auto-correct
2370
+ Security/JSONLoad:
2371
+ Description: Prefer usage of `JSON.parse` over `JSON.load` due to potential security
2372
+ issues. See reference for more information.
2373
+ Reference: https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load
2374
+ Enabled: false
2375
+ VersionAdded: '0.43'
2376
+ VersionChanged: '0.44'
2377
+ SafeAutoCorrect: false
2378
+ AutoCorrect: false
2379
+
2380
+ Security/MarshalLoad:
2381
+ Description: Avoid using of `Marshal.load` or `Marshal.restore` due to potential security
2382
+ issues. See reference for more information.
2383
+ Reference: https://ruby-doc.org/core-2.7.0/Marshal.html#module-Marshal-label-Security+considerations
2384
+ Enabled: false
2385
+ VersionAdded: '0.47'
2386
+
2387
+ Security/Open:
2388
+ Description: The use of `Kernel#open` and `URI.open` represent a serious security
2389
+ risk.
2390
+ Enabled: false
2391
+ VersionAdded: '0.53'
2392
+ VersionChanged: '1.0'
2393
+ Safe: false
2394
+
2395
+ # Supports --auto-correct
2396
+ Security/YAMLLoad:
2397
+ Description: Prefer usage of `YAML.safe_load` over `YAML.load` due to potential security
2398
+ issues. See reference for more information.
2399
+ Reference: https://ruby-doc.org/stdlib-2.7.0/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security
2400
+ Enabled: true
2401
+ VersionAdded: '0.47'
2402
+ SafeAutoCorrect: false
2403
+
2404
+ # Department 'Style' (220):
2405
+ Style/AccessModifierDeclarations:
2406
+ Description: Checks style of how access modifiers are used.
2407
+ Enabled: false
2408
+ VersionAdded: '0.57'
2409
+ VersionChanged: '0.81'
2410
+ EnforcedStyle: group
2411
+ SupportedStyles:
2412
+ - inline
2413
+ - group
2414
+ AllowModifiersOnSymbols: true
2415
+
2416
+ # Supports --auto-correct
2417
+ Style/AccessorGrouping:
2418
+ Description: Checks for grouping of accessors in `class` and `module` bodies.
2419
+ Enabled: false
2420
+ VersionAdded: '0.87'
2421
+ EnforcedStyle: grouped
2422
+ SupportedStyles:
2423
+ - separated
2424
+ - grouped
2425
+
2426
+ # Supports --auto-correct
2427
+ Style/Alias:
2428
+ Description: Use alias instead of alias_method.
2429
+ StyleGuide: "#alias-method-lexically"
2430
+ Enabled: false
2431
+ VersionAdded: '0.9'
2432
+ VersionChanged: '0.36'
2433
+ EnforcedStyle: prefer_alias
2434
+ SupportedStyles:
2435
+ - prefer_alias
2436
+ - prefer_alias_method
2437
+
2438
+ # Supports --auto-correct
2439
+ Style/AndOr:
2440
+ Description: Use &&/|| instead of and/or.
2441
+ StyleGuide: "#no-and-or-or"
2442
+ Enabled: false
2443
+ SafeAutoCorrect: false
2444
+ VersionAdded: '0.9'
2445
+ VersionChanged: '0.25'
2446
+ EnforcedStyle: conditionals
2447
+ SupportedStyles:
2448
+ - always
2449
+ - conditionals
2450
+
2451
+ # Supports --auto-correct
2452
+ Style/ArgumentsForwarding:
2453
+ Description: Use arguments forwarding.
2454
+ StyleGuide: "#arguments-forwarding"
2455
+ Enabled: false
2456
+ AllowOnlyRestArgument: true
2457
+ VersionAdded: '1.1'
2458
+
2459
+ # Supports --auto-correct
2460
+ Style/ArrayCoercion:
2461
+ Description: Use Array() instead of explicit Array check or [*var], when dealing with
2462
+ a variable you want to treat as an Array, but you're not certain it's an array.
2463
+ StyleGuide: "#array-coercion"
2464
+ Safe: false
2465
+ Enabled: false
2466
+ VersionAdded: '0.88'
2467
+
2468
+ # Supports --auto-correct
2469
+ Style/ArrayJoin:
2470
+ Description: Use Array#join instead of Array#*.
2471
+ StyleGuide: "#array-join"
2472
+ Enabled: false
2473
+ VersionAdded: '0.20'
2474
+ VersionChanged: '0.31'
2475
+
2476
+ Style/AsciiComments:
2477
+ Description: Use only ascii symbols in comments.
2478
+ StyleGuide: "#english-comments"
2479
+ Enabled: false
2480
+ VersionAdded: '0.9'
2481
+ VersionChanged: '0.52'
2482
+ AllowedChars:
2483
+ - "-�"
2484
+
2485
+ # Supports --auto-correct
2486
+ Style/Attr:
2487
+ Description: Checks for uses of Module#attr.
2488
+ StyleGuide: "#attr"
2489
+ Enabled: false
2490
+ VersionAdded: '0.9'
2491
+ VersionChanged: '0.12'
2492
+
2493
+ Style/AutoResourceCleanup:
2494
+ Description: Suggests the usage of an auto resource cleanup version of a method (if
2495
+ available).
2496
+ Enabled: false
2497
+ VersionAdded: '0.30'
2498
+
2499
+ # Supports --auto-correct
2500
+ Style/BarePercentLiterals:
2501
+ Description: Checks if usage of %() or %Q() matches configuration.
2502
+ StyleGuide: "#percent-q-shorthand"
2503
+ Enabled: false
2504
+ VersionAdded: '0.25'
2505
+ EnforcedStyle: bare_percent
2506
+ SupportedStyles:
2507
+ - percent_q
2508
+ - bare_percent
2509
+
2510
+ Style/BeginBlock:
2511
+ Description: Avoid the use of BEGIN blocks.
2512
+ StyleGuide: "#no-BEGIN-blocks"
2513
+ Enabled: false
2514
+ VersionAdded: '0.9'
2515
+
2516
+ # Supports --auto-correct
2517
+ Style/BisectedAttrAccessor:
2518
+ Description: Checks for places where `attr_reader` and `attr_writer` for the same
2519
+ method can be combined into single `attr_accessor`.
2520
+ Enabled: false
2521
+ VersionAdded: '0.87'
2522
+
2523
+ # Supports --auto-correct
2524
+ Style/BlockComments:
2525
+ Description: Do not use block comments.
2526
+ StyleGuide: "#no-block-comments"
2527
+ Enabled: false
2528
+ VersionAdded: '0.9'
2529
+ VersionChanged: '0.23'
2530
+
2531
+ # Supports --auto-correct
2532
+ Style/BlockDelimiters:
2533
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
2534
+ ugly). Prefer {...} over do...end for single-line blocks.
2535
+ StyleGuide: "#single-line-blocks"
2536
+ Enabled: false
2537
+ VersionAdded: '0.30'
2538
+ VersionChanged: '0.35'
2539
+ EnforcedStyle: line_count_based
2540
+ SupportedStyles:
2541
+ - line_count_based
2542
+ - semantic
2543
+ - braces_for_chaining
2544
+ - always_braces
2545
+ ProceduralMethods:
2546
+ - benchmark
2547
+ - bm
2548
+ - bmbm
2549
+ - create
2550
+ - each_with_object
2551
+ - measure
2552
+ - new
2553
+ - realtime
2554
+ - tap
2555
+ - with_object
2556
+ FunctionalMethods:
2557
+ - let
2558
+ - let!
2559
+ - subject
2560
+ - watch
2561
+ IgnoredMethods:
2562
+ - lambda
2563
+ - proc
2564
+ - it
2565
+ AllowBracesOnProceduralOneLiners: false
2566
+ BracesRequiredMethods: []
2567
+
2568
+ # Supports --auto-correct
2569
+ Style/CaseEquality:
2570
+ Description: Avoid explicit use of the case equality operator(===).
2571
+ StyleGuide: "#no-case-equality"
2572
+ Enabled: false
2573
+ VersionAdded: '0.9'
2574
+ VersionChanged: '0.89'
2575
+ AllowOnConstant: false
2576
+
2577
+ # Supports --auto-correct
2578
+ Style/CaseLikeIf:
2579
+ Description: This cop identifies places where `if-elsif` constructions can be replaced
2580
+ with `case-when`.
2581
+ StyleGuide: "#case-vs-if-else"
2582
+ Enabled: false
2583
+ Safe: false
2584
+ VersionAdded: '0.88'
2585
+
2586
+ # Supports --auto-correct
2587
+ Style/CharacterLiteral:
2588
+ Description: Checks for uses of character literals.
2589
+ StyleGuide: "#no-character-literals"
2590
+ Enabled: false
2591
+ VersionAdded: '0.9'
2592
+
2593
+ # Supports --auto-correct
2594
+ Style/ClassAndModuleChildren:
2595
+ Description: Checks style of children classes and modules.
2596
+ StyleGuide: "#namespace-definition"
2597
+ SafeAutoCorrect: false
2598
+ Enabled: false
2599
+ VersionAdded: '0.19'
2600
+ EnforcedStyle: nested
2601
+ SupportedStyles:
2602
+ - nested
2603
+ - compact
2604
+
2605
+ # Supports --auto-correct
2606
+ Style/ClassCheck:
2607
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
2608
+ StyleGuide: "#is-a-vs-kind-of"
2609
+ Enabled: false
2610
+ VersionAdded: '0.24'
2611
+ EnforcedStyle: is_a?
2612
+ SupportedStyles:
2613
+ - is_a?
2614
+ - kind_of?
2615
+
2616
+ # Supports --auto-correct
2617
+ Style/ClassEqualityComparison:
2618
+ Description: Enforces the use of `Object#instance_of?` instead of class comparison
2619
+ for equality.
2620
+ StyleGuide: "#instance-of-vs-class-comparison"
2621
+ Enabled: false
2622
+ VersionAdded: '0.93'
2623
+ IgnoredMethods:
2624
+ - "=="
2625
+ - equal?
2626
+ - eql?
2627
+
2628
+ # Supports --auto-correct
2629
+ Style/ClassMethods:
2630
+ Description: Use self when defining module/class methods.
2631
+ StyleGuide: "#def-self-class-methods"
2632
+ Enabled: false
2633
+ VersionAdded: '0.9'
2634
+ VersionChanged: '0.20'
2635
+
2636
+ # Supports --auto-correct
2637
+ Style/ClassMethodsDefinitions:
2638
+ Description: Enforces using `def self.method_name` or `class << self` to define class
2639
+ methods.
2640
+ StyleGuide: "#def-self-class-methods"
2641
+ Enabled: false
2642
+ VersionAdded: '0.89'
2643
+ EnforcedStyle: def_self
2644
+ SupportedStyles:
2645
+ - def_self
2646
+ - self_class
2647
+
2648
+ Style/ClassVars:
2649
+ Description: Avoid the use of class variables.
2650
+ StyleGuide: "#no-class-vars"
2651
+ Enabled: false
2652
+ VersionAdded: '0.13'
2653
+
2654
+ # Supports --auto-correct
2655
+ Style/CollectionCompact:
2656
+ Description: Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject
2657
+ nils.
2658
+ Enabled: false
2659
+ Safe: false
2660
+ VersionAdded: '1.2'
2661
+ VersionChanged: '1.3'
2662
+
2663
+ # Supports --auto-correct
2664
+ Style/CollectionMethods:
2665
+ Description: Preferred collection methods.
2666
+ StyleGuide: "#map-find-select-reduce-include-size"
2667
+ Enabled: false
2668
+ VersionAdded: '0.9'
2669
+ VersionChanged: '1.7'
2670
+ Safe: false
2671
+ PreferredMethods:
2672
+ collect: map
2673
+ collect!: map!
2674
+ inject: reduce
2675
+ detect: find
2676
+ find_all: select
2677
+ member?: include?
2678
+ MethodsAcceptingSymbol:
2679
+ - inject
2680
+ - reduce
2681
+
2682
+ # Supports --auto-correct
2683
+ Style/ColonMethodCall:
2684
+ Description: 'Do not use :: for method call.'
2685
+ StyleGuide: "#double-colons"
2686
+ Enabled: false
2687
+ VersionAdded: '0.9'
2688
+
2689
+ # Supports --auto-correct
2690
+ Style/ColonMethodDefinition:
2691
+ Description: 'Do not use :: for defining class methods.'
2692
+ StyleGuide: "#colon-method-definition"
2693
+ Enabled: false
2694
+ VersionAdded: '0.52'
2695
+
2696
+ Style/CombinableLoops:
2697
+ Description: Checks for places where multiple consecutive loops over the same data
2698
+ can be combined into a single loop.
2699
+ Enabled: false
2700
+ Safe: false
2701
+ VersionAdded: '0.90'
2702
+
2703
+ # Supports --auto-correct
2704
+ Style/CommandLiteral:
2705
+ Description: Use `` or %x around command literals.
2706
+ StyleGuide: "#percent-x"
2707
+ Enabled: false
2708
+ VersionAdded: '0.30'
2709
+ EnforcedStyle: backticks
2710
+ SupportedStyles:
2711
+ - backticks
2712
+ - percent_x
2713
+ - mixed
2714
+ AllowInnerBackticks: false
2715
+
2716
+ # Supports --auto-correct
2717
+ Style/CommentAnnotation:
2718
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW,
2719
+ NOTE).
2720
+ StyleGuide: "#annotate-keywords"
2721
+ Enabled: false
2722
+ VersionAdded: '0.10'
2723
+ VersionChanged: '1.3'
2724
+ Keywords:
2725
+ - TODO
2726
+ - FIXME
2727
+ - OPTIMIZE
2728
+ - HACK
2729
+ - REVIEW
2730
+ - NOTE
2731
+ RequireColon: true
2732
+
2733
+ # Supports --auto-correct
2734
+ Style/CommentedKeyword:
2735
+ Description: Do not place comments on the same line as certain keywords.
2736
+ Enabled: false
2737
+ SafeAutoCorrect: false
2738
+ VersionAdded: '0.51'
2739
+ VersionChanged: '1.7'
2740
+
2741
+ # Supports --auto-correct
2742
+ Style/ConditionalAssignment:
2743
+ Description: Use the return value of `if` and `case` statements for assignment to
2744
+ a variable and variable comparison instead of assigning that variable inside of
2745
+ each branch.
2746
+ Enabled: false
2747
+ VersionAdded: '0.36'
2748
+ VersionChanged: '0.47'
2749
+ EnforcedStyle: assign_to_condition
2750
+ SupportedStyles:
2751
+ - assign_to_condition
2752
+ - assign_inside_condition
2753
+ SingleLineConditionsOnly: true
2754
+ IncludeTernaryExpressions: true
2755
+
2756
+ Style/ConstantVisibility:
2757
+ Description: Check that class- and module constants have visibility declarations.
2758
+ Enabled: false
2759
+ VersionAdded: '0.66'
2760
+ VersionChanged: '1.10'
2761
+ IgnoreModules: false
2762
+
2763
+ # Supports --auto-correct
2764
+ Style/Copyright:
2765
+ Description: Include a copyright notice in each file before any code.
2766
+ Enabled: false
2767
+ VersionAdded: '0.30'
2768
+ Notice: "^Copyright (\\(c\\) )?2[0-9]{3} .+"
2769
+ AutocorrectNotice: ''
2770
+
2771
+ # Supports --auto-correct
2772
+ Style/DateTime:
2773
+ Description: Use Time over DateTime.
2774
+ StyleGuide: "#date--time"
2775
+ Enabled: false
2776
+ VersionAdded: '0.51'
2777
+ VersionChanged: '0.92'
2778
+ SafeAutoCorrect: false
2779
+ AllowCoercion: false
2780
+
2781
+ # Supports --auto-correct
2782
+ Style/DefWithParentheses:
2783
+ Description: Use def with parentheses when there are arguments.
2784
+ StyleGuide: "#method-parens"
2785
+ Enabled: false
2786
+ VersionAdded: '0.9'
2787
+ VersionChanged: '0.12'
2788
+
2789
+ # Supports --auto-correct
2790
+ Style/Dir:
2791
+ Description: Use the `__dir__` method to retrieve the canonicalized absolute path
2792
+ to the current file.
2793
+ Enabled: false
2794
+ VersionAdded: '0.50'
2795
+
2796
+ # Supports --auto-correct
2797
+ Style/DisableCopsWithinSourceCodeDirective:
2798
+ Description: Forbids disabling/enabling cops within source code.
2799
+ Enabled: false
2800
+ VersionAdded: '0.82'
2801
+ VersionChanged: '1.9'
2802
+ AllowedCops: []
2803
+
2804
+ Style/DocumentDynamicEvalDefinition:
2805
+ Description: When using `class_eval` (or other `eval`) with string interpolation,
2806
+ add a comment block showing its appearance if interpolated.
2807
+ StyleGuide: "#eval-comment-docs"
2808
+ Enabled: false
2809
+ VersionAdded: '1.1'
2810
+ VersionChanged: '1.3'
2811
+
2812
+ Style/Documentation:
2813
+ Description: Document classes and non-namespace modules.
2814
+ Enabled: false
2815
+ VersionAdded: '0.9'
2816
+ AllowedConstants: []
2817
+ Exclude: []
2818
+
2819
+ Style/DocumentationMethod:
2820
+ Description: Checks for missing documentation comment for public methods.
2821
+ Enabled: false
2822
+ VersionAdded: '0.43'
2823
+ Exclude: []
2824
+ RequireForNonPublicMethods: false
2825
+
2826
+ # Supports --auto-correct
2827
+ Style/DoubleCopDisableDirective:
2828
+ Description: Checks for double rubocop:disable comments on a single line.
2829
+ Enabled: false
2830
+ VersionAdded: '0.73'
2831
+
2832
+ # Supports --auto-correct
2833
+ Style/DoubleNegation:
2834
+ Description: Checks for uses of double negation (!!).
2835
+ StyleGuide: "#no-bang-bang"
2836
+ Enabled: false
2837
+ VersionAdded: '0.19'
2838
+ VersionChanged: '1.2'
2839
+ EnforcedStyle: allowed_in_returns
2840
+ SafeAutoCorrect: false
2841
+ SupportedStyles:
2842
+ - allowed_in_returns
2843
+ - forbidden
2844
+
2845
+ # Supports --auto-correct
2846
+ Style/EachForSimpleLoop:
2847
+ Description: Use `Integer#times` for a simple loop which iterates a fixed number of
2848
+ times.
2849
+ Enabled: false
2850
+ VersionAdded: '0.41'
2851
+
2852
+ # Supports --auto-correct
2853
+ Style/EachWithObject:
2854
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
2855
+ Enabled: false
2856
+ VersionAdded: '0.22'
2857
+ VersionChanged: '0.42'
2858
+
2859
+ # Supports --auto-correct
2860
+ Style/EmptyBlockParameter:
2861
+ Description: Omit pipes for empty block parameters.
2862
+ Enabled: false
2863
+ VersionAdded: '0.52'
2864
+
2865
+ # Supports --auto-correct
2866
+ Style/EmptyCaseCondition:
2867
+ Description: Avoid empty condition in case statements.
2868
+ Enabled: false
2869
+ VersionAdded: '0.40'
2870
+
2871
+ # Supports --auto-correct
2872
+ Style/EmptyElse:
2873
+ Description: Avoid empty else-clauses.
2874
+ Enabled: false
2875
+ VersionAdded: '0.28'
2876
+ VersionChanged: '0.32'
2877
+ EnforcedStyle: both
2878
+ SupportedStyles:
2879
+ - empty
2880
+ - nil
2881
+ - both
2882
+
2883
+ # Supports --auto-correct
2884
+ Style/EmptyLambdaParameter:
2885
+ Description: Omit parens for empty lambda parameters.
2886
+ Enabled: false
2887
+ VersionAdded: '0.52'
2888
+
2889
+ # Supports --auto-correct
2890
+ Style/EmptyLiteral:
2891
+ Description: Prefer literals to Array.new/Hash.new/String.new.
2892
+ StyleGuide: "#literal-array-hash"
2893
+ Enabled: true
2894
+ VersionAdded: '0.9'
2895
+ VersionChanged: '0.12'
2896
+
2897
+ # Supports --auto-correct
2898
+ Style/EmptyMethod:
2899
+ Description: Checks the formatting of empty method definitions.
2900
+ StyleGuide: "#no-single-line-methods"
2901
+ Enabled: false
2902
+ VersionAdded: '0.46'
2903
+ EnforcedStyle: compact
2904
+ SupportedStyles:
2905
+ - compact
2906
+ - expanded
2907
+
2908
+ # Supports --auto-correct
2909
+ Style/Encoding:
2910
+ Description: Use UTF-8 as the source file encoding.
2911
+ StyleGuide: "#utf-8"
2912
+ Enabled: true
2913
+ VersionAdded: '0.9'
2914
+ VersionChanged: '0.50'
2915
+
2916
+ # Supports --auto-correct
2917
+ Style/EndBlock:
2918
+ Description: Avoid the use of END blocks.
2919
+ StyleGuide: "#no-END-blocks"
2920
+ Enabled: false
2921
+ VersionAdded: '0.9'
2922
+ VersionChanged: '0.81'
2923
+
2924
+ # Supports --auto-correct
2925
+ Style/EndlessMethod:
2926
+ Description: Avoid the use of multi-lined endless method definitions.
2927
+ StyleGuide: "#endless-methods"
2928
+ Enabled: false
2929
+ VersionAdded: '1.8'
2930
+ EnforcedStyle: allow_single_line
2931
+ SupportedStyles:
2932
+ - allow_single_line
2933
+ - allow_always
2934
+ - disallow
2935
+
2936
+ # Supports --auto-correct
2937
+ Style/EvalWithLocation:
2938
+ Description: Pass `__FILE__` and `__LINE__` to `eval` method, as they are used by
2939
+ backtraces.
2940
+ Enabled: false
2941
+ VersionAdded: '0.52'
2942
+
2943
+ # Supports --auto-correct
2944
+ Style/EvenOdd:
2945
+ Description: Favor the use of `Integer#even?` && `Integer#odd?`.
2946
+ StyleGuide: "#predicate-methods"
2947
+ Enabled: false
2948
+ VersionAdded: '0.12'
2949
+ VersionChanged: '0.29'
2950
+
2951
+ # Supports --auto-correct
2952
+ Style/ExpandPathArguments:
2953
+ Description: Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`.
2954
+ Enabled: false
2955
+ VersionAdded: '0.53'
2956
+
2957
+ # Supports --auto-correct
2958
+ Style/ExplicitBlockArgument:
2959
+ Description: Consider using explicit block argument to avoid writing block literal
2960
+ that just passes its arguments to another block.
2961
+ StyleGuide: "#block-argument"
2962
+ Enabled: false
2963
+ VersionAdded: '0.89'
2964
+ VersionChanged: '1.8'
2965
+
2966
+ Style/ExponentialNotation:
2967
+ Description: When using exponential notation, favor a mantissa between 1 (inclusive)
2968
+ and 10 (exclusive).
2969
+ StyleGuide: "#exponential-notation"
2970
+ Enabled: false
2971
+ VersionAdded: '0.82'
2972
+ EnforcedStyle: scientific
2973
+ SupportedStyles:
2974
+ - scientific
2975
+ - engineering
2976
+ - integral
2977
+
2978
+ # Supports --auto-correct
2979
+ Style/FloatDivision:
2980
+ Description: For performing float division, coerce one side only.
2981
+ StyleGuide: "#float-division"
2982
+ Reference: https://blog.rubystyle.guide/ruby/2019/06/21/float-division.html
2983
+ Enabled: false
2984
+ VersionAdded: '0.72'
2985
+ VersionChanged: '1.9'
2986
+ Safe: false
2987
+ EnforcedStyle: single_coerce
2988
+ SupportedStyles:
2989
+ - left_coerce
2990
+ - right_coerce
2991
+ - single_coerce
2992
+ - fdiv
2993
+
2994
+ # Supports --auto-correct
2995
+ Style/For:
2996
+ Description: Checks use of for or each in multiline loops.
2997
+ StyleGuide: "#no-for-loops"
2998
+ Enabled: false
2999
+ VersionAdded: '0.13'
3000
+ VersionChanged: '0.59'
3001
+ EnforcedStyle: each
3002
+ SupportedStyles:
3003
+ - each
3004
+ - for
3005
+
3006
+ # Supports --auto-correct
3007
+ Style/FormatString:
3008
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
3009
+ StyleGuide: "#sprintf"
3010
+ Enabled: false
3011
+ VersionAdded: '0.19'
3012
+ VersionChanged: '0.49'
3013
+ EnforcedStyle: format
3014
+ SupportedStyles:
3015
+ - format
3016
+ - sprintf
3017
+ - percent
3018
+
3019
+ Style/FormatStringToken:
3020
+ Description: Use a consistent style for format string tokens.
3021
+ Enabled: false
3022
+ EnforcedStyle: annotated
3023
+ SupportedStyles:
3024
+ - annotated
3025
+ - template
3026
+ - unannotated
3027
+ MaxUnannotatedPlaceholdersAllowed: 1
3028
+ VersionAdded: '0.49'
3029
+ VersionChanged: '1.0'
3030
+ IgnoredMethods: []
3031
+
3032
+ # Supports --auto-correct
3033
+ Style/FrozenStringLiteralComment:
3034
+ Description: Add the frozen_string_literal comment to the top of files to help transition
3035
+ to frozen string literals by default.
3036
+ Enabled: false
3037
+ VersionAdded: '0.36'
3038
+ VersionChanged: '0.79'
3039
+ EnforcedStyle: always
3040
+ SupportedStyles:
3041
+ - always
3042
+ - always_true
3043
+ - never
3044
+ SafeAutoCorrect: false
3045
+
3046
+ # Supports --auto-correct
3047
+ Style/GlobalStdStream:
3048
+ Description: Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.
3049
+ StyleGuide: "#global-stdout"
3050
+ Enabled: false
3051
+ VersionAdded: '0.89'
3052
+ SafeAutoCorrect: false
3053
+
3054
+ Style/GlobalVars:
3055
+ Description: Do not introduce global variables.
3056
+ StyleGuide: "#instance-vars"
3057
+ Reference: https://www.zenspider.com/ruby/quickref.html
3058
+ Enabled: false
3059
+ VersionAdded: '0.13'
3060
+ AllowedVariables: []
3061
+
3062
+ Style/GuardClause:
3063
+ Description: Check for conditionals that can be replaced with guard clauses.
3064
+ StyleGuide: "#no-nested-conditionals"
3065
+ Enabled: false
3066
+ VersionAdded: '0.20'
3067
+ VersionChanged: '0.22'
3068
+ MinBodyLength: 1
3069
+
3070
+ # Supports --auto-correct
3071
+ Style/HashAsLastArrayItem:
3072
+ Description: Checks for presence or absence of braces around hash literal as a last
3073
+ array item depending on configuration.
3074
+ StyleGuide: "#hash-literal-as-last-array-item"
3075
+ Enabled: false
3076
+ VersionAdded: '0.88'
3077
+ EnforcedStyle: braces
3078
+ SupportedStyles:
3079
+ - braces
3080
+ - no_braces
3081
+
3082
+ # Supports --auto-correct
3083
+ Style/HashConversion:
3084
+ Description: Avoid Hash[] in favor of ary.to_h or literal hashes.
3085
+ StyleGuide: "#avoid-hash-constructor"
3086
+ Enabled: false
3087
+ VersionAdded: '1.10'
3088
+ VersionChanged: '1.11'
3089
+ AllowSplatArgument: true
3090
+
3091
+ # Supports --auto-correct
3092
+ Style/HashEachMethods:
3093
+ Description: Use Hash#each_key and Hash#each_value.
3094
+ StyleGuide: "#hash-each"
3095
+ Enabled: false
3096
+ Safe: false
3097
+ VersionAdded: '0.80'
3098
+ VersionChanged: '1.16'
3099
+ AllowedReceivers: []
3100
+
3101
+ # Supports --auto-correct
3102
+ Style/HashExcept:
3103
+ Description: Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter`
3104
+ methods that can be replaced with `Hash#except` method.
3105
+ Enabled: false
3106
+ VersionAdded: '1.7'
3107
+
3108
+ Style/HashLikeCase:
3109
+ Description: Checks for places where `case-when` represents a simple 1:1 mapping and
3110
+ can be replaced with a hash lookup.
3111
+ Enabled: false
3112
+ VersionAdded: '0.88'
3113
+ MinBranchesCount: 3
3114
+
3115
+ # Supports --auto-correct
3116
+ Style/HashSyntax:
3117
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1,
3118
+ :b => 2 }.'
3119
+ StyleGuide: "#hash-literals"
3120
+ Enabled: false
3121
+ VersionAdded: '0.9'
3122
+ VersionChanged: '0.43'
3123
+ EnforcedStyle: ruby19
3124
+ SupportedStyles:
3125
+ - ruby19
3126
+ - hash_rockets
3127
+ - no_mixed_keys
3128
+ - ruby19_no_mixed_keys
3129
+ UseHashRocketsWithSymbolValues: false
3130
+ PreferHashRocketsForNonAlnumEndingSymbols: false
3131
+
3132
+ # Supports --auto-correct
3133
+ Style/HashTransformKeys:
3134
+ Description: Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.
3135
+ Enabled: false
3136
+ VersionAdded: '0.80'
3137
+ VersionChanged: '0.90'
3138
+ Safe: false
3139
+
3140
+ # Supports --auto-correct
3141
+ Style/HashTransformValues:
3142
+ Description: Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.
3143
+ Enabled: false
3144
+ VersionAdded: '0.80'
3145
+ VersionChanged: '0.90'
3146
+ Safe: false
3147
+
3148
+ # Supports --auto-correct
3149
+ Style/IdenticalConditionalBranches:
3150
+ Description: Checks that conditional statements do not have an identical line at the
3151
+ end of each branch, which can validly be moved out of the conditional.
3152
+ Enabled: false
3153
+ SafeAutoCorrect: false
3154
+ VersionAdded: '0.36'
3155
+ VersionChanged: '1.19'
3156
+
3157
+ # Supports --auto-correct
3158
+ Style/IfInsideElse:
3159
+ Description: Finds if nodes inside else, which can be converted to elsif.
3160
+ Enabled: false
3161
+ AllowIfModifier: false
3162
+ VersionAdded: '0.36'
3163
+ VersionChanged: '1.3'
3164
+
3165
+ # Supports --auto-correct
3166
+ Style/IfUnlessModifier:
3167
+ Description: Favor modifier if/unless usage when you have a single-line body.
3168
+ StyleGuide: "#if-as-a-modifier"
3169
+ Enabled: false
3170
+ VersionAdded: '0.9'
3171
+ VersionChanged: '0.30'
3172
+
3173
+ # Supports --auto-correct
3174
+ Style/IfUnlessModifierOfIfUnless:
3175
+ Description: Avoid modifier if/unless usage on conditionals.
3176
+ Enabled: false
3177
+ VersionAdded: '0.39'
3178
+ VersionChanged: '0.87'
3179
+
3180
+ # Supports --auto-correct
3181
+ Style/IfWithBooleanLiteralBranches:
3182
+ Description: Checks for redundant `if` with boolean literal branches.
3183
+ Enabled: false
3184
+ VersionAdded: '1.9'
3185
+ SafeAutoCorrect: false
3186
+ AllowedMethods:
3187
+ - nonzero?
3188
+
3189
+ # Supports --auto-correct
3190
+ Style/IfWithSemicolon:
3191
+ Description: Do not use if x; .... Use the ternary operator instead.
3192
+ StyleGuide: "#no-semicolon-ifs"
3193
+ Enabled: false
3194
+ VersionAdded: '0.9'
3195
+ VersionChanged: '0.83'
3196
+
3197
+ Style/ImplicitRuntimeError:
3198
+ Description: Use `raise` or `fail` with an explicit exception class and message, rather
3199
+ than just a message.
3200
+ Enabled: false
3201
+ VersionAdded: '0.41'
3202
+
3203
+ # Supports --auto-correct
3204
+ Style/InPatternThen:
3205
+ Description: Checks for `in;` uses in `case` expressions.
3206
+ StyleGuide: "#no-in-pattern-semicolons"
3207
+ Enabled: false
3208
+ VersionAdded: '1.16'
3209
+
3210
+ # Supports --auto-correct
3211
+ Style/InfiniteLoop:
3212
+ Description: Use Kernel#loop for infinite loops. This cop is unsafe in the body may
3213
+ raise a `StopIteration` exception.
3214
+ Safe: false
3215
+ StyleGuide: "#infinite-loop"
3216
+ Enabled: false
3217
+ VersionAdded: '0.26'
3218
+ VersionChanged: '0.61'
3219
+
3220
+ Style/InlineComment:
3221
+ Description: Avoid trailing inline comments.
3222
+ Enabled: false
3223
+ VersionAdded: '0.23'
3224
+
3225
+ # Supports --auto-correct
3226
+ Style/InverseMethods:
3227
+ Description: Use the inverse method instead of `!.method` if an inverse method is
3228
+ defined.
3229
+ Enabled: false
3230
+ Safe: false
3231
+ VersionAdded: '0.48'
3232
+ InverseMethods:
3233
+ :any?: :none?
3234
+ :even?: :odd?
3235
+ :==: :!=
3236
+ :=~: :!~
3237
+ :<: :>=
3238
+ :>: :<=
3239
+ InverseBlocks:
3240
+ :select: :reject
3241
+ :select!: :reject!
3242
+
3243
+ Style/IpAddresses:
3244
+ Description: Don't include literal IP addresses in code.
3245
+ Enabled: false
3246
+ VersionAdded: '0.58'
3247
+ VersionChanged: '0.91'
3248
+ AllowedAddresses:
3249
+ - "::"
3250
+ Exclude: []
3251
+
3252
+ # Supports --auto-correct
3253
+ Style/KeywordParametersOrder:
3254
+ Description: Enforces that optional keyword parameters are placed at the end of the
3255
+ parameters list.
3256
+ StyleGuide: "#keyword-parameters-order"
3257
+ Enabled: false
3258
+ VersionAdded: '0.90'
3259
+ VersionChanged: '1.7'
3260
+
3261
+ # Supports --auto-correct
3262
+ Style/Lambda:
3263
+ Description: Use the new lambda literal syntax for single-line blocks.
3264
+ StyleGuide: "#lambda-multi-line"
3265
+ Enabled: false
3266
+ VersionAdded: '0.9'
3267
+ VersionChanged: '0.40'
3268
+ EnforcedStyle: line_count_dependent
3269
+ SupportedStyles:
3270
+ - line_count_dependent
3271
+ - lambda
3272
+ - literal
3273
+
3274
+ # Supports --auto-correct
3275
+ Style/LambdaCall:
3276
+ Description: Use lambda.call(...) instead of lambda.(...).
3277
+ StyleGuide: "#proc-call"
3278
+ Enabled: false
3279
+ VersionAdded: '0.13'
3280
+ VersionChanged: '0.14'
3281
+ EnforcedStyle: call
3282
+ SupportedStyles:
3283
+ - call
3284
+ - braces
3285
+
3286
+ # Supports --auto-correct
3287
+ Style/LineEndConcatenation:
3288
+ Description: Use \ instead of + or << to concatenate two string literals at line end.
3289
+ Enabled: false
3290
+ SafeAutoCorrect: false
3291
+ VersionAdded: '0.18'
3292
+ VersionChanged: '0.64'
3293
+
3294
+ # Supports --auto-correct
3295
+ Style/MethodCallWithArgsParentheses:
3296
+ Description: Use parentheses for method calls with arguments.
3297
+ StyleGuide: "#method-invocation-parens"
3298
+ Enabled: false
3299
+ VersionAdded: '0.47'
3300
+ VersionChanged: '1.7'
3301
+ IgnoreMacros: true
3302
+ IgnoredMethods: []
3303
+ AllowedPatterns: []
3304
+ IncludedMacros: []
3305
+ AllowParenthesesInMultilineCall: false
3306
+ AllowParenthesesInChaining: false
3307
+ AllowParenthesesInCamelCaseMethod: false
3308
+ AllowParenthesesInStringInterpolation: false
3309
+ EnforcedStyle: require_parentheses
3310
+ SupportedStyles:
3311
+ - require_parentheses
3312
+ - omit_parentheses
3313
+
3314
+ # Supports --auto-correct
3315
+ Style/MethodCallWithoutArgsParentheses:
3316
+ Description: Do not use parentheses for method calls with no arguments.
3317
+ StyleGuide: "#method-invocation-parens"
3318
+ Enabled: false
3319
+ IgnoredMethods: []
3320
+ VersionAdded: '0.47'
3321
+ VersionChanged: '0.55'
3322
+
3323
+ Style/MethodCalledOnDoEndBlock:
3324
+ Description: Avoid chaining a method call on a do...end block.
3325
+ StyleGuide: "#single-line-blocks"
3326
+ Enabled: false
3327
+ VersionAdded: '0.14'
3328
+
3329
+ # Supports --auto-correct
3330
+ Style/MethodDefParentheses:
3331
+ Description: Checks if the method definitions have or don't have parentheses.
3332
+ StyleGuide: "#method-parens"
3333
+ Enabled: false
3334
+ VersionAdded: '0.16'
3335
+ VersionChanged: '1.7'
3336
+ EnforcedStyle: require_parentheses
3337
+ SupportedStyles:
3338
+ - require_parentheses
3339
+ - require_no_parentheses
3340
+ - require_no_parentheses_except_multiline
3341
+
3342
+ # Supports --auto-correct
3343
+ Style/MinMax:
3344
+ Description: Use `Enumerable#minmax` instead of `Enumerable#min` and `Enumerable#max`
3345
+ in conjunction.
3346
+ Enabled: false
3347
+ VersionAdded: '0.50'
3348
+
3349
+ Style/MissingElse:
3350
+ Description: Require if/case expressions to have an else branches. If enabled, it
3351
+ is recommended that Style/UnlessElse and Style/EmptyElse be enabled. This will conflict
3352
+ with Style/EmptyElse if Style/EmptyElse is configured to style "both".
3353
+ Enabled: false
3354
+ VersionAdded: '0.30'
3355
+ VersionChanged: '0.38'
3356
+ EnforcedStyle: both
3357
+ SupportedStyles:
3358
+ - if
3359
+ - case
3360
+ - both
3361
+
3362
+ Style/MissingRespondToMissing:
3363
+ Description: Checks if `method_missing` is implemented without implementing `respond_to_missing`.
3364
+ StyleGuide: "#no-method-missing"
3365
+ Enabled: false
3366
+ VersionAdded: '0.56'
3367
+
3368
+ # Supports --auto-correct
3369
+ Style/MixinGrouping:
3370
+ Description: Checks for grouping of mixins in `class` and `module` bodies.
3371
+ StyleGuide: "#mixin-grouping"
3372
+ Enabled: false
3373
+ VersionAdded: '0.48'
3374
+ VersionChanged: '0.49'
3375
+ EnforcedStyle: separated
3376
+ SupportedStyles:
3377
+ - separated
3378
+ - grouped
3379
+
3380
+ Style/MixinUsage:
3381
+ Description: Checks that `include`, `extend` and `prepend` exists at the top level.
3382
+ Enabled: false
3383
+ VersionAdded: '0.51'
3384
+
3385
+ # Supports --auto-correct
3386
+ Style/ModuleFunction:
3387
+ Description: Checks for usage of `extend self` in modules.
3388
+ StyleGuide: "#module-function"
3389
+ Enabled: false
3390
+ VersionAdded: '0.11'
3391
+ VersionChanged: '0.65'
3392
+ EnforcedStyle: module_function
3393
+ SupportedStyles:
3394
+ - module_function
3395
+ - extend_self
3396
+ - forbidden
3397
+ Autocorrect: false
3398
+ SafeAutoCorrect: false
3399
+
3400
+ Style/MultilineBlockChain:
3401
+ Description: Avoid multi-line chains of blocks.
3402
+ StyleGuide: "#single-line-blocks"
3403
+ Enabled: false
3404
+ VersionAdded: '0.13'
3405
+
3406
+ # Supports --auto-correct
3407
+ Style/MultilineIfModifier:
3408
+ Description: Only use if/unless modifiers on single line statements.
3409
+ StyleGuide: "#no-multiline-if-modifiers"
3410
+ Enabled: false
3411
+ VersionAdded: '0.45'
3412
+
3413
+ # Supports --auto-correct
3414
+ Style/MultilineIfThen:
3415
+ Description: Do not use then for multi-line if/unless.
3416
+ StyleGuide: "#no-then"
3417
+ Enabled: false
3418
+ VersionAdded: '0.9'
3419
+ VersionChanged: '0.26'
3420
+
3421
+ # Supports --auto-correct
3422
+ Style/MultilineInPatternThen:
3423
+ Description: Do not use `then` for multi-line `in` statement.
3424
+ StyleGuide: "#no-then"
3425
+ Enabled: false
3426
+ VersionAdded: '1.16'
3427
+
3428
+ # Supports --auto-correct
3429
+ Style/MultilineMemoization:
3430
+ Description: Wrap multiline memoizations in a `begin` and `end` block.
3431
+ Enabled: false
3432
+ VersionAdded: '0.44'
3433
+ VersionChanged: '0.48'
3434
+ EnforcedStyle: keyword
3435
+ SupportedStyles:
3436
+ - keyword
3437
+ - braces
3438
+
3439
+ # Supports --auto-correct
3440
+ Style/MultilineMethodSignature:
3441
+ Description: Avoid multi-line method signatures.
3442
+ Enabled: false
3443
+ VersionAdded: '0.59'
3444
+ VersionChanged: '1.7'
3445
+
3446
+ # Supports --auto-correct
3447
+ Style/MultilineTernaryOperator:
3448
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
3449
+ StyleGuide: "#no-multiline-ternary"
3450
+ Enabled: false
3451
+ VersionAdded: '0.9'
3452
+ VersionChanged: '0.86'
3453
+
3454
+ # Supports --auto-correct
3455
+ Style/MultilineWhenThen:
3456
+ Description: Do not use then for multi-line when statement.
3457
+ StyleGuide: "#no-then"
3458
+ Enabled: false
3459
+ VersionAdded: '0.73'
3460
+
3461
+ # Supports --auto-correct
3462
+ Style/MultipleComparison:
3463
+ Description: Avoid comparing a variable with multiple items in a conditional, use
3464
+ Array#include? instead.
3465
+ Enabled: false
3466
+ VersionAdded: '0.49'
3467
+ VersionChanged: '1.1'
3468
+ AllowMethodComparison: true
3469
+
3470
+ # Supports --auto-correct
3471
+ Style/MutableConstant:
3472
+ Description: Do not assign mutable objects to constants.
3473
+ Enabled: false
3474
+ VersionAdded: '0.34'
3475
+ VersionChanged: '1.8'
3476
+ SafeAutoCorrect: false
3477
+ EnforcedStyle: literals
3478
+ SupportedStyles:
3479
+ - literals
3480
+ - strict
3481
+
3482
+ # Supports --auto-correct
3483
+ Style/NegatedIf:
3484
+ Description: Favor unless over if for negative conditions (or control flow or).
3485
+ StyleGuide: "#unless-for-negatives"
3486
+ Enabled: true
3487
+ VersionAdded: '0.20'
3488
+ VersionChanged: '0.48'
3489
+ EnforcedStyle: both
3490
+ SupportedStyles:
3491
+ - both
3492
+ - prefix
3493
+ - postfix
3494
+
3495
+ # Supports --auto-correct
3496
+ Style/NegatedIfElseCondition:
3497
+ Description: This cop checks for uses of `if-else` and ternary operators with a negated
3498
+ condition which can be simplified by inverting condition and swapping branches.
3499
+ Enabled: false
3500
+ VersionAdded: '1.2'
3501
+
3502
+ # Supports --auto-correct
3503
+ Style/NegatedUnless:
3504
+ Description: Favor if over unless for negative conditions.
3505
+ StyleGuide: "#if-for-negatives"
3506
+ Enabled: false
3507
+ VersionAdded: '0.69'
3508
+ EnforcedStyle: both
3509
+ SupportedStyles:
3510
+ - both
3511
+ - prefix
3512
+ - postfix
3513
+
3514
+ # Supports --auto-correct
3515
+ Style/NegatedWhile:
3516
+ Description: Favor until over while for negative conditions.
3517
+ StyleGuide: "#until-for-negatives"
3518
+ Enabled: false
3519
+ VersionAdded: '0.20'
3520
+
3521
+ # Supports --auto-correct
3522
+ Style/NestedModifier:
3523
+ Description: Avoid using nested modifiers.
3524
+ StyleGuide: "#no-nested-modifiers"
3525
+ Enabled: false
3526
+ VersionAdded: '0.35'
3527
+
3528
+ # Supports --auto-correct
3529
+ Style/NestedParenthesizedCalls:
3530
+ Description: Parenthesize method calls which are nested inside the argument list of
3531
+ another parenthesized method call.
3532
+ Enabled: false
3533
+ VersionAdded: '0.36'
3534
+ VersionChanged: '0.77'
3535
+ AllowedMethods:
3536
+ - be
3537
+ - be_a
3538
+ - be_an
3539
+ - be_between
3540
+ - be_falsey
3541
+ - be_kind_of
3542
+ - be_instance_of
3543
+ - be_truthy
3544
+ - be_within
3545
+ - eq
3546
+ - eql
3547
+ - end_with
3548
+ - include
3549
+ - match
3550
+ - raise_error
3551
+ - respond_to
3552
+ - start_with
3553
+
3554
+ # Supports --auto-correct
3555
+ Style/NestedTernaryOperator:
3556
+ Description: Use one expression per branch in a ternary operator.
3557
+ StyleGuide: "#no-nested-ternary"
3558
+ Enabled: false
3559
+ VersionAdded: '0.9'
3560
+ VersionChanged: '0.86'
3561
+
3562
+ # Supports --auto-correct
3563
+ Style/Next:
3564
+ Description: Use `next` to skip iteration instead of a condition at the end.
3565
+ StyleGuide: "#no-nested-conditionals"
3566
+ Enabled: false
3567
+ VersionAdded: '0.22'
3568
+ VersionChanged: '0.35'
3569
+ EnforcedStyle: skip_modifier_ifs
3570
+ MinBodyLength: 3
3571
+ SupportedStyles:
3572
+ - skip_modifier_ifs
3573
+ - always
3574
+
3575
+ # Supports --auto-correct
3576
+ Style/NilComparison:
3577
+ Description: Prefer x.nil? to x == nil.
3578
+ StyleGuide: "#predicate-methods"
3579
+ Enabled: false
3580
+ VersionAdded: '0.12'
3581
+ VersionChanged: '0.59'
3582
+ EnforcedStyle: predicate
3583
+ SupportedStyles:
3584
+ - predicate
3585
+ - comparison
3586
+
3587
+ # Supports --auto-correct
3588
+ Style/NilLambda:
3589
+ Description: Prefer `-> {}` to `-> { nil }`.
3590
+ Enabled: false
3591
+ VersionAdded: '1.3'
3592
+ VersionChanged: '1.15'
3593
+
3594
+ # Supports --auto-correct
3595
+ Style/NonNilCheck:
3596
+ Description: Checks for redundant nil checks.
3597
+ StyleGuide: "#no-non-nil-checks"
3598
+ Enabled: false
3599
+ VersionAdded: '0.20'
3600
+ VersionChanged: '0.22'
3601
+ IncludeSemanticChanges: false
3602
+
3603
+ # Supports --auto-correct
3604
+ Style/Not:
3605
+ Description: Use ! instead of not.
3606
+ StyleGuide: "#bang-not-not"
3607
+ Enabled: false
3608
+ VersionAdded: '0.9'
3609
+ VersionChanged: '0.20'
3610
+
3611
+ Style/NumberedParameters:
3612
+ Description: Restrict the usage of numbered parameters.
3613
+ Enabled: true
3614
+ VersionAdded: '1.22'
3615
+ EnforcedStyle: allow_single_line
3616
+ SupportedStyles:
3617
+ - allow_single_line
3618
+ - disallow
3619
+
3620
+ Style/NumberedParametersLimit:
3621
+ Description: Avoid excessive numbered params in a single block.
3622
+ Enabled: true
3623
+ VersionAdded: '1.22'
3624
+ Max: 1
3625
+
3626
+ # Supports --auto-correct
3627
+ Style/NumericLiteralPrefix:
3628
+ Description: Use smallcase prefixes for numeric literals.
3629
+ StyleGuide: "#numeric-literal-prefixes"
3630
+ Enabled: false
3631
+ VersionAdded: '0.41'
3632
+ EnforcedOctalStyle: zero_with_o
3633
+ SupportedOctalStyles:
3634
+ - zero_with_o
3635
+ - zero_only
3636
+
3637
+ # Supports --auto-correct
3638
+ Style/NumericLiterals:
3639
+ Description: Add underscores to large numeric literals to improve their readability.
3640
+ StyleGuide: "#underscores-in-numerics"
3641
+ Enabled: false
3642
+ VersionAdded: '0.9'
3643
+ VersionChanged: '0.48'
3644
+ MinDigits: 5
3645
+ Strict: false
3646
+
3647
+ # Supports --auto-correct
3648
+ Style/NumericPredicate:
3649
+ Description: Checks for the use of predicate- or comparison methods for numeric comparisons.
3650
+ StyleGuide: "#predicate-methods"
3651
+ Safe: false
3652
+ SafeAutoCorrect: false
3653
+ Enabled: false
3654
+ VersionAdded: '0.42'
3655
+ VersionChanged: '0.59'
3656
+ EnforcedStyle: predicate
3657
+ SupportedStyles:
3658
+ - predicate
3659
+ - comparison
3660
+ IgnoredMethods: []
3661
+ Exclude: []
3662
+
3663
+ # Supports --auto-correct
3664
+ Style/OneLineConditional:
3665
+ Description: Favor the ternary operator (?:) or multi-line constructs over single-line
3666
+ if/then/else/end constructs.
3667
+ StyleGuide: "#ternary-operator"
3668
+ Enabled: false
3669
+ AlwaysCorrectToMultiline: false
3670
+ VersionAdded: '0.9'
3671
+ VersionChanged: '0.90'
3672
+
3673
+ Style/OpenStructUse:
3674
+ Description: Avoid using OpenStruct. As of Ruby 3.0, use is officially discouraged
3675
+ due to performance, version compatibility, and potential security issues.
3676
+ Reference:
3677
+ - https://docs.ruby-lang.org/en/3.0.0/OpenStruct.html#class-OpenStruct-label-Caveats
3678
+ Enabled: false
3679
+ VersionAdded: '1.23'
3680
+
3681
+ Style/OptionHash:
3682
+ Description: Don't use option hashes when you can use keyword arguments.
3683
+ Enabled: false
3684
+ VersionAdded: '0.33'
3685
+ VersionChanged: '0.34'
3686
+ SuspiciousParamNames:
3687
+ - options
3688
+ - opts
3689
+ - args
3690
+ - params
3691
+ - parameters
3692
+ Allowlist: []
3693
+
3694
+ Style/OptionalArguments:
3695
+ Description: Checks for optional arguments that do not appear at the end of the argument
3696
+ list.
3697
+ StyleGuide: "#optional-arguments"
3698
+ Enabled: false
3699
+ Safe: false
3700
+ VersionAdded: '0.33'
3701
+ VersionChanged: '0.83'
3702
+
3703
+ Style/OptionalBooleanParameter:
3704
+ Description: Use keyword arguments when defining method with boolean argument.
3705
+ StyleGuide: "#boolean-keyword-arguments"
3706
+ Enabled: false
3707
+ Safe: false
3708
+ VersionAdded: '0.89'
3709
+ AllowedMethods:
3710
+ - respond_to_missing?
3711
+
3712
+ # Supports --auto-correct
3713
+ Style/OrAssignment:
3714
+ Description: Recommend usage of double pipe equals (||=) where applicable.
3715
+ StyleGuide: "#double-pipe-for-uninit"
3716
+ Enabled: false
3717
+ VersionAdded: '0.50'
3718
+
3719
+ # Supports --auto-correct
3720
+ Style/ParallelAssignment:
3721
+ Description: Check for simple usages of parallel assignment. It will only warn when
3722
+ the number of variables matches on both sides of the assignment.
3723
+ StyleGuide: "#parallel-assignment"
3724
+ Enabled: false
3725
+ VersionAdded: '0.32'
3726
+
3727
+ # Supports --auto-correct
3728
+ Style/ParenthesesAroundCondition:
3729
+ Description: Don't use parentheses around the condition of an if/unless/while.
3730
+ StyleGuide: "#no-parens-around-condition"
3731
+ Enabled: false
3732
+ VersionAdded: '0.9'
3733
+ VersionChanged: '0.56'
3734
+ AllowSafeAssignment: true
3735
+ AllowInMultilineConditions: false
3736
+
3737
+ # Supports --auto-correct
3738
+ Style/PercentLiteralDelimiters:
3739
+ Description: Use `%`-literal delimiters consistently.
3740
+ StyleGuide: "#percent-literal-braces"
3741
+ Enabled: false
3742
+ VersionAdded: '0.19'
3743
+ PreferredDelimiters:
3744
+ default: "()"
3745
+ "%i": "[]"
3746
+ "%I": "[]"
3747
+ "%r": "{}"
3748
+ "%w": "[]"
3749
+ "%W": "[]"
3750
+ VersionChanged: '0.48'
3751
+
3752
+ # Supports --auto-correct
3753
+ Style/PercentQLiterals:
3754
+ Description: Checks if uses of %Q/%q match the configured preference.
3755
+ Enabled: false
3756
+ VersionAdded: '0.25'
3757
+ EnforcedStyle: lower_case_q
3758
+ SupportedStyles:
3759
+ - lower_case_q
3760
+ - upper_case_q
3761
+
3762
+ # Supports --auto-correct
3763
+ Style/PerlBackrefs:
3764
+ Description: Avoid Perl-style regex back references.
3765
+ StyleGuide: "#no-perl-regexp-last-matchers"
3766
+ Enabled: false
3767
+ VersionAdded: '0.13'
3768
+
3769
+ # Supports --auto-correct
3770
+ Style/PreferredHashMethods:
3771
+ Description: Checks use of `has_key?` and `has_value?` Hash methods.
3772
+ StyleGuide: "#hash-key"
3773
+ Enabled: true
3774
+ Safe: false
3775
+ VersionAdded: '0.41'
3776
+ VersionChanged: '0.70'
3777
+ EnforcedStyle: short
3778
+ SupportedStyles:
3779
+ - short
3780
+ - verbose
3781
+
3782
+ # Supports --auto-correct
3783
+ Style/Proc:
3784
+ Description: Use proc instead of Proc.new.
3785
+ StyleGuide: "#proc"
3786
+ Enabled: true
3787
+ VersionAdded: '0.9'
3788
+ VersionChanged: '0.18'
3789
+
3790
+ # Supports --auto-correct
3791
+ Style/QuotedSymbols:
3792
+ Description: Use a consistent style for quoted symbols.
3793
+ Enabled: false
3794
+ VersionAdded: '1.16'
3795
+ EnforcedStyle: same_as_string_literals
3796
+ SupportedStyles:
3797
+ - same_as_string_literals
3798
+ - single_quotes
3799
+ - double_quotes
3800
+
3801
+ # Supports --auto-correct
3802
+ Style/RaiseArgs:
3803
+ Description: Checks the arguments passed to raise/fail.
3804
+ StyleGuide: "#exception-class-messages"
3805
+ Enabled: false
3806
+ VersionAdded: '0.14'
3807
+ VersionChanged: '1.2'
3808
+ EnforcedStyle: exploded
3809
+ SupportedStyles:
3810
+ - compact
3811
+ - exploded
3812
+ AllowedCompactTypes: []
3813
+
3814
+ # Supports --auto-correct
3815
+ Style/RandomWithOffset:
3816
+ Description: Prefer to use ranges when generating random numbers instead of integers
3817
+ with offsets.
3818
+ StyleGuide: "#random-numbers"
3819
+ Enabled: false
3820
+ VersionAdded: '0.52'
3821
+
3822
+ # Supports --auto-correct
3823
+ Style/RedundantArgument:
3824
+ Description: Check for a redundant argument passed to certain methods.
3825
+ Enabled: false
3826
+ Safe: false
3827
+ VersionAdded: '1.4'
3828
+ VersionChanged: '1.7'
3829
+ Methods:
3830
+ join: ''
3831
+ split: " "
3832
+ chomp: "\n"
3833
+ chomp!: "\n"
3834
+
3835
+ # Supports --auto-correct
3836
+ Style/RedundantAssignment:
3837
+ Description: Checks for redundant assignment before returning.
3838
+ Enabled: false
3839
+ VersionAdded: '0.87'
3840
+
3841
+ # Supports --auto-correct
3842
+ Style/RedundantBegin:
3843
+ Description: Don't use begin blocks when they are not needed.
3844
+ StyleGuide: "#begin-implicit"
3845
+ Enabled: false
3846
+ VersionAdded: '0.10'
3847
+ VersionChanged: '0.21'
3848
+
3849
+ # Supports --auto-correct
3850
+ Style/RedundantCapitalW:
3851
+ Description: Checks for %W when interpolation is not needed.
3852
+ Enabled: false
3853
+ VersionAdded: '0.76'
3854
+
3855
+ # Supports --auto-correct
3856
+ Style/RedundantCondition:
3857
+ Description: Checks for unnecessary conditional expressions.
3858
+ Enabled: false
3859
+ VersionAdded: '0.76'
3860
+
3861
+ # Supports --auto-correct
3862
+ Style/RedundantConditional:
3863
+ Description: Don't return true/false from a conditional.
3864
+ Enabled: false
3865
+ VersionAdded: '0.50'
3866
+
3867
+ # Supports --auto-correct
3868
+ Style/RedundantException:
3869
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
3870
+ StyleGuide: "#no-explicit-runtimeerror"
3871
+ Enabled: false
3872
+ VersionAdded: '0.14'
3873
+ VersionChanged: '0.29'
3874
+
3875
+ # Supports --auto-correct
3876
+ Style/RedundantFetchBlock:
3877
+ Description: Use `fetch(key, value)` instead of `fetch(key) { value }` when value
3878
+ has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or
3879
+ is a constant.
3880
+ Reference: https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code
3881
+ Enabled: false
3882
+ Safe: false
3883
+ SafeForConstants: false
3884
+ VersionAdded: '0.86'
3885
+
3886
+ # Supports --auto-correct
3887
+ Style/RedundantFileExtensionInRequire:
3888
+ Description: Checks for the presence of superfluous `.rb` extension in the filename
3889
+ provided to `require` and `require_relative`.
3890
+ StyleGuide: "#no-explicit-rb-to-require"
3891
+ Enabled: false
3892
+ VersionAdded: '0.88'
3893
+
3894
+ # Supports --auto-correct
3895
+ Style/RedundantFreeze:
3896
+ Description: Checks usages of Object#freeze on immutable objects.
3897
+ Enabled: false
3898
+ VersionAdded: '0.34'
3899
+ VersionChanged: '0.66'
3900
+
3901
+ # Supports --auto-correct
3902
+ Style/RedundantInterpolation:
3903
+ Description: Checks for strings that are just an interpolated expression.
3904
+ Enabled: false
3905
+ VersionAdded: '0.76'
3906
+
3907
+ # Supports --auto-correct
3908
+ Style/RedundantParentheses:
3909
+ Description: Checks for parentheses that seem not to serve any purpose.
3910
+ Enabled: false
3911
+ VersionAdded: '0.36'
3912
+
3913
+ # Supports --auto-correct
3914
+ Style/RedundantPercentQ:
3915
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
3916
+ StyleGuide: "#percent-q"
3917
+ Enabled: false
3918
+ VersionAdded: '0.76'
3919
+
3920
+ # Supports --auto-correct
3921
+ Style/RedundantRegexpCharacterClass:
3922
+ Description: Checks for unnecessary single-element Regexp character classes.
3923
+ Enabled: false
3924
+ VersionAdded: '0.85'
3925
+
3926
+ # Supports --auto-correct
3927
+ Style/RedundantRegexpEscape:
3928
+ Description: Checks for redundant escapes in Regexps.
3929
+ Enabled: false
3930
+ VersionAdded: '0.85'
3931
+
3932
+ # Supports --auto-correct
3933
+ Style/RedundantReturn:
3934
+ Description: Don't use return where it's not required.
3935
+ StyleGuide: "#no-explicit-return"
3936
+ Enabled: false
3937
+ VersionAdded: '0.10'
3938
+ VersionChanged: '0.14'
3939
+ AllowMultipleReturnValues: false
3940
+
3941
+ # Supports --auto-correct
3942
+ Style/RedundantSelf:
3943
+ Description: Don't use self where it's not needed.
3944
+ StyleGuide: "#no-self-unless-required"
3945
+ Enabled: false
3946
+ VersionAdded: '0.10'
3947
+ VersionChanged: '0.13'
3948
+
3949
+ # Supports --auto-correct
3950
+ Style/RedundantSelfAssignment:
3951
+ Description: Checks for places where redundant assignments are made for in place modification
3952
+ methods.
3953
+ Enabled: false
3954
+ Safe: false
3955
+ VersionAdded: '0.90'
3956
+
3957
+ # Supports --auto-correct
3958
+ Style/RedundantSelfAssignmentBranch:
3959
+ Description: Checks for places where conditional branch makes redundant self-assignment.
3960
+ Enabled: false
3961
+ VersionAdded: '1.19'
3962
+
3963
+ # Supports --auto-correct
3964
+ Style/RedundantSort:
3965
+ Description: Use `min` instead of `sort.first`, `max_by` instead of `sort_by...last`,
3966
+ etc.
3967
+ Enabled: false
3968
+ VersionAdded: '0.76'
3969
+ VersionChanged: '1.22'
3970
+ Safe: false
3971
+
3972
+ # Supports --auto-correct
3973
+ Style/RedundantSortBy:
3974
+ Description: Use `sort` instead of `sort_by { |x| x }`.
3975
+ Enabled: false
3976
+ VersionAdded: '0.36'
3977
+
3978
+ # Supports --auto-correct
3979
+ Style/RegexpLiteral:
3980
+ Description: Use / or %r around regular expressions.
3981
+ StyleGuide: "#percent-r"
3982
+ Enabled: false
3983
+ VersionAdded: '0.9'
3984
+ VersionChanged: '0.30'
3985
+ EnforcedStyle: slashes
3986
+ SupportedStyles:
3987
+ - slashes
3988
+ - percent_r
3989
+ - mixed
3990
+ AllowInnerSlashes: false
3991
+
3992
+ # Supports --auto-correct
3993
+ Style/RescueModifier:
3994
+ Description: Avoid using rescue in its modifier form.
3995
+ StyleGuide: "#no-rescue-modifiers"
3996
+ Enabled: false
3997
+ VersionAdded: '0.9'
3998
+ VersionChanged: '0.34'
3999
+
4000
+ # Supports --auto-correct
4001
+ Style/RescueStandardError:
4002
+ Description: Avoid rescuing without specifying an error class.
4003
+ Enabled: false
4004
+ VersionAdded: '0.52'
4005
+ EnforcedStyle: explicit
4006
+ SupportedStyles:
4007
+ - implicit
4008
+ - explicit
4009
+
4010
+ # Supports --auto-correct
4011
+ Style/ReturnNil:
4012
+ Description: Use return instead of return nil.
4013
+ Enabled: false
4014
+ EnforcedStyle: return
4015
+ SupportedStyles:
4016
+ - return
4017
+ - return_nil
4018
+ VersionAdded: '0.50'
4019
+
4020
+ # Supports --auto-correct
4021
+ Style/SafeNavigation:
4022
+ Description: This cop transforms usages of a method call safeguarded by a check for
4023
+ the existence of the object to safe navigation (`&.`). Auto-correction is unsafe
4024
+ as it assumes the object will be `nil` or truthy, but never `false`.
4025
+ Enabled: false
4026
+ VersionAdded: '0.43'
4027
+ VersionChanged: '0.77'
4028
+ ConvertCodeThatCanStartToReturnNil: false
4029
+ AllowedMethods:
4030
+ - present?
4031
+ - blank?
4032
+ - presence
4033
+ - try
4034
+ - try!
4035
+ SafeAutoCorrect: false
4036
+
4037
+ # Supports --auto-correct
4038
+ Style/Sample:
4039
+ Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Integer]`.
4040
+ Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
4041
+ Enabled: false
4042
+ VersionAdded: '0.30'
4043
+
4044
+ # Supports --auto-correct
4045
+ Style/SelectByRegexp:
4046
+ Description: Prefer grep/grep_v to select/reject with a regexp match.
4047
+ Enabled: true
4048
+ SafeAutoCorrect: false
4049
+ VersionAdded: '1.22'
4050
+
4051
+ # Supports --auto-correct
4052
+ Style/SelfAssignment:
4053
+ Description: Checks for places where self-assignment shorthand should have been used.
4054
+ StyleGuide: "#self-assignment"
4055
+ Enabled: false
4056
+ VersionAdded: '0.19'
4057
+ VersionChanged: '0.29'
4058
+
4059
+ # Supports --auto-correct
4060
+ Style/Semicolon:
4061
+ Description: Don't use semicolons to terminate expressions.
4062
+ StyleGuide: "#no-semicolon"
4063
+ Enabled: false
4064
+ VersionAdded: '0.9'
4065
+ VersionChanged: '0.19'
4066
+ AllowAsExpressionSeparator: false
4067
+
4068
+ Style/Send:
4069
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
4070
+ may overlap with existing methods.
4071
+ StyleGuide: "#prefer-public-send"
4072
+ Enabled: false
4073
+ VersionAdded: '0.33'
4074
+
4075
+ # Supports --auto-correct
4076
+ Style/SignalException:
4077
+ Description: Checks for proper usage of fail and raise.
4078
+ StyleGuide: "#prefer-raise-over-fail"
4079
+ Enabled: false
4080
+ VersionAdded: '0.11'
4081
+ VersionChanged: '0.37'
4082
+ EnforcedStyle: only_raise
4083
+ SupportedStyles:
4084
+ - only_raise
4085
+ - only_fail
4086
+ - semantic
4087
+
4088
+ # Supports --auto-correct
4089
+ Style/SingleArgumentDig:
4090
+ Description: Avoid using single argument dig method.
4091
+ Enabled: false
4092
+ VersionAdded: '0.89'
4093
+ Safe: false
4094
+
4095
+ # Supports --auto-correct
4096
+ Style/SingleLineBlockParams:
4097
+ Description: Enforces the names of some block params.
4098
+ Enabled: false
4099
+ VersionAdded: '0.16'
4100
+ VersionChanged: '1.6'
4101
+ Methods:
4102
+ - reduce:
4103
+ - acc
4104
+ - elem
4105
+ - inject:
4106
+ - acc
4107
+ - elem
4108
+
4109
+ # Supports --auto-correct
4110
+ Style/SingleLineMethods:
4111
+ Description: Avoid single-line methods.
4112
+ StyleGuide: "#no-single-line-methods"
4113
+ Enabled: false
4114
+ VersionAdded: '0.9'
4115
+ VersionChanged: '1.8'
4116
+ AllowIfMethodIsEmpty: true
4117
+
4118
+ # Supports --auto-correct
4119
+ Style/SlicingWithRange:
4120
+ Description: Checks array slicing is done with endless ranges when suitable.
4121
+ Enabled: false
4122
+ VersionAdded: '0.83'
4123
+ Safe: false
4124
+
4125
+ # Supports --auto-correct
4126
+ Style/SoleNestedConditional:
4127
+ Description: Finds sole nested conditional nodes which can be merged into outer conditional
4128
+ node.
4129
+ Enabled: false
4130
+ VersionAdded: '0.89'
4131
+ VersionChanged: '1.5'
4132
+ AllowModifier: false
4133
+
4134
+ # Supports --auto-correct
4135
+ Style/SpecialGlobalVars:
4136
+ Description: Avoid Perl-style global variables.
4137
+ StyleGuide: "#no-cryptic-perlisms"
4138
+ Enabled: false
4139
+ VersionAdded: '0.13'
4140
+ VersionChanged: '0.36'
4141
+ SafeAutoCorrect: false
4142
+ RequireEnglish: true
4143
+ EnforcedStyle: use_english_names
4144
+ SupportedStyles:
4145
+ - use_perl_names
4146
+ - use_english_names
4147
+
4148
+ # Supports --auto-correct
4149
+ Style/StabbyLambdaParentheses:
4150
+ Description: Check for the usage of parentheses around stabby lambda arguments.
4151
+ StyleGuide: "#stabby-lambda-with-args"
4152
+ Enabled: false
4153
+ VersionAdded: '0.35'
4154
+ EnforcedStyle: require_parentheses
4155
+ SupportedStyles:
4156
+ - require_parentheses
4157
+ - require_no_parentheses
4158
+
4159
+ Style/StaticClass:
4160
+ Description: Prefer modules to classes with only class methods.
4161
+ StyleGuide: "#modules-vs-classes"
4162
+ Enabled: false
4163
+ Safe: false
4164
+ VersionAdded: '1.3'
4165
+
4166
+ # Supports --auto-correct
4167
+ Style/StderrPuts:
4168
+ Description: Use `warn` instead of `$stderr.puts`.
4169
+ StyleGuide: "#warn"
4170
+ Enabled: false
4171
+ VersionAdded: '0.51'
4172
+
4173
+ # Supports --auto-correct
4174
+ Style/StringChars:
4175
+ Description: Checks for uses of `String#split` with empty string or regexp literal
4176
+ argument.
4177
+ StyleGuide: "#string-chars"
4178
+ Enabled: false
4179
+ Safe: false
4180
+ VersionAdded: '1.12'
4181
+
4182
+ # Supports --auto-correct
4183
+ Style/StringConcatenation:
4184
+ Description: Checks for places where string concatenation can be replaced with string
4185
+ interpolation.
4186
+ StyleGuide: "#string-interpolation"
4187
+ Enabled: false
4188
+ Safe: false
4189
+ VersionAdded: '0.89'
4190
+ VersionChanged: '1.6'
4191
+ Mode: aggressive
4192
+
4193
+ # Supports --auto-correct
4194
+ Style/StringHashKeys:
4195
+ Description: Prefer symbols instead of strings as hash keys.
4196
+ StyleGuide: "#symbols-as-keys"
4197
+ Enabled: false
4198
+ VersionAdded: '0.52'
4199
+ VersionChanged: '0.75'
4200
+ Safe: false
4201
+
4202
+ # Supports --auto-correct
4203
+ Style/StringLiterals:
4204
+ Description: Checks if uses of quotes match the configured preference.
4205
+ StyleGuide: "#consistent-string-literals"
4206
+ Enabled: false
4207
+ VersionAdded: '0.9'
4208
+ VersionChanged: '0.36'
4209
+ EnforcedStyle: single_quotes
4210
+ SupportedStyles:
4211
+ - single_quotes
4212
+ - double_quotes
4213
+ ConsistentQuotesInMultiline: false
4214
+
4215
+ # Supports --auto-correct
4216
+ Style/StringLiteralsInInterpolation:
4217
+ Description: Checks if uses of quotes inside expressions in interpolated strings match
4218
+ the configured preference.
4219
+ Enabled: true
4220
+ VersionAdded: '0.27'
4221
+ EnforcedStyle: single_quotes
4222
+ SupportedStyles:
4223
+ - single_quotes
4224
+ - double_quotes
4225
+
4226
+ # Supports --auto-correct
4227
+ Style/StringMethods:
4228
+ Description: Checks if configured preferred methods are used over non-preferred.
4229
+ Enabled: false
4230
+ VersionAdded: '0.34'
4231
+ VersionChanged: '0.34'
4232
+ PreferredMethods:
4233
+ intern: to_sym
4234
+
4235
+ # Supports --auto-correct
4236
+ Style/Strip:
4237
+ Description: Use `strip` instead of `lstrip.rstrip`.
4238
+ Enabled: false
4239
+ VersionAdded: '0.36'
4240
+
4241
+ # Supports --auto-correct
4242
+ Style/StructInheritance:
4243
+ Description: Checks for inheritance from Struct.new.
4244
+ StyleGuide: "#no-extend-struct-new"
4245
+ Enabled: false
4246
+ SafeAutoCorrect: false
4247
+ VersionAdded: '0.29'
4248
+ VersionChanged: '0.86'
4249
+
4250
+ # Supports --auto-correct
4251
+ Style/SwapValues:
4252
+ Description: This cop enforces the use of shorthand-style swapping of 2 variables.
4253
+ StyleGuide: "#values-swapping"
4254
+ Enabled: false
4255
+ VersionAdded: '1.1'
4256
+ SafeAutoCorrect: false
4257
+
4258
+ # Supports --auto-correct
4259
+ Style/SymbolArray:
4260
+ Description: Use %i or %I for arrays of symbols.
4261
+ StyleGuide: "#percent-i"
4262
+ Enabled: false
4263
+ VersionAdded: '0.9'
4264
+ VersionChanged: '0.49'
4265
+ EnforcedStyle: percent
4266
+ MinSize: 2
4267
+ SupportedStyles:
4268
+ - percent
4269
+ - brackets
4270
+
4271
+ # Supports --auto-correct
4272
+ Style/SymbolLiteral:
4273
+ Description: Use plain symbols instead of string symbols when possible.
4274
+ Enabled: false
4275
+ VersionAdded: '0.30'
4276
+
4277
+ # Supports --auto-correct
4278
+ Style/SymbolProc:
4279
+ Description: Use symbols as procs instead of blocks when possible.
4280
+ Enabled: false
4281
+ Safe: false
4282
+ VersionAdded: '0.26'
4283
+ VersionChanged: '1.5'
4284
+ AllowMethodsWithArguments: false
4285
+ IgnoredMethods:
4286
+ - respond_to
4287
+ - define_method
4288
+
4289
+ # Supports --auto-correct
4290
+ Style/TernaryParentheses:
4291
+ Description: Checks for use of parentheses around ternary conditions.
4292
+ Enabled: false
4293
+ VersionAdded: '0.42'
4294
+ VersionChanged: '0.46'
4295
+ EnforcedStyle: require_no_parentheses
4296
+ SupportedStyles:
4297
+ - require_parentheses
4298
+ - require_no_parentheses
4299
+ - require_parentheses_when_complex
4300
+ AllowSafeAssignment: true
4301
+
4302
+ Style/TopLevelMethodDefinition:
4303
+ Description: This cop looks for top-level method definitions.
4304
+ StyleGuide: "#top-level-methods"
4305
+ Enabled: false
4306
+ VersionAdded: '1.15'
4307
+
4308
+ # Supports --auto-correct
4309
+ Style/TrailingBodyOnClass:
4310
+ Description: Class body goes below class statement.
4311
+ Enabled: false
4312
+ VersionAdded: '0.53'
4313
+
4314
+ # Supports --auto-correct
4315
+ Style/TrailingBodyOnMethodDefinition:
4316
+ Description: Method body goes below definition.
4317
+ Enabled: false
4318
+ VersionAdded: '0.52'
4319
+
4320
+ # Supports --auto-correct
4321
+ Style/TrailingBodyOnModule:
4322
+ Description: Module body goes below module statement.
4323
+ Enabled: false
4324
+ VersionAdded: '0.53'
4325
+
4326
+ # Supports --auto-correct
4327
+ Style/TrailingCommaInArguments:
4328
+ Description: Checks for trailing comma in argument lists.
4329
+ StyleGuide: "#no-trailing-params-comma"
4330
+ Enabled: false
4331
+ VersionAdded: '0.36'
4332
+ EnforcedStyleForMultiline: no_comma
4333
+ SupportedStylesForMultiline:
4334
+ - comma
4335
+ - consistent_comma
4336
+ - no_comma
4337
+
4338
+ # Supports --auto-correct
4339
+ Style/TrailingCommaInArrayLiteral:
4340
+ Description: Checks for trailing comma in array literals.
4341
+ StyleGuide: "#no-trailing-array-commas"
4342
+ Enabled: true
4343
+ VersionAdded: '0.53'
4344
+ EnforcedStyleForMultiline: consistent_comma
4345
+ SupportedStylesForMultiline:
4346
+ - comma
4347
+ - consistent_comma
4348
+ - no_comma
4349
+
4350
+ # Supports --auto-correct
4351
+ Style/TrailingCommaInBlockArgs:
4352
+ Description: Checks for useless trailing commas in block arguments.
4353
+ Enabled: true
4354
+ Safe: false
4355
+ VersionAdded: '0.81'
4356
+
4357
+ # Supports --auto-correct
4358
+ Style/TrailingCommaInHashLiteral:
4359
+ Description: Checks for trailing comma in hash literals.
4360
+ Enabled: true
4361
+ EnforcedStyleForMultiline: consistent_comma
4362
+ SupportedStylesForMultiline:
4363
+ - comma
4364
+ - consistent_comma
4365
+ - no_comma
4366
+ VersionAdded: '0.53'
4367
+
4368
+ # Supports --auto-correct
4369
+ Style/TrailingMethodEndStatement:
4370
+ Description: Checks for trailing end statement on line of method body.
4371
+ Enabled: false
4372
+ VersionAdded: '0.52'
4373
+
4374
+ # Supports --auto-correct
4375
+ Style/TrailingUnderscoreVariable:
4376
+ Description: Checks for the usage of unneeded trailing underscores at the end of parallel
4377
+ variable assignment.
4378
+ AllowNamedUnderscoreVariables: true
4379
+ Enabled: false
4380
+ VersionAdded: '0.31'
4381
+ VersionChanged: '0.35'
4382
+
4383
+ # Supports --auto-correct
4384
+ Style/TrivialAccessors:
4385
+ Description: Prefer attr_* methods to trivial readers/writers.
4386
+ StyleGuide: "#attr_family"
4387
+ Enabled: false
4388
+ VersionAdded: '0.9'
4389
+ VersionChanged: '1.15'
4390
+ ExactNameMatch: true
4391
+ AllowPredicates: true
4392
+ AllowDSLWriters: true
4393
+ IgnoreClassMethods: false
4394
+ AllowedMethods:
4395
+ - to_ary
4396
+ - to_a
4397
+ - to_c
4398
+ - to_enum
4399
+ - to_h
4400
+ - to_hash
4401
+ - to_i
4402
+ - to_int
4403
+ - to_io
4404
+ - to_open
4405
+ - to_path
4406
+ - to_proc
4407
+ - to_r
4408
+ - to_regexp
4409
+ - to_str
4410
+ - to_s
4411
+ - to_sym
4412
+
4413
+ # Supports --auto-correct
4414
+ Style/UnlessElse:
4415
+ Description: Do not use unless with else. Rewrite these with the positive case first.
4416
+ StyleGuide: "#no-else-with-unless"
4417
+ Enabled: false
4418
+ VersionAdded: '0.9'
4419
+
4420
+ Style/UnlessLogicalOperators:
4421
+ Description: Checks for use of logical operators in an unless condition.
4422
+ Enabled: false
4423
+ VersionAdded: '1.11'
4424
+ EnforcedStyle: forbid_mixed_logical_operators
4425
+ SupportedStyles:
4426
+ - forbid_mixed_logical_operators
4427
+ - forbid_logical_operators
4428
+
4429
+ # Supports --auto-correct
4430
+ Style/UnpackFirst:
4431
+ Description: Checks for accessing the first element of `String#unpack` instead of
4432
+ using `unpack1`.
4433
+ Enabled: false
4434
+ VersionAdded: '0.54'
4435
+
4436
+ # Supports --auto-correct
4437
+ Style/VariableInterpolation:
4438
+ Description: Don't interpolate global, instance and class variables directly in strings.
4439
+ StyleGuide: "#curlies-interpolate"
4440
+ Enabled: false
4441
+ VersionAdded: '0.9'
4442
+ VersionChanged: '0.20'
4443
+
4444
+ # Supports --auto-correct
4445
+ Style/WhenThen:
4446
+ Description: Use when x then ... for one-line cases.
4447
+ StyleGuide: "#one-line-cases"
4448
+ Enabled: false
4449
+ VersionAdded: '0.9'
4450
+
4451
+ # Supports --auto-correct
4452
+ Style/WhileUntilDo:
4453
+ Description: Checks for redundant do after while or until.
4454
+ StyleGuide: "#no-multiline-while-do"
4455
+ Enabled: false
4456
+ VersionAdded: '0.9'
4457
+
4458
+ # Supports --auto-correct
4459
+ Style/WhileUntilModifier:
4460
+ Description: Favor modifier while/until usage when you have a single-line body.
4461
+ StyleGuide: "#while-as-a-modifier"
4462
+ Enabled: false
4463
+ VersionAdded: '0.9'
4464
+ VersionChanged: '0.30'
4465
+
4466
+ # Supports --auto-correct
4467
+ Style/WordArray:
4468
+ Description: Use %w or %W for arrays of words.
4469
+ StyleGuide: "#percent-w"
4470
+ Enabled: false
4471
+ VersionAdded: '0.9'
4472
+ VersionChanged: '0.36'
4473
+ EnforcedStyle: percent
4474
+ SupportedStyles:
4475
+ - percent
4476
+ - brackets
4477
+ MinSize: 2
4478
+ WordRegex: !ruby/regexp /\A(?:\p{Word}|\p{Word}-\p{Word}|\n|\t)+\z/
4479
+
4480
+ # Supports --auto-correct
4481
+ Style/YodaCondition:
4482
+ Description: Forbid or enforce yoda conditions.
4483
+ Reference: https://en.wikipedia.org/wiki/Yoda_conditions
4484
+ Enabled: false
4485
+ EnforcedStyle: require_for_equality_operators_only
4486
+ SupportedStyles:
4487
+ - forbid_for_all_comparison_operators
4488
+ - forbid_for_equality_operators_only
4489
+ - require_for_all_comparison_operators
4490
+ - require_for_equality_operators_only
4491
+ Safe: false
4492
+ VersionAdded: '0.49'
4493
+ VersionChanged: '0.75'
4494
+
4495
+ # Supports --auto-correct
4496
+ Style/ZeroLengthPredicate:
4497
+ Description: 'Use #empty? when testing for objects of length 0.'
4498
+ Enabled: true
4499
+ Safe: false
4500
+ VersionAdded: '0.37'
4501
+ VersionChanged: '0.39'
4502
+
4503
+ Naming/BlockForwarding: # new in 1.24
4504
+ Enabled: true
4505
+ Security/CompoundHash: # new in 1.28
4506
+ Enabled: true
4507
+ Style/FetchEnvVar: # new in 1.28
4508
+ Enabled: true
4509
+ Style/FileRead: # new in 1.24
4510
+ Enabled: true
4511
+ Style/FileWrite: # new in 1.24
4512
+ Enabled: true
4513
+ Style/MapToHash: # new in 1.24
4514
+ Enabled: true
4515
+ Style/NestedFileDirname: # new in 1.26
4516
+ Enabled: true
4517
+ Style/ObjectThen: # new in 1.28
4518
+ Enabled: true
4519
+ Style/RedundantInitialize: # new in 1.27
4520
+ Enabled: true
4521
+ Lint/RefinementImportMethods: # new in 1.27
4522
+ Enabled: true