autocop 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1937 @@
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ DisplayCopNames: true
5
+ DisplayStyleGuide: true
6
+ ExtraDetails: true
7
+ Exclude:
8
+ - '**/Capfile'
9
+ - '**/Gemfile'
10
+ - Capfile
11
+ - Gemfile
12
+ - cookbooks/**/**
13
+ - env/vendor/**/*
14
+ - vendor/**/*
15
+ - Gemfile.lock
16
+ - bin/**/*
17
+ - db/schema.rb
18
+ - lib/generators/**/*
19
+ - lib/templates/**/*
20
+ - vendor/**/*
21
+
22
+ Rails:
23
+ Enabled: true
24
+
25
+ Documentation:
26
+ Enabled: false
27
+
28
+ Lint/AmbiguousOperator:
29
+ Description: Checks for ambiguous operators in the first argument of a method invocation
30
+ without parentheses.
31
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
32
+ Enabled: true
33
+
34
+ Lint/AmbiguousRegexpLiteral:
35
+ Description: Checks for ambiguous regexp literals in the first argument of a method
36
+ invocation without parentheses.
37
+ Enabled: true
38
+
39
+ Lint/AssignmentInCondition:
40
+ Description: Don't use assignment in conditions.
41
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
42
+ Enabled: true
43
+ AllowSafeAssignment: true
44
+
45
+ # Supports --auto-correct
46
+ Lint/BlockAlignment:
47
+ Description: Align block ends correctly.
48
+ Enabled: true
49
+
50
+ Lint/CircularArgumentReference:
51
+ Description: Default values in optional keyword arguments and optional ordinal arguments
52
+ should not refer back to the name of the argument.
53
+ Enabled: true
54
+
55
+ Lint/ConditionPosition:
56
+ Description: Checks for condition placed in a confusing position relative to the keyword.
57
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
58
+ Enabled: true
59
+
60
+ # Supports --auto-correct
61
+ Lint/Debugger:
62
+ Description: Check for debugger calls.
63
+ Enabled: true
64
+
65
+ # Supports --auto-correct
66
+ Lint/DefEndAlignment:
67
+ Description: Align ends corresponding to defs correctly.
68
+ Enabled: true
69
+ EnforcedStyleAlignWith: start_of_line
70
+ AutoCorrect: false
71
+
72
+ # Supports --auto-correct
73
+ Lint/DeprecatedClassMethods:
74
+ Description: Check for deprecated class method calls.
75
+ Enabled: true
76
+
77
+ Lint/DuplicateMethods:
78
+ Description: Check for duplicate method definitions.
79
+ Enabled: true
80
+
81
+ Lint/DuplicatedKey:
82
+ Description: Check for duplicate keys in hash literals.
83
+ Enabled: true
84
+
85
+ Lint/EachWithObjectArgument:
86
+ Description: Check for immutable argument given to each_with_object.
87
+ Enabled: true
88
+
89
+ Lint/ElseLayout:
90
+ Description: Check for odd code arrangement in an else block.
91
+ Enabled: true
92
+
93
+ Lint/EmptyEnsure:
94
+ Description: Checks for empty ensure block.
95
+ Enabled: true
96
+
97
+ Lint/EmptyInterpolation:
98
+ Description: Checks for empty string interpolation.
99
+ Enabled: true
100
+
101
+ # Supports --auto-correct
102
+ Lint/EndAlignment:
103
+ Description: Align ends correctly.
104
+ Enabled: true
105
+ EnforcedStyleAlignWith: keyword
106
+ AutoCorrect: false
107
+
108
+ Lint/EndInMethod:
109
+ Description: END blocks should not be placed inside method definitions.
110
+ Enabled: true
111
+
112
+ Lint/EnsureReturn:
113
+ Description: Do not use return in an ensure block.
114
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
115
+ Enabled: true
116
+
117
+ Security/Eval:
118
+ Description: The use of eval represents a serious security risk.
119
+ Enabled: true
120
+
121
+ Lint/FloatOutOfRange:
122
+ Description: Catches floating-point literals too large or small for Ruby to represent.
123
+ Enabled: true
124
+
125
+ Lint/FormatParameterMismatch:
126
+ Description: The number of parameters to format/sprint must match the fields.
127
+ Enabled: true
128
+
129
+ Lint/HandleExceptions:
130
+ Description: Don't suppress exception.
131
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
132
+ Enabled: true
133
+
134
+ Lint/ImplicitStringConcatenation:
135
+ Description: Checks for adjacent string literals on the same line, which could better
136
+ be represented as a single string literal.
137
+ Enabled: true
138
+
139
+ Lint/IneffectiveAccessModifier:
140
+ Description: Checks for attempts to use `private` or `protected` to set the visibility
141
+ of a class method, which does not work.
142
+ Enabled: true
143
+
144
+ # Supports --auto-correct
145
+ Lint/LiteralInInterpolation:
146
+ Description: Avoid interpolating literals in strings
147
+ Enabled: true
148
+ AutoCorrect: false
149
+
150
+ Lint/Loop:
151
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
152
+ for post-loop tests.
153
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
154
+ Enabled: true
155
+
156
+ Lint/NestedMethodDefinition:
157
+ Description: Do not use nested method definitions.
158
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
159
+ Enabled: true
160
+
161
+ Lint/NextWithoutAccumulator:
162
+ Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
163
+ block.
164
+ Enabled: true
165
+
166
+ Lint/NonLocalExitFromIterator:
167
+ Description: Do not use return in iterator to cause non-local exit.
168
+ Enabled: true
169
+
170
+ Lint/ParenthesesAsGroupedExpression:
171
+ Description: Checks for method calls with a space before the opening parenthesis.
172
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
173
+ Enabled: true
174
+
175
+ Lint/RandOne:
176
+ Description: Checks for `rand(1)` calls. Such calls always return `0` and most likely
177
+ a mistake.
178
+ Enabled: true
179
+
180
+ Lint/RequireParentheses:
181
+ Description: Use parentheses in the method call to avoid confusion about precedence.
182
+ Enabled: true
183
+
184
+ Lint/RescueException:
185
+ Description: Avoid rescuing the Exception class.
186
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
187
+ Enabled: true
188
+
189
+ Lint/ShadowingOuterLocalVariable:
190
+ Description: Do not use the same name as outer local variable for block arguments
191
+ or block local variables.
192
+ Enabled: true
193
+
194
+ # Supports --auto-correct
195
+ Lint/StringConversionInInterpolation:
196
+ Description: Checks for Object#to_s usage in string interpolation.
197
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
198
+ Enabled: true
199
+
200
+ Lint/UnderscorePrefixedVariableName:
201
+ Description: Do not use prefix `_` for a variable that is used.
202
+ Enabled: true
203
+
204
+ # Supports --auto-correct
205
+ Lint/UnneededDisable:
206
+ Description: 'Checks for rubocop:disable comments that can be removed. Note: this
207
+ cop is not disabled when disabling all cops. It must be explicitly disabled.'
208
+ Enabled: true
209
+
210
+ Lint/UnreachableCode:
211
+ Description: Unreachable code.
212
+ Enabled: true
213
+
214
+ # Supports --auto-correct
215
+ Lint/UnusedBlockArgument:
216
+ Description: Checks for unused block arguments.
217
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
218
+ Enabled: true
219
+ IgnoreEmptyBlocks: true
220
+
221
+ # Supports --auto-correct
222
+ Lint/UnusedMethodArgument:
223
+ Description: Checks for unused method arguments.
224
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
225
+ Enabled: true
226
+ AllowUnusedKeywordArguments: false
227
+ IgnoreEmptyMethods: true
228
+
229
+ Lint/UselessAccessModifier:
230
+ Description: Checks for useless access modifiers.
231
+ Enabled: true
232
+
233
+ Lint/UselessAssignment:
234
+ Description: Checks for useless assignment to a local variable.
235
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
236
+ Enabled: true
237
+
238
+ Lint/UselessComparison:
239
+ Description: Checks for comparison of something with itself.
240
+ Enabled: true
241
+
242
+ Lint/UselessElseWithoutRescue:
243
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
244
+ Enabled: true
245
+
246
+ Lint/UselessSetterCall:
247
+ Description: Checks for useless setter call to a local variable.
248
+ Enabled: true
249
+
250
+ Lint/Void:
251
+ Description: Possible use of operator/literal/variable in void context.
252
+ Enabled: true
253
+ Exclude:
254
+ - spec/**/*.rb
255
+
256
+ # Type 'Metrics' (9):
257
+ Metrics/AbcSize:
258
+ Description: A calculated magnitude based on number of assignments, branches, and
259
+ conditions.
260
+ Reference: http://c2.com/cgi/wiki?AbcMetric
261
+ Enabled: true
262
+ Max: 15
263
+
264
+ Metrics/BlockLength:
265
+ CountComments: false
266
+ Max: 25
267
+ Exclude:
268
+ - 'Rakefile'
269
+ - '**/*.rake'
270
+ - 'spec/**/*.rb'
271
+ - '*.gemspec'
272
+
273
+ Metrics/BlockNesting:
274
+ Description: Avoid excessive block nesting
275
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
276
+ Enabled: true
277
+ Max: 3
278
+
279
+ Metrics/ClassLength:
280
+ Description: Avoid classes longer than 100 lines of code.
281
+ Enabled: true
282
+ CountComments: false
283
+ Max: 100
284
+
285
+ Metrics/CyclomaticComplexity:
286
+ Description: A complexity metric that is strongly correlated to the number of test
287
+ cases needed to validate a method.
288
+ Enabled: true
289
+ Max: 6
290
+
291
+ Metrics/LineLength:
292
+ Description: Limit lines to 80 characters.
293
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
294
+ Enabled: true
295
+ Max: 200
296
+ AllowHeredoc: true
297
+ AllowURI: true
298
+ URISchemes:
299
+ - http
300
+ - https
301
+
302
+ Metrics/MethodLength:
303
+ Description: Avoid methods longer than 10 lines of code.
304
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
305
+ Enabled: true
306
+ CountComments: false
307
+ Max: 30
308
+
309
+ Metrics/ModuleLength:
310
+ Description: Avoid modules longer than 100 lines of code.
311
+ Enabled: true
312
+ CountComments: false
313
+ Max: 300
314
+
315
+ Metrics/ParameterLists:
316
+ Description: Avoid parameter lists longer than three or four parameters.
317
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
318
+ Enabled: true
319
+ Max: 6
320
+ CountKeywordArgs: true
321
+
322
+ Metrics/PerceivedComplexity:
323
+ Description: A complexity metric geared towards measuring complexity for a human reader.
324
+ Enabled: true
325
+ Max: 7
326
+
327
+ # Type 'Performance' (21):
328
+ # Supports --auto-correct
329
+ Performance/CaseWhenSplat:
330
+ Description: Place `when` conditions that use splat at the end of the list of `when`
331
+ branches.
332
+ Enabled: true
333
+
334
+ # Supports --auto-correct
335
+ Performance/Casecmp:
336
+ Description: Use `casecmp` rather than `downcase ==`.
337
+ Reference: https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code
338
+ Enabled: true
339
+
340
+ # Supports --auto-correct
341
+ Performance/Count:
342
+ Description: Use `count` instead of `select...size`, `reject...size`, `select...count`,
343
+ `reject...count`, `select...length`, and `reject...length`.
344
+ Enabled: true
345
+
346
+ # Supports --auto-correct
347
+ Performance/Detect:
348
+ Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`,
349
+ and `find_all.last`.
350
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code
351
+ Enabled: true
352
+
353
+ Performance/DoubleStartEndWith:
354
+ Description: Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x,
355
+ ...) || str.{start,end}_with?(y, ...)`.
356
+ Enabled: true
357
+
358
+ # Supports --auto-correct
359
+ Performance/EndWith:
360
+ Description: Use `end_with?` instead of a regex match anchored to the end of a string.
361
+ Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
362
+ Enabled: true
363
+
364
+ Performance/FixedSize:
365
+ Description: Do not compute the size of statically sized objects except in constants
366
+ Enabled: true
367
+
368
+ # Supports --auto-correct
369
+ Performance/FlatMap:
370
+ Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)`
371
+ or `Enumberable#collect..Array#flatten(1)`
372
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
373
+ Enabled: true
374
+ EnabledForFlattenWithoutParams: false
375
+
376
+ # Supports --auto-correct
377
+ Performance/HashEachMethods:
378
+ Description: Use `Hash#each_key` and `Hash#each_value` instead of `Hash#keys.each`
379
+ and `Hash#values.each`.
380
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-each
381
+ Enabled: true
382
+ AutoCorrect: false
383
+
384
+ # Supports --auto-correct
385
+ Performance/LstripRstrip:
386
+ Description: Use `strip` instead of `lstrip.rstrip`.
387
+ Enabled: true
388
+
389
+ # Supports --auto-correct
390
+ Performance/RangeInclude:
391
+ Description: Use `Range#cover?` instead of `Range#include?`.
392
+ Reference: https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code
393
+ Enabled: true
394
+
395
+ # Supports --auto-correct
396
+ Performance/RedundantBlockCall:
397
+ Description: Use `yield` instead of `block.call`.
398
+ Reference: https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code
399
+ Enabled: true
400
+
401
+ # Supports --auto-correct
402
+ Performance/RedundantMatch:
403
+ Description: Use `=~` instead of `String#match` or `Regexp#match` in a context where
404
+ the returned `MatchData` is not needed.
405
+ Enabled: true
406
+
407
+ # Supports --auto-correct
408
+ Performance/RedundantMerge:
409
+ Description: Use Hash#[]=, rather than Hash#merge! with a single key-value pair.
410
+ Reference: https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code
411
+ Enabled: true
412
+
413
+ # Supports --auto-correct
414
+ Performance/RedundantSortBy:
415
+ Description: Use `sort` instead of `sort_by { |x| x }`.
416
+ Enabled: true
417
+
418
+ # Supports --auto-correct
419
+ Performance/ReverseEach:
420
+ Description: Use `reverse_each` instead of `reverse.each`.
421
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
422
+ Enabled: true
423
+
424
+ # Supports --auto-correct
425
+ Performance/Sample:
426
+ Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Fixnum]`.
427
+ Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
428
+ Enabled: true
429
+
430
+ # Supports --auto-correct
431
+ Performance/Size:
432
+ Description: Use `size` instead of `count` for counting the number of elements in
433
+ `Array` and `Hash`.
434
+ Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
435
+ Enabled: true
436
+
437
+ # Supports --auto-correct
438
+ Performance/StartWith:
439
+ Description: Use `start_with?` instead of a regex match anchored to the beginning
440
+ of a string.
441
+ Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
442
+ Enabled: true
443
+
444
+ # Supports --auto-correct
445
+ Performance/StringReplacement:
446
+ Description: Use `tr` instead of `gsub` when you are replacing the same number of
447
+ characters. Use `delete` instead of `gsub` when you are deleting characters.
448
+ Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
449
+ Enabled: true
450
+
451
+ Performance/TimesMap:
452
+ Description: Checks for .times.map calls.
453
+ Enabled: true
454
+
455
+ # Type 'Rails' (12):
456
+ # Supports --auto-correct
457
+ Rails/ActionFilter:
458
+ Description: Enforces consistent use of action filter methods.
459
+ Enabled: true
460
+ EnforcedStyle: action
461
+ SupportedStyles:
462
+ - action
463
+ - filter
464
+ Include:
465
+ - app/controllers/**/*.rb
466
+
467
+ Rails/Date:
468
+ Description: Checks the correct usage of date aware methods, such as Date.today, Date.current
469
+ etc.
470
+ Enabled: true
471
+ EnforcedStyle: flexible
472
+ SupportedStyles:
473
+ - strict
474
+ - flexible
475
+
476
+ # Supports --auto-correct
477
+ Rails/Delegate:
478
+ Description: Prefer delegate method for delegations.
479
+ Enabled: true
480
+
481
+ # Supports --auto-correct
482
+ Rails/FindBy:
483
+ Description: Prefer find_by over where.first.
484
+ Enabled: true
485
+ Include:
486
+ - app/models/**/*.rb
487
+
488
+ # Supports --auto-correct
489
+ Rails/FindEach:
490
+ Description: Prefer all.find_each over all.find.
491
+ Enabled: true
492
+ Include:
493
+ - app/models/**/*.rb
494
+
495
+ Rails/HasAndBelongsToMany:
496
+ Description: Prefer has_many :through to has_and_belongs_to_many.
497
+ Enabled: true
498
+ Include:
499
+ - app/models/**/*.rb
500
+
501
+ Rails/Output:
502
+ Description: Checks for calls to puts, print, etc.
503
+ Enabled: true
504
+ Include:
505
+ - app/**/*.rb
506
+ - config/**/*.rb
507
+ - db/**/*.rb
508
+ - lib/**/*.rb
509
+
510
+ # Supports --auto-correct
511
+ Rails/PluralizationGrammar:
512
+ Description: Checks for incorrect grammar when using methods like `3.day.ago`.
513
+ Enabled: true
514
+
515
+ # Supports --auto-correct
516
+ Rails/ReadWriteAttribute:
517
+ Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
518
+ Enabled: true
519
+ Include:
520
+ - app/models/**/*.rb
521
+
522
+ Rails/ScopeArgs:
523
+ Description: Checks the arguments of ActiveRecord scopes.
524
+ Enabled: true
525
+ Include:
526
+ - app/models/**/*.rb
527
+
528
+ Rails/TimeZone:
529
+ Description: Checks the correct usage of time zone aware methods.
530
+ StyleGuide: https://github.com/bbatsov/rails-style-guide#time
531
+ Reference: http://danilenko.org/2012/7/6/rails_timezones
532
+ Enabled: true
533
+ EnforcedStyle: flexible
534
+ SupportedStyles:
535
+ - strict
536
+ - flexible
537
+
538
+ Rails/Validation:
539
+ Description: Use validates :attribute, hash of validations.
540
+ Enabled: true
541
+ Include:
542
+ - app/models/**/*.rb
543
+
544
+ #
545
+ # Rspec
546
+ #
547
+ RSpec/DescribeClass:
548
+ Exclude:
549
+ - 'spec/features/**/*'
550
+
551
+ RSpec/ImplicitExpect:
552
+ EnforcedStyle: should
553
+
554
+ RSpec/LeadingSubject:
555
+ Enabled: false
556
+
557
+ RSpec/LetSetup:
558
+ Enabled: false
559
+
560
+ RSpec/NestedGroups:
561
+ Enabled: false
562
+
563
+ RSpec/RepeatedExample:
564
+ Enabled: false
565
+
566
+
567
+ # Type 'Style' (184):
568
+ # Supports --auto-correct
569
+ Layout/AccessModifierIndentation:
570
+ Description: Check indentation of private/protected visibility modifiers.
571
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
572
+ Enabled: true
573
+ EnforcedStyle: indent
574
+ SupportedStyles:
575
+ - outdent
576
+ - indent
577
+ IndentationWidth:
578
+
579
+ Naming/AccessorMethodName:
580
+ Description: Check the naming of accessor methods for get_/set_.
581
+ Enabled: true
582
+
583
+ # Supports --auto-correct
584
+ Style/Alias:
585
+ Description: Use alias_method instead of alias.
586
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
587
+ Enabled: true
588
+ EnforcedStyle: prefer_alias
589
+ SupportedStyles:
590
+ - prefer_alias
591
+ - prefer_alias_method
592
+
593
+ # Supports --auto-correct
594
+ Layout/AlignArray:
595
+ Description: Align the elements of an array literal if they span more than one line.
596
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
597
+ Enabled: true
598
+
599
+ # Supports --auto-correct
600
+ Layout/AlignHash:
601
+ Description: Align the elements of a hash literal if they span more than one line.
602
+ Enabled: true
603
+ EnforcedHashRocketStyle: key
604
+ EnforcedColonStyle: key
605
+ EnforcedLastArgumentHashStyle: always_inspect
606
+ SupportedLastArgumentHashStyles:
607
+ - always_inspect
608
+ - always_ignore
609
+ - ignore_implicit
610
+ - ignore_explicit
611
+
612
+ # Supports --auto-correct
613
+ Layout/AlignParameters:
614
+ Description: Align the parameters of a method call if they span more than one line.
615
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
616
+ Enabled: true
617
+ EnforcedStyle: with_first_parameter
618
+ SupportedStyles:
619
+ - with_first_parameter
620
+ - with_fixed_indentation
621
+
622
+ # Supports --auto-correct
623
+ Style/AndOr:
624
+ Description: Use &&/|| instead of and/or.
625
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
626
+ Enabled: true
627
+ EnforcedStyle: always
628
+ SupportedStyles:
629
+ - always
630
+ - conditionals
631
+
632
+ # Supports --auto-correct
633
+ Style/ArrayJoin:
634
+ Description: Use Array#join instead of Array#*.
635
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
636
+ Enabled: true
637
+
638
+ Style/AsciiComments:
639
+ Description: Use only ascii symbols in comments.
640
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
641
+ Enabled: true
642
+
643
+ Naming/AsciiIdentifiers:
644
+ Description: Use only ascii symbols in identifiers.
645
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
646
+ Enabled: true
647
+
648
+ # Supports --auto-correct
649
+ Style/Attr:
650
+ Description: Checks for uses of Module#attr.
651
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
652
+ Enabled: true
653
+
654
+ Style/AutoResourceCleanup:
655
+ Description: Suggests the usage of an auto resource cleanup version of a method (if
656
+ available).
657
+ Enabled: false
658
+
659
+ # Supports --auto-correct
660
+ Style/BarePercentLiterals:
661
+ Description: Checks if usage of %() or %Q() matches configuration.
662
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
663
+ Enabled: true
664
+ EnforcedStyle: bare_percent
665
+ SupportedStyles:
666
+ - percent_q
667
+ - bare_percent
668
+
669
+ Style/BeginBlock:
670
+ Description: Avoid the use of BEGIN blocks.
671
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
672
+ Enabled: true
673
+
674
+ # Supports --auto-correct
675
+ Style/BlockComments:
676
+ Description: Do not use block comments.
677
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
678
+ Enabled: true
679
+
680
+ # Supports --auto-correct
681
+ Style/BlockDelimiters:
682
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
683
+ ugly). Prefer {...} over do...end for single-line blocks.
684
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
685
+ Enabled: true
686
+ EnforcedStyle: line_count_based
687
+ SupportedStyles:
688
+ - line_count_based
689
+ - semantic
690
+ - braces_for_chaining
691
+ ProceduralMethods:
692
+ - benchmark
693
+ - bm
694
+ - bmbm
695
+ - create
696
+ - each_with_object
697
+ - measure
698
+ - new
699
+ - realtime
700
+ - tap
701
+ - with_object
702
+ FunctionalMethods:
703
+ - let
704
+ - let!
705
+ - subject
706
+ - watch
707
+ IgnoredMethods:
708
+ - lambda
709
+ - proc
710
+ - it
711
+
712
+ # Supports --auto-correct
713
+ Layout/BlockEndNewline:
714
+ Description: Put end statement of multiline block on its own line.
715
+ Enabled: true
716
+
717
+ # Supports --auto-correct
718
+ Style/BracesAroundHashParameters:
719
+ Description: Enforce braces style around hash parameters.
720
+ Enabled: true
721
+ EnforcedStyle: no_braces
722
+ SupportedStyles:
723
+ - braces
724
+ - no_braces
725
+ - context_dependent
726
+
727
+ Style/CaseEquality:
728
+ Description: Avoid explicit use of the case equality operator(===).
729
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
730
+ Enabled: true
731
+
732
+ # Supports --auto-correct
733
+ Layout/CaseIndentation:
734
+ Description: Indentation of when in a case/when/[else/]end.
735
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
736
+ Enabled: true
737
+ EnforcedStyle: case
738
+ SupportedStyles:
739
+ - case
740
+ - end
741
+ IndentOneStep: false
742
+ IndentationWidth:
743
+
744
+ # Supports --auto-correct
745
+ Style/CharacterLiteral:
746
+ Description: Checks for uses of character literals.
747
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
748
+ Enabled: true
749
+
750
+ Naming/ClassAndModuleCamelCase:
751
+ Description: Use CamelCase for classes and modules.
752
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
753
+ Enabled: true
754
+
755
+ Style/ClassAndModuleChildren:
756
+ Description: Checks style of children classes and modules.
757
+ Enabled: true
758
+ EnforcedStyle: nested
759
+ SupportedStyles:
760
+ - nested
761
+ - compact
762
+
763
+ # Supports --auto-correct
764
+ Style/ClassCheck:
765
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
766
+ Enabled: true
767
+ EnforcedStyle: is_a?
768
+ SupportedStyles:
769
+ - is_a?
770
+ - kind_of?
771
+
772
+ # Supports --auto-correct
773
+ Style/ClassMethods:
774
+ Description: Use self when defining module/class methods.
775
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-class-methods
776
+ Enabled: true
777
+
778
+ Style/ClassVars:
779
+ Description: Avoid the use of class variables.
780
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
781
+ Enabled: true
782
+
783
+ # Supports --auto-correct
784
+ Layout/ClosingParenthesisIndentation:
785
+ Description: Checks the indentation of hanging closing parentheses.
786
+ Enabled: true
787
+
788
+ # Supports --auto-correct
789
+ Style/CollectionMethods:
790
+ Description: Preferred collection methods.
791
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
792
+ Enabled: false
793
+ PreferredMethods:
794
+ collect: map
795
+ collect!: map!
796
+ inject: reduce
797
+ detect: find
798
+ find_all: select
799
+
800
+ # Supports --auto-correct
801
+ Style/ColonMethodCall:
802
+ Description: 'Do not use :: for method call.'
803
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
804
+ Enabled: true
805
+
806
+ # Supports --auto-correct
807
+ Style/CommandLiteral:
808
+ Description: Use `` or %x around command literals.
809
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
810
+ Enabled: true
811
+ EnforcedStyle: backticks
812
+ SupportedStyles:
813
+ - backticks
814
+ - percent_x
815
+ - mixed
816
+ AllowInnerBackticks: false
817
+
818
+ # Supports --auto-correct
819
+ Style/CommentAnnotation:
820
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
821
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
822
+ Enabled: true
823
+ Keywords:
824
+ - TODO
825
+ - FIXME
826
+ - OPTIMIZE
827
+ - HACK
828
+ - REVIEW
829
+
830
+ # Supports --auto-correct
831
+ Layout/CommentIndentation:
832
+ Description: Indentation of comments.
833
+ Enabled: true
834
+
835
+ # Supports --auto-correct
836
+ Style/ConditionalAssignment:
837
+ Description: Use the return value of `if` and `case` statements for assignment to
838
+ a variable and variable comparison instead of assigning that variable inside of
839
+ each branch.
840
+ Enabled: true
841
+ SingleLineConditionsOnly: true
842
+
843
+ Naming/ConstantName:
844
+ Description: Constants should use SCREAMING_SNAKE_CASE.
845
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
846
+ Enabled: true
847
+
848
+ # Supports --auto-correct
849
+ Style/Copyright:
850
+ Description: Include a copyright notice in each file before any code.
851
+ Enabled: false
852
+ Notice: "^Copyright (\\(c\\) )?2[0-9]{3} .+"
853
+ AutocorrectNotice: ''
854
+
855
+ # Supports --auto-correct
856
+ Style/DefWithParentheses:
857
+ Description: Use def with parentheses when there are arguments.
858
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
859
+ Enabled: true
860
+
861
+ Style/Documentation:
862
+ Description: Document classes and non-namespace modules.
863
+ Enabled: false
864
+ Exclude:
865
+ - 'db/migrate/**/*'
866
+ - 'spec/**/*'
867
+ - 'test/**/*'
868
+
869
+
870
+ # Supports --auto-correct
871
+ Layout/DotPosition:
872
+ Description: Checks the position of the dot in multi-line method calls.
873
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
874
+ Enabled: true
875
+ EnforcedStyle: leading
876
+ SupportedStyles:
877
+ - leading
878
+ - trailing
879
+
880
+ Style/DoubleNegation:
881
+ Description: Checks for uses of double negation (!!).
882
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
883
+ Enabled: true
884
+
885
+ Style/EachWithObject:
886
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
887
+ Enabled: true
888
+
889
+ # Supports --auto-correct
890
+ Layout/ElseAlignment:
891
+ Description: Align elses and elsifs correctly.
892
+ Enabled: true
893
+
894
+ # Supports --auto-correct
895
+ Style/EmptyElse:
896
+ Description: Avoid empty else-clauses.
897
+ Enabled: true
898
+ EnforcedStyle: both
899
+ SupportedStyles:
900
+ - empty
901
+ - nil
902
+ - both
903
+
904
+ # Supports --auto-correct
905
+ Layout/EmptyLineBetweenDefs:
906
+ Description: Use empty lines between defs.
907
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
908
+ Enabled: true
909
+ AllowAdjacentOneLineDefs: false
910
+
911
+ # Supports --auto-correct
912
+ Layout/EmptyLines:
913
+ Description: Don't use several empty lines in a row.
914
+ Enabled: true
915
+
916
+ # Supports --auto-correct
917
+ Layout/EmptyLinesAroundAccessModifier:
918
+ Description: Keep blank lines around access modifiers.
919
+ Enabled: true
920
+
921
+ # Supports --auto-correct
922
+ Layout/EmptyLinesAroundBlockBody:
923
+ Description: Keeps track of empty lines around block bodies.
924
+ Enabled: true
925
+ EnforcedStyle: no_empty_lines
926
+ SupportedStyles:
927
+ - empty_lines
928
+ - no_empty_lines
929
+
930
+ # Supports --auto-correct
931
+ Layout/EmptyLinesAroundClassBody:
932
+ Description: Keeps track of empty lines around class bodies.
933
+ Enabled: true
934
+ EnforcedStyle: no_empty_lines
935
+ SupportedStyles:
936
+ - empty_lines
937
+ - no_empty_lines
938
+
939
+ # Supports --auto-correct
940
+ Layout/EmptyLinesAroundMethodBody:
941
+ Description: Keeps track of empty lines around method bodies.
942
+ Enabled: true
943
+
944
+ # Supports --auto-correct
945
+ Layout/EmptyLinesAroundModuleBody:
946
+ Description: Keeps track of empty lines around module bodies.
947
+ Enabled: true
948
+ EnforcedStyle: no_empty_lines
949
+ SupportedStyles:
950
+ - empty_lines
951
+ - no_empty_lines
952
+
953
+ # Supports --auto-correct
954
+ Style/EmptyLiteral:
955
+ Description: Prefer literals to Array.new/Hash.new/String.new.
956
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
957
+ Enabled: true
958
+
959
+ Style/EndBlock:
960
+ Description: Avoid the use of END blocks.
961
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
962
+ Enabled: true
963
+
964
+ Layout/EndOfLine:
965
+ Description: Use Unix-style line endings.
966
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
967
+ Enabled: true
968
+
969
+ # Supports --auto-correct
970
+ Style/EvenOdd:
971
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
972
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
973
+ Enabled: true
974
+
975
+ # Supports --auto-correct
976
+ Layout/ExtraSpacing:
977
+ Description: Do not use unnecessary spacing.
978
+ Enabled: true
979
+ AllowForAlignment: true
980
+ ForceEqualSignAlignment: false
981
+
982
+ Naming/FileName:
983
+ Description: Use snake_case for source file names.
984
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
985
+ Enabled: true
986
+ Exclude: []
987
+ ExpectMatchingDefinition: false
988
+ Regex:
989
+ IgnoreExecutableScripts: true
990
+
991
+ # Supports --auto-correct
992
+ Layout/FirstArrayElementLineBreak:
993
+ Description: Checks for a line break before the first element in a multi-line array.
994
+ Enabled: false
995
+
996
+ # Supports --auto-correct
997
+ Layout/FirstHashElementLineBreak:
998
+ Description: Checks for a line break before the first element in a multi-line hash.
999
+ Enabled: false
1000
+
1001
+ # Supports --auto-correct
1002
+ Layout/FirstMethodArgumentLineBreak:
1003
+ Description: Checks for a line break before the first argument in a multi-line method
1004
+ call.
1005
+ Enabled: false
1006
+
1007
+ # Supports --auto-correct
1008
+ Layout/FirstMethodParameterLineBreak:
1009
+ Description: Checks for a line break before the first parameter in a multi-line method
1010
+ parameter definition.
1011
+ Enabled: false
1012
+
1013
+ # Supports --auto-correct
1014
+ Layout/FirstParameterIndentation:
1015
+ Description: Checks the indentation of the first parameter in a method call.
1016
+ Enabled: true
1017
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
1018
+ SupportedStyles:
1019
+ - consistent
1020
+ - special_for_inner_method_call
1021
+ - special_for_inner_method_call_in_parentheses
1022
+ IndentationWidth:
1023
+
1024
+ Style/FlipFlop:
1025
+ Description: Checks for flip flops
1026
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
1027
+ Enabled: true
1028
+
1029
+ Style/For:
1030
+ Description: Checks use of for or each in multiline loops.
1031
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
1032
+ Enabled: true
1033
+ EnforcedStyle: each
1034
+ SupportedStyles:
1035
+ - for
1036
+ - each
1037
+
1038
+ Style/FormatString:
1039
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
1040
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
1041
+ Enabled: true
1042
+ EnforcedStyle: format
1043
+ SupportedStyles:
1044
+ - format
1045
+ - sprintf
1046
+ - percent
1047
+
1048
+ # Supports --auto-correct
1049
+ Style/FrozenStringLiteralComment:
1050
+ Description: Add the frozen_string_literal comment to the top of files to help transition
1051
+ from Ruby 2.3.0 to Ruby 3.0.
1052
+ Enabled: true
1053
+ EnforcedStyle: when_needed
1054
+ SupportedStyles:
1055
+ - when_needed
1056
+ - always
1057
+
1058
+ Style/GlobalVars:
1059
+ Description: Do not introduce global variables.
1060
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
1061
+ Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html
1062
+ Enabled: true
1063
+ AllowedVariables: []
1064
+
1065
+ Style/GuardClause:
1066
+ Description: Check for conditionals that can be replaced with guard clauses
1067
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
1068
+ Enabled: true
1069
+ MinBodyLength: 1
1070
+
1071
+ # Supports --auto-correct
1072
+ Style/HashSyntax:
1073
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1,
1074
+ :b => 2 }.'
1075
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
1076
+ Enabled: true
1077
+ EnforcedStyle: ruby19
1078
+ SupportedStyles:
1079
+ - ruby19
1080
+ - ruby19_no_mixed_keys
1081
+ - hash_rockets
1082
+ UseHashRocketsWithSymbolValues: false
1083
+
1084
+ Style/IdenticalConditionalBranches:
1085
+ Description: Checks that conditional statements do not have an identical line at the
1086
+ end of each branch, which can validly be moved out of the conditional.
1087
+ Enabled: true
1088
+
1089
+ Style/IfInsideElse:
1090
+ Description: Finds if nodes inside else, which can be converted to elsif.
1091
+ Enabled: true
1092
+
1093
+ # Supports --auto-correct
1094
+ Style/IfUnlessModifier:
1095
+ Description: Favor modifier if/unless usage when you have a single-line body.
1096
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
1097
+ Enabled: true
1098
+
1099
+ Style/IfWithSemicolon:
1100
+ Description: Do not use if x; .... Use the ternary operator instead.
1101
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
1102
+ Enabled: true
1103
+
1104
+ # Supports --auto-correct
1105
+ Layout/IndentArray:
1106
+ Description: Checks the indentation of the first element in an array literal.
1107
+ Enabled: true
1108
+ EnforcedStyle: special_inside_parentheses
1109
+ SupportedStyles:
1110
+ - special_inside_parentheses
1111
+ - consistent
1112
+ - align_brackets
1113
+ IndentationWidth:
1114
+
1115
+ # Supports --auto-correct
1116
+ Layout/IndentAssignment:
1117
+ Description: Checks the indentation of the first line of the right-hand-side of a
1118
+ multi-line assignment.
1119
+ Enabled: true
1120
+ IndentationWidth:
1121
+
1122
+ # Supports --auto-correct
1123
+ Layout/IndentHash:
1124
+ Description: Checks the indentation of the first key in a hash literal.
1125
+ Enabled: true
1126
+ EnforcedStyle: special_inside_parentheses
1127
+ SupportedStyles:
1128
+ - special_inside_parentheses
1129
+ - consistent
1130
+ - align_braces
1131
+ IndentationWidth:
1132
+
1133
+ # Supports --auto-correct
1134
+ Layout/IndentationConsistency:
1135
+ Description: Keep indentation straight.
1136
+ Enabled: true
1137
+ EnforcedStyle: normal
1138
+ SupportedStyles:
1139
+ - normal
1140
+ - rails
1141
+
1142
+ # Supports --auto-correct
1143
+ Layout/IndentationWidth:
1144
+ Description: Use 2 spaces for indentation.
1145
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
1146
+ Enabled: true
1147
+ Width: 2
1148
+
1149
+ # Supports --auto-correct
1150
+ Style/InfiniteLoop:
1151
+ Description: Use Kernel#loop for infinite loops.
1152
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
1153
+ Enabled: true
1154
+
1155
+ # Supports --auto-correct
1156
+ Layout/InitialIndentation:
1157
+ Description: Checks the indentation of the first non-blank non-comment line in a file.
1158
+ Enabled: true
1159
+
1160
+ Style/InlineComment:
1161
+ Description: Avoid inline comments.
1162
+ Enabled: false
1163
+
1164
+ # Supports --auto-correct
1165
+ Style/Lambda:
1166
+ Description: Use the new lambda literal syntax for single-line blocks.
1167
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
1168
+ Enabled: true
1169
+
1170
+ # Supports --auto-correct
1171
+ Style/LambdaCall:
1172
+ Description: Use lambda.call(...) instead of lambda.(...).
1173
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
1174
+ Enabled: true
1175
+ EnforcedStyle: call
1176
+ SupportedStyles:
1177
+ - call
1178
+ - braces
1179
+
1180
+ # Supports --auto-correct
1181
+ Layout/LeadingCommentSpace:
1182
+ Description: Comments should start with a space.
1183
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
1184
+ Enabled: true
1185
+
1186
+ # Supports --auto-correct
1187
+ Style/LineEndConcatenation:
1188
+ Description: Use \ instead of + or << to concatenate two string literals at line end.
1189
+ Enabled: true
1190
+
1191
+ # Supports --auto-correct
1192
+ Style/MethodCallWithoutArgsParentheses:
1193
+ Description: Do not use parentheses for method calls with no arguments.
1194
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
1195
+ Enabled: true
1196
+
1197
+ Style/MethodCalledOnDoEndBlock:
1198
+ Description: Avoid chaining a method call on a do...end block.
1199
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
1200
+ Enabled: false
1201
+
1202
+ # Supports --auto-correct
1203
+ Style/MethodDefParentheses:
1204
+ Description: Checks if the method definitions have or don't have parentheses.
1205
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
1206
+ Enabled: true
1207
+ EnforcedStyle: require_parentheses
1208
+ SupportedStyles:
1209
+ - require_parentheses
1210
+ - require_no_parentheses
1211
+ - require_no_parentheses_except_multiline
1212
+
1213
+ Naming/MethodName:
1214
+ Description: Use the configured style when naming methods.
1215
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
1216
+ Enabled: true
1217
+ EnforcedStyle: snake_case
1218
+ SupportedStyles:
1219
+ - snake_case
1220
+ - camelCase
1221
+
1222
+ Style/MissingElse:
1223
+ Description: Require if/case expressions to have an else branches. If enabled, it
1224
+ is recommended that Style/UnlessElse and Style/EmptyElse be enabled. This will conflict
1225
+ with Style/EmptyElse if Style/EmptyElse is configured to style "both"
1226
+ Enabled: false
1227
+ EnforcedStyle: both
1228
+ SupportedStyles:
1229
+ - if
1230
+ - case
1231
+ - both
1232
+
1233
+ Style/ModuleFunction:
1234
+ Description: Checks for usage of `extend self` in modules.
1235
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
1236
+ Enabled: true
1237
+
1238
+ # Supports --auto-correct
1239
+ Layout/MultilineArrayBraceLayout:
1240
+ Description: Checks that the closing brace in an array literal is symmetrical with
1241
+ respect to the opening brace and the array elements.
1242
+ Enabled: false
1243
+
1244
+ # Supports --auto-correct
1245
+ Layout/MultilineAssignmentLayout:
1246
+ Description: Check for a newline after the assignment operator in multi-line assignments.
1247
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-conditional-assignment
1248
+ Enabled: false
1249
+ SupportedTypes:
1250
+ - block
1251
+ - case
1252
+ - class
1253
+ - if
1254
+ - kwbegin
1255
+ - module
1256
+ EnforcedStyle: new_line
1257
+ SupportedStyles:
1258
+ - same_line
1259
+ - new_line
1260
+
1261
+ Style/MultilineBlockChain:
1262
+ Description: Avoid multi-line chains of blocks.
1263
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
1264
+ Enabled: true
1265
+
1266
+ # Supports --auto-correct
1267
+ Layout/MultilineBlockLayout:
1268
+ Description: Ensures newlines after multiline block do statements.
1269
+ Enabled: true
1270
+
1271
+ # Supports --auto-correct
1272
+ Style/MultilineIfThen:
1273
+ Description: Do not use then for multi-line if/unless.
1274
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
1275
+ Enabled: true
1276
+
1277
+ # Supports --auto-correct
1278
+ Layout/MultilineMethodCallIndentation:
1279
+ Description: Checks indentation of method calls with the dot operator that span more
1280
+ than one line.
1281
+ Enabled: true
1282
+ EnforcedStyle: aligned
1283
+ SupportedStyles:
1284
+ - aligned
1285
+ - indented
1286
+ IndentationWidth:
1287
+
1288
+ # Supports --auto-correct
1289
+ Layout/MultilineOperationIndentation:
1290
+ Description: Checks indentation of binary operations that span more than one line.
1291
+ Enabled: true
1292
+ EnforcedStyle: aligned
1293
+ SupportedStyles:
1294
+ - aligned
1295
+ - indented
1296
+ IndentationWidth:
1297
+
1298
+ Style/MultilineTernaryOperator:
1299
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
1300
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
1301
+ Enabled: true
1302
+
1303
+ # Supports --auto-correct
1304
+ Style/MutableConstant:
1305
+ Description: Do not assign mutable objects to constants.
1306
+ Enabled: true
1307
+
1308
+ # Supports --auto-correct
1309
+ Style/NegatedIf:
1310
+ Description: Favor unless over if for negative conditions (or control flow or).
1311
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
1312
+ Enabled: true
1313
+
1314
+ # Supports --auto-correct
1315
+ Style/NegatedWhile:
1316
+ Description: Favor until over while for negative conditions.
1317
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
1318
+ Enabled: true
1319
+
1320
+ # Supports --auto-correct
1321
+ Style/NestedModifier:
1322
+ Description: Avoid using nested modifiers.
1323
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers
1324
+ Enabled: true
1325
+
1326
+ Style/NestedParenthesizedCalls:
1327
+ Description: Parenthesize method calls which are nested inside the argument list of
1328
+ another parenthesized method call.
1329
+ Enabled: true
1330
+
1331
+ Style/NestedTernaryOperator:
1332
+ Description: Use one expression per branch in a ternary operator.
1333
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
1334
+ Enabled: true
1335
+
1336
+ # Supports --auto-correct
1337
+ Style/Next:
1338
+ Description: Use `next` to skip iteration instead of a condition at the end.
1339
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
1340
+ Enabled: true
1341
+ EnforcedStyle: skip_modifier_ifs
1342
+ MinBodyLength: 3
1343
+ SupportedStyles:
1344
+ - skip_modifier_ifs
1345
+ - always
1346
+
1347
+ # Supports --auto-correct
1348
+ Style/NilComparison:
1349
+ Description: Prefer x.nil? to x == nil.
1350
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
1351
+ Enabled: true
1352
+
1353
+ # Supports --auto-correct
1354
+ Style/NonNilCheck:
1355
+ Description: Checks for redundant nil checks.
1356
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
1357
+ Enabled: true
1358
+ IncludeSemanticChanges: false
1359
+
1360
+ # Supports --auto-correct
1361
+ Style/Not:
1362
+ Description: Use ! instead of not.
1363
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
1364
+ Enabled: true
1365
+
1366
+ # Supports --auto-correct
1367
+ Style/NumericLiterals:
1368
+ Description: Add underscores to large numeric literals to improve their readability.
1369
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
1370
+ Enabled: true
1371
+ MinDigits: 7
1372
+
1373
+ Style/OneLineConditional:
1374
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
1375
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
1376
+ Enabled: true
1377
+
1378
+ Naming/BinaryOperatorParameterName:
1379
+ Description: When defining binary operators, name the argument other.
1380
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
1381
+ Enabled: true
1382
+
1383
+ Style/OptionHash:
1384
+ Description: Don't use option hashes when you can use keyword arguments.
1385
+ Enabled: false
1386
+ SuspiciousParamNames:
1387
+ - options
1388
+ - opts
1389
+ - args
1390
+ - params
1391
+ - parameters
1392
+
1393
+ Style/OptionalArguments:
1394
+ Description: Checks for optional arguments that do not appear at the end of the argument
1395
+ list
1396
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#optional-arguments
1397
+ Enabled: true
1398
+
1399
+ # Supports --auto-correct
1400
+ Style/ParallelAssignment:
1401
+ Description: Check for simple usages of parallel assignment. It will only warn when
1402
+ the number of variables matches on both sides of the assignment.
1403
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parallel-assignment
1404
+ Enabled: true
1405
+
1406
+ # Supports --auto-correct
1407
+ Style/ParenthesesAroundCondition:
1408
+ Description: Don't use parentheses around the condition of an if/unless/while.
1409
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
1410
+ Enabled: true
1411
+ AllowSafeAssignment: true
1412
+
1413
+ # Supports --auto-correct
1414
+ Style/PercentLiteralDelimiters:
1415
+ Description: Use `%`-literal delimiters consistently
1416
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
1417
+ Enabled: true
1418
+ PreferredDelimiters:
1419
+ "%": "[]"
1420
+ "%i": "[]"
1421
+ "%q": "[]"
1422
+ "%Q": "[]"
1423
+ "%r": "{}"
1424
+ "%s": "[]"
1425
+ "%w": "[]"
1426
+ "%W": "[]"
1427
+ "%x": "[]"
1428
+
1429
+ # Supports --auto-correct
1430
+ Style/PercentQLiterals:
1431
+ Description: Checks if uses of %Q/%q match the configured preference.
1432
+ Enabled: true
1433
+ EnforcedStyle: lower_case_q
1434
+ SupportedStyles:
1435
+ - lower_case_q
1436
+ - upper_case_q
1437
+
1438
+ # Supports --auto-correct
1439
+ Style/PerlBackrefs:
1440
+ Description: Avoid Perl-style regex back references.
1441
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
1442
+ Enabled: true
1443
+
1444
+ Naming/PredicateName:
1445
+ Description: Check the names of predicate methods.
1446
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
1447
+ Enabled: true
1448
+ NamePrefix:
1449
+ - is_
1450
+ - has_
1451
+ - have_
1452
+ NamePrefixBlacklist:
1453
+ - is_
1454
+ - has_
1455
+ - have_
1456
+ NameWhitelist:
1457
+ - is_a?
1458
+
1459
+ # Supports --auto-correct
1460
+ Style/Proc:
1461
+ Description: Use proc instead of Proc.new.
1462
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
1463
+ Enabled: true
1464
+
1465
+ Style/RaiseArgs:
1466
+ Description: Checks the arguments passed to raise/fail.
1467
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
1468
+ Enabled: true
1469
+ EnforcedStyle: exploded
1470
+ SupportedStyles:
1471
+ - compact
1472
+ - exploded
1473
+
1474
+ # Supports --auto-correct
1475
+ Style/RedundantBegin:
1476
+ Description: Don't use begin blocks when they are not needed.
1477
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
1478
+ Enabled: true
1479
+
1480
+ # Supports --auto-correct
1481
+ Style/RedundantException:
1482
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
1483
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
1484
+ Enabled: true
1485
+
1486
+ # Supports --auto-correct
1487
+ Style/RedundantFreeze:
1488
+ Description: Checks usages of Object#freeze on immutable objects.
1489
+ Enabled: false
1490
+
1491
+ # Supports --auto-correct
1492
+ Style/RedundantParentheses:
1493
+ Description: Checks for parentheses that seem not to serve any purpose.
1494
+ Enabled: true
1495
+
1496
+ # Supports --auto-correct
1497
+ Style/RedundantReturn:
1498
+ Description: Don't use return where it's not required.
1499
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
1500
+ Enabled: true
1501
+ AllowMultipleReturnValues: false
1502
+
1503
+ # Supports --auto-correct
1504
+ Style/RedundantSelf:
1505
+ Description: Don't use self where it's not needed.
1506
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
1507
+ Enabled: true
1508
+
1509
+ # Supports --auto-correct
1510
+ Style/RegexpLiteral:
1511
+ Description: Use / or %r around regular expressions.
1512
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
1513
+ Enabled: true
1514
+ EnforcedStyle: slashes
1515
+ SupportedStyles:
1516
+ - slashes
1517
+ - percent_r
1518
+ - mixed
1519
+ AllowInnerSlashes: false
1520
+
1521
+ # Supports --auto-correct
1522
+ Layout/RescueEnsureAlignment:
1523
+ Description: Align rescues and ensures correctly.
1524
+ Enabled: true
1525
+
1526
+ # Supports --auto-correct
1527
+ Style/RescueModifier:
1528
+ Description: Avoid using rescue in its modifier form.
1529
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
1530
+ Enabled: true
1531
+
1532
+ # Supports --auto-correct
1533
+ Style/SelfAssignment:
1534
+ Description: Checks for places where self-assignment shorthand should have been used.
1535
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
1536
+ Enabled: true
1537
+
1538
+ # Supports --auto-correct
1539
+ Style/Semicolon:
1540
+ Description: Don't use semicolons to terminate expressions.
1541
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
1542
+ Enabled: true
1543
+ AllowAsExpressionSeparator: false
1544
+
1545
+ Style/Send:
1546
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
1547
+ may overlap with existing methods.
1548
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
1549
+ Enabled: false
1550
+
1551
+ # Supports --auto-correct
1552
+ Style/SignalException:
1553
+ Description: Checks for proper usage of fail and raise.
1554
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
1555
+ Enabled: true
1556
+ EnforcedStyle: semantic
1557
+ SupportedStyles:
1558
+ - only_raise
1559
+ - only_fail
1560
+ - semantic
1561
+
1562
+ Style/SingleLineBlockParams:
1563
+ Description: Enforces the names of some block params.
1564
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
1565
+ Enabled: true
1566
+ Methods:
1567
+ - reduce:
1568
+ - a
1569
+ - e
1570
+ - inject:
1571
+ - a
1572
+ - e
1573
+
1574
+ # Supports --auto-correct
1575
+ Style/SingleLineMethods:
1576
+ Description: Avoid single-line methods.
1577
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
1578
+ Enabled: true
1579
+ AllowIfMethodIsEmpty: true
1580
+
1581
+ # Supports --auto-correct
1582
+ Layout/SpaceAfterColon:
1583
+ Description: Use spaces after colons.
1584
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
1585
+ Enabled: true
1586
+
1587
+ # Supports --auto-correct
1588
+ Layout/SpaceAfterComma:
1589
+ Description: Use spaces after commas.
1590
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
1591
+ Enabled: true
1592
+
1593
+ # Supports --auto-correct
1594
+ Layout/SpaceAroundKeyword:
1595
+ Description: Use spaces after if/elsif/unless/while/until/case/when.
1596
+ Enabled: true
1597
+
1598
+ # Supports --auto-correct
1599
+ Layout/SpaceAfterMethodName:
1600
+ Description: Do not put a space between a method name and the opening parenthesis
1601
+ in a method definition.
1602
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
1603
+ Enabled: true
1604
+
1605
+ # Supports --auto-correct
1606
+ Layout/SpaceAfterNot:
1607
+ Description: Tracks redundant space after the ! operator.
1608
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
1609
+ Enabled: true
1610
+
1611
+ # Supports --auto-correct
1612
+ Layout/SpaceAfterSemicolon:
1613
+ Description: Use spaces after semicolons.
1614
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
1615
+ Enabled: true
1616
+
1617
+ # Supports --auto-correct
1618
+ Layout/SpaceAroundBlockParameters:
1619
+ Description: Checks the spacing inside and after block parameters pipes.
1620
+ Enabled: true
1621
+ EnforcedStyleInsidePipes: no_space
1622
+
1623
+ # Supports --auto-correct
1624
+ Layout/SpaceAroundEqualsInParameterDefault:
1625
+ Description: Checks that the equals signs in parameter default assignments have or
1626
+ don't have surrounding space depending on configuration.
1627
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
1628
+ Enabled: true
1629
+ EnforcedStyle: space
1630
+
1631
+ # Supports --auto-correct
1632
+ Layout/SpaceAroundOperators:
1633
+ Description: Use a single space around operators.
1634
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
1635
+ Enabled: true
1636
+ AllowForAlignment: true
1637
+
1638
+ # Supports --auto-correct
1639
+ Layout/SpaceBeforeBlockBraces:
1640
+ Description: Checks that the left block brace has or doesn't have space before it.
1641
+ Enabled: true
1642
+ EnforcedStyle: space
1643
+ SupportedStyles:
1644
+ - space
1645
+ - no_space
1646
+
1647
+ # Supports --auto-correct
1648
+ Layout/SpaceBeforeComma:
1649
+ Description: No spaces before commas.
1650
+ Enabled: true
1651
+
1652
+ # Supports --auto-correct
1653
+ Layout/SpaceBeforeComment:
1654
+ Description: Checks for missing space between code and a comment on the same line.
1655
+ Enabled: true
1656
+
1657
+ # Supports --auto-correct
1658
+ Layout/SpaceBeforeFirstArg:
1659
+ Description: Checks that exactly one space is used between a method name and the first
1660
+ argument for method calls without parentheses.
1661
+ Enabled: true
1662
+ AllowForAlignment: true
1663
+
1664
+ # Supports --auto-correct
1665
+ Layout/SpaceBeforeSemicolon:
1666
+ Description: No spaces before semicolons.
1667
+ Enabled: true
1668
+
1669
+ # Supports --auto-correct
1670
+ Layout/SpaceInsideBlockBraces:
1671
+ Description: Checks that block braces have or don't have surrounding space. For blocks
1672
+ taking parameters, checks that the left brace has or doesn't have trailing space.
1673
+ Enabled: true
1674
+ EnforcedStyle: space
1675
+ SupportedStyles:
1676
+ - space
1677
+ - no_space
1678
+ EnforcedStyleForEmptyBraces: no_space
1679
+ SpaceBeforeBlockParameters: true
1680
+
1681
+ # Supports --auto-correct
1682
+ Layout/SpaceInsideHashLiteralBraces:
1683
+ Description: Use spaces inside hash literal braces - or don't.
1684
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
1685
+ Enabled: true
1686
+ EnforcedStyle: space
1687
+ EnforcedStyleForEmptyBraces: no_space
1688
+ SupportedStyles:
1689
+ - space
1690
+ - no_space
1691
+
1692
+ # Supports --auto-correct
1693
+ Layout/SpaceInsideParens:
1694
+ Description: No spaces after ( or before ).
1695
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
1696
+ Enabled: true
1697
+
1698
+ # Supports --auto-correct
1699
+ Layout/SpaceInsideRangeLiteral:
1700
+ Description: No spaces inside range literals.
1701
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
1702
+ Enabled: true
1703
+
1704
+ # Supports --auto-correct
1705
+ Layout/SpaceInsideStringInterpolation:
1706
+ Description: Checks for padding/surrounding spaces inside string interpolation.
1707
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
1708
+ Enabled: true
1709
+ EnforcedStyle: no_space
1710
+ SupportedStyles:
1711
+ - space
1712
+ - no_space
1713
+
1714
+ # Supports --auto-correct
1715
+ Style/SpecialGlobalVars:
1716
+ Description: Avoid Perl-style global variables.
1717
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
1718
+ Enabled: true
1719
+ EnforcedStyle: use_english_names
1720
+ SupportedStyles:
1721
+ - use_perl_names
1722
+ - use_english_names
1723
+
1724
+ # Supports --auto-correct
1725
+ Style/StabbyLambdaParentheses:
1726
+ Description: Check for the usage of parentheses around stabby lambda arguments.
1727
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args
1728
+ Enabled: true
1729
+ EnforcedStyle: require_parentheses
1730
+ SupportedStyles:
1731
+ - require_parentheses
1732
+ - require_no_parentheses
1733
+
1734
+ # Supports --auto-correct
1735
+ Style/StringLiterals:
1736
+ Description: Checks if uses of quotes match the configured preference.
1737
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
1738
+ Enabled: true
1739
+ EnforcedStyle: single_quotes
1740
+ SupportedStyles:
1741
+ - single_quotes
1742
+ - double_quotes
1743
+ ConsistentQuotesInMultiline: false
1744
+
1745
+ # Supports --auto-correct
1746
+ Style/StringLiteralsInInterpolation:
1747
+ Description: Checks if uses of quotes inside expressions in interpolated strings match
1748
+ the configured preference.
1749
+ Enabled: true
1750
+ EnforcedStyle: single_quotes
1751
+ SupportedStyles:
1752
+ - single_quotes
1753
+ - double_quotes
1754
+
1755
+ # Supports --auto-correct
1756
+ Style/StringMethods:
1757
+ Description: Checks if configured preferred methods are used over non-preferred.
1758
+ Enabled: false
1759
+ PreferredMethods:
1760
+ intern: to_sym
1761
+
1762
+ Style/StructInheritance:
1763
+ Description: Checks for inheritance from Struct.new.
1764
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
1765
+ Enabled: true
1766
+
1767
+ # Supports --auto-correct
1768
+ Style/SymbolArray:
1769
+ Description: Use %i or %I for arrays of symbols.
1770
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
1771
+ Enabled: false
1772
+ EnforcedStyle: percent
1773
+ SupportedStyles:
1774
+ - percent
1775
+ - brackets
1776
+
1777
+ # Supports --auto-correct
1778
+ Style/SymbolLiteral:
1779
+ Description: Use plain symbols instead of string symbols when possible.
1780
+ Enabled: true
1781
+
1782
+ # Supports --auto-correct
1783
+ Style/SymbolProc:
1784
+ Description: Use symbols as procs instead of blocks when possible.
1785
+ Enabled: true
1786
+ IgnoredMethods:
1787
+ - respond_to
1788
+
1789
+ # Supports --auto-correct
1790
+ Layout/Tab:
1791
+ Description: No hard tabs.
1792
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
1793
+ Enabled: true
1794
+
1795
+ # Supports --auto-correct
1796
+ Layout/TrailingBlankLines:
1797
+ Description: Checks trailing blank lines and final newline.
1798
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
1799
+ Enabled: true
1800
+ EnforcedStyle: final_newline
1801
+ SupportedStyles:
1802
+ - final_newline
1803
+ - final_blank_line
1804
+
1805
+ # Supports --auto-correct
1806
+ Style/TrailingCommaInArguments:
1807
+ Description: Checks for trailing comma in argument lists.
1808
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
1809
+ Enabled: true
1810
+ EnforcedStyleForMultiline: no_comma
1811
+
1812
+ # Supports --auto-correct
1813
+ Style/TrailingCommaInLiteral:
1814
+ Description: Checks for trailing comma in array and hash literals.
1815
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
1816
+ Enabled: true
1817
+ EnforcedStyleForMultiline: no_comma
1818
+
1819
+ # Supports --auto-correct
1820
+ Style/TrailingUnderscoreVariable:
1821
+ Description: Checks for the usage of unneeded trailing underscores at the end of parallel
1822
+ variable assignment.
1823
+ AllowNamedUnderscoreVariables: true
1824
+ Enabled: true
1825
+
1826
+ # Supports --auto-correct
1827
+ Layout/TrailingWhitespace:
1828
+ Description: Avoid trailing whitespace.
1829
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
1830
+ Enabled: true
1831
+
1832
+ # Supports --auto-correct
1833
+ Style/TrivialAccessors:
1834
+ Description: Prefer attr_* methods to trivial readers/writers.
1835
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
1836
+ Enabled: true
1837
+ ExactNameMatch: true
1838
+ AllowPredicates: false
1839
+ AllowDSLWriters: false
1840
+ IgnoreClassMethods: false
1841
+ Whitelist:
1842
+ - to_ary
1843
+ - to_a
1844
+ - to_c
1845
+ - to_enum
1846
+ - to_h
1847
+ - to_hash
1848
+ - to_i
1849
+ - to_int
1850
+ - to_io
1851
+ - to_open
1852
+ - to_path
1853
+ - to_proc
1854
+ - to_r
1855
+ - to_regexp
1856
+ - to_str
1857
+ - to_s
1858
+ - to_sym
1859
+
1860
+ Style/UnlessElse:
1861
+ Description: Do not use unless with else. Rewrite these with the positive case first.
1862
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
1863
+ Enabled: true
1864
+
1865
+ # Supports --auto-correct
1866
+ Style/UnneededCapitalW:
1867
+ Description: Checks for %W when interpolation is not needed.
1868
+ Enabled: true
1869
+
1870
+ # Supports --auto-correct
1871
+ Style/UnneededInterpolation:
1872
+ Description: Checks for strings that are just an interpolated expression.
1873
+ Enabled: true
1874
+
1875
+ # Supports --auto-correct
1876
+ Style/UnneededPercentQ:
1877
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
1878
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
1879
+ Enabled: true
1880
+
1881
+ # Supports --auto-correct
1882
+ Style/VariableInterpolation:
1883
+ Description: Don't interpolate global, instance and class variables directly in strings.
1884
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
1885
+ Enabled: true
1886
+
1887
+ Naming/VariableName:
1888
+ Description: Use the configured style when naming variables.
1889
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
1890
+ Enabled: true
1891
+ EnforcedStyle: snake_case
1892
+ SupportedStyles:
1893
+ - snake_case
1894
+ - camelCase
1895
+
1896
+ # Supports --auto-correct
1897
+ Style/WhenThen:
1898
+ Description: Use when x then ... for one-line cases.
1899
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
1900
+ Enabled: true
1901
+
1902
+ # Supports --auto-correct
1903
+ Style/WhileUntilDo:
1904
+ Description: Checks for redundant do after while or until.
1905
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
1906
+ Enabled: true
1907
+
1908
+ # Supports --auto-correct
1909
+ Style/WhileUntilModifier:
1910
+ Description: Favor modifier while/until usage when you have a single-line body.
1911
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
1912
+ Enabled: true
1913
+
1914
+ # Supports --auto-correct
1915
+ Style/WordArray:
1916
+ Description: Use %w or %W for arrays of words.
1917
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
1918
+ Enabled: true
1919
+ EnforcedStyle: percent
1920
+ SupportedStyles:
1921
+ - percent
1922
+ - brackets
1923
+ MinSize: 0
1924
+ WordRegex: !ruby/regexp /\A[\p{Word}\n\t]+\z/
1925
+
1926
+ Metrics/MethodLength:
1927
+ Max: 30
1928
+
1929
+ Metrics/LineLength:
1930
+ Max: 200
1931
+
1932
+ Style/NumericLiterals:
1933
+ MinDigits: 7
1934
+
1935
+ Metrics/ModuleLength:
1936
+ CountComments: false
1937
+ Max: 300