deep_pluck 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5077b048b97b1e7e457fc7a7e86c4482ada1633c
4
- data.tar.gz: 5a2c2cc80f8e0a30aa9013c1081650a7c092ad74
3
+ metadata.gz: 19d462353caa430573529609f5761ee472a5f19d
4
+ data.tar.gz: 05d5b136c5018928378669da37fc7eddd8ce3686
5
5
  SHA512:
6
- metadata.gz: 217a43b1ac213499fc6138723a103e373c777e39adc9e3c61cca2ba51e578477e9084da2238ed8bcc49bdfcf3423c953aebf8d31cd46078adcf49127e0078ffa
7
- data.tar.gz: ff5b2657d14cdadb7e3d2844d394c77c815253fcc21bbfde4d0df786356db92ed5e2ebcd498ad3e2d23e14898f117ade0d2ce08ac819ac499b1365331cf2ad8a
6
+ metadata.gz: af0a2b2cec4422dc4471c7e8a08057889c042c18d246f923f8d8864a34c8816fb58b02359790aa536acf9c0a2887bf4a14f6fce262ecd17d3850602d661fa611
7
+ data.tar.gz: 64acd5ce3393d4d7d9d2055266826ab9e06e4888a8f4f84d558b7299f2dc8f8ece40df57491e81c392da1bb05eff219d74ed86ec41ffff7eb2e5db8ab3334910
@@ -0,0 +1,1193 @@
1
+ AllCops:
2
+ DisabledByDefault: true
3
+ Exclude:
4
+
5
+ #################### Lint ################################
6
+
7
+ Lint/AmbiguousOperator:
8
+ Description: >-
9
+ Checks for ambiguous operators in the first argument of a
10
+ method invocation without parentheses.
11
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
12
+ Enabled: true
13
+
14
+ Lint/AmbiguousRegexpLiteral:
15
+ Description: >-
16
+ Checks for ambiguous regexp literals in the first argument of
17
+ a method invocation without parenthesis.
18
+ Enabled: true
19
+
20
+ Lint/AssignmentInCondition:
21
+ Description: "Don't use assignment in conditions."
22
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
23
+ Enabled: true
24
+
25
+ Lint/BlockAlignment:
26
+ Description: 'Align block ends correctly.'
27
+ Enabled: true
28
+
29
+ Lint/CircularArgumentReference:
30
+ Description: "Don't refer to the keyword argument in the default value."
31
+ Enabled: true
32
+
33
+ Lint/ConditionPosition:
34
+ Description: >-
35
+ Checks for condition placed in a confusing position relative to
36
+ the keyword.
37
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
38
+ Enabled: true
39
+
40
+ Lint/Debugger:
41
+ Description: 'Check for debugger calls.'
42
+ Enabled: true
43
+
44
+ Lint/DefEndAlignment:
45
+ Description: 'Align ends corresponding to defs correctly.'
46
+ Enabled: true
47
+
48
+ Lint/DeprecatedClassMethods:
49
+ Description: 'Check for deprecated class method calls.'
50
+ Enabled: true
51
+
52
+ Lint/DuplicateMethods:
53
+ Description: 'Check for duplicate methods calls.'
54
+ Enabled: true
55
+
56
+ Lint/EachWithObjectArgument:
57
+ Description: 'Check for immutable argument given to each_with_object.'
58
+ Enabled: true
59
+
60
+ Lint/ElseLayout:
61
+ Description: 'Check for odd code arrangement in an else block.'
62
+ Enabled: true
63
+
64
+ Lint/EmptyEnsure:
65
+ Description: 'Checks for empty ensure block.'
66
+ Enabled: true
67
+
68
+ Lint/EmptyInterpolation:
69
+ Description: 'Checks for empty string interpolation.'
70
+ Enabled: true
71
+
72
+ Lint/EndAlignment:
73
+ Description: 'Align ends correctly.'
74
+ Enabled: true
75
+
76
+ Lint/EndInMethod:
77
+ Description: 'END blocks should not be placed inside method definitions.'
78
+ Enabled: true
79
+
80
+ Lint/EnsureReturn:
81
+ Description: 'Do not use return in an ensure block.'
82
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
83
+ Enabled: true
84
+
85
+ Security/Eval:
86
+ Description: 'The use of eval represents a serious security risk.'
87
+ Enabled: true
88
+
89
+ Lint/FormatParameterMismatch:
90
+ Description: 'The number of parameters to format/sprint must match the fields.'
91
+ Enabled: true
92
+
93
+ Lint/HandleExceptions:
94
+ Description: "Don't suppress exception."
95
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
96
+ Enabled: true
97
+
98
+ Lint/LiteralInInterpolation:
99
+ Description: 'Checks for literals used in interpolation.'
100
+ Enabled: true
101
+
102
+ Lint/Loop:
103
+ Description: >-
104
+ Use Kernel#loop with break rather than begin/end/until or
105
+ begin/end/while for post-loop tests.
106
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
107
+ Enabled: true
108
+
109
+ Lint/NestedMethodDefinition:
110
+ Description: 'Do not use nested method definitions.'
111
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
112
+ Enabled: true
113
+
114
+ Lint/NonLocalExitFromIterator:
115
+ Description: 'Do not use return in iterator to cause non-local exit.'
116
+ Enabled: true
117
+
118
+ Lint/ParenthesesAsGroupedExpression:
119
+ Description: >-
120
+ Checks for method calls with a space before the opening
121
+ parenthesis.
122
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
123
+ Enabled: true
124
+
125
+ Lint/RequireParentheses:
126
+ Description: >-
127
+ Use parentheses in the method call to avoid confusion
128
+ about precedence.
129
+ Enabled: true
130
+
131
+ Lint/RescueException:
132
+ Description: 'Avoid rescuing the Exception class.'
133
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
134
+ Enabled: true
135
+
136
+ Lint/ShadowingOuterLocalVariable:
137
+ Description: >-
138
+ Do not use the same name as outer local variable
139
+ for block arguments or block local variables.
140
+ Enabled: true
141
+
142
+ Lint/StringConversionInInterpolation:
143
+ Description: 'Checks for Object#to_s usage in string interpolation.'
144
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
145
+ Enabled: true
146
+
147
+ Lint/UnderscorePrefixedVariableName:
148
+ Description: 'Do not use prefix `_` for a variable that is used.'
149
+ Enabled: true
150
+
151
+ Lint/UnneededDisable:
152
+ Description: >-
153
+ Checks for rubocop:disable comments that can be removed.
154
+ Note: this cop is not disabled when disabling all cops.
155
+ It must be explicitly disabled.
156
+ Enabled: true
157
+
158
+ Lint/UnusedBlockArgument:
159
+ Description: 'Checks for unused block arguments.'
160
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
161
+ Enabled: true
162
+
163
+ Lint/UnusedMethodArgument:
164
+ Description: 'Checks for unused method arguments.'
165
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
166
+ Enabled: true
167
+
168
+ Lint/UnreachableCode:
169
+ Description: 'Unreachable code.'
170
+ Enabled: true
171
+
172
+ Lint/UselessAccessModifier:
173
+ Description: 'Checks for useless access modifiers.'
174
+ Enabled: true
175
+
176
+ Lint/UselessAssignment:
177
+ Description: 'Checks for useless assignment to a local variable.'
178
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
179
+ Enabled: true
180
+
181
+ Lint/UselessComparison:
182
+ Description: 'Checks for comparison of something with itself.'
183
+ Enabled: true
184
+
185
+ Lint/UselessElseWithoutRescue:
186
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
187
+ Enabled: true
188
+
189
+ Lint/UselessSetterCall:
190
+ Description: 'Checks for useless setter call to a local variable.'
191
+ Enabled: true
192
+
193
+ Lint/Void:
194
+ Description: 'Possible use of operator/literal/variable in void context.'
195
+ Enabled: true
196
+
197
+ ###################### Metrics ####################################
198
+
199
+ Metrics/AbcSize:
200
+ Description: >-
201
+ A calculated magnitude based on number of assignments,
202
+ branches, and conditions.
203
+ Reference: 'http://c2.com/cgi/wiki?AbcMetric'
204
+ Enabled: true
205
+ Max: 25
206
+
207
+ Metrics/BlockNesting:
208
+ Description: 'Avoid excessive block nesting'
209
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
210
+ Enabled: true
211
+ Max: 4
212
+
213
+ Metrics/ClassLength:
214
+ Description: 'Avoid classes longer than 250 lines of code.'
215
+ Enabled: true
216
+ Max: 250
217
+
218
+ Metrics/CyclomaticComplexity:
219
+ Description: >-
220
+ A complexity metric that is strongly correlated to the number
221
+ of test cases needed to validate a method.
222
+ Enabled: true
223
+
224
+ Metrics/LineLength:
225
+ Description: 'Limit lines to 120 characters.'
226
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
227
+ Max: 120
228
+ Enabled: true
229
+ Exclude:
230
+ - 'config/locales/**'
231
+
232
+ Metrics/MethodLength:
233
+ Description: 'Avoid methods longer than 30 lines of code.'
234
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
235
+ Enabled: true
236
+ Max: 30
237
+
238
+ Metrics/ModuleLength:
239
+ Description: 'Avoid modules longer than 250 lines of code.'
240
+ Enabled: true
241
+ Max: 250
242
+
243
+ Metrics/ParameterLists:
244
+ Description: 'Avoid parameter lists longer than three or four parameters.'
245
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
246
+ Enabled: true
247
+
248
+ Metrics/PerceivedComplexity:
249
+ Description: >-
250
+ A complexity metric geared towards measuring complexity for a
251
+ human reader.
252
+ Enabled: true
253
+
254
+ ##################### Performance #############################
255
+
256
+ Performance/Count:
257
+ Description: >-
258
+ Use `count` instead of `select...size`, `reject...size`,
259
+ `select...count`, `reject...count`, `select...length`,
260
+ and `reject...length`.
261
+ Enabled: true
262
+
263
+ Performance/Detect:
264
+ Description: >-
265
+ Use `detect` instead of `select.first`, `find_all.first`,
266
+ `select.last`, and `find_all.last`.
267
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
268
+ Enabled: true
269
+
270
+ Performance/FlatMap:
271
+ Description: >-
272
+ Use `Enumerable#flat_map`
273
+ instead of `Enumerable#map...Array#flatten(1)`
274
+ or `Enumberable#collect..Array#flatten(1)`
275
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
276
+ Enabled: true
277
+ EnabledForFlattenWithoutParams: false
278
+ # If enabled, this cop will warn about usages of
279
+ # `flatten` being called without any parameters.
280
+ # This can be dangerous since `flat_map` will only flatten 1 level, and
281
+ # `flatten` without any parameters can flatten multiple levels.
282
+
283
+ Performance/ReverseEach:
284
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
285
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
286
+ Enabled: true
287
+
288
+ Performance/Sample:
289
+ Description: >-
290
+ Use `sample` instead of `shuffle.first`,
291
+ `shuffle.last`, and `shuffle[Fixnum]`.
292
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
293
+ Enabled: true
294
+
295
+ Performance/Size:
296
+ Description: >-
297
+ Use `size` instead of `count` for counting
298
+ the number of elements in `Array` and `Hash`.
299
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
300
+ Enabled: true
301
+
302
+ Performance/StringReplacement:
303
+ Description: >-
304
+ Use `tr` instead of `gsub` when you are replacing the same
305
+ number of characters. Use `delete` instead of `gsub` when
306
+ you are deleting characters.
307
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
308
+ Enabled: true
309
+
310
+ ##################### Rails ##################################
311
+
312
+ Rails/ActionFilter:
313
+ Description: 'Enforces consistent use of action filter methods.'
314
+ Enabled: true
315
+
316
+ Rails/Date:
317
+ Description: >-
318
+ Checks the correct usage of date aware methods,
319
+ such as Date.today, Date.current etc.
320
+ Enabled: true
321
+
322
+ Rails/Delegate:
323
+ Description: 'Prefer delegate method for delegations.'
324
+ Enabled: true
325
+
326
+ Rails/FindBy:
327
+ Description: 'Prefer find_by over where.first.'
328
+ Enabled: true
329
+
330
+ Rails/FindEach:
331
+ Description: 'Prefer all.find_each over all.find.'
332
+ Enabled: true
333
+
334
+ Rails/HasAndBelongsToMany:
335
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
336
+ Enabled: true
337
+
338
+ Rails/Output:
339
+ Description: 'Checks for calls to puts, print, etc.'
340
+ Enabled: true
341
+
342
+ Rails/ReadWriteAttribute:
343
+ Description: >-
344
+ Checks for read_attribute(:attr) and
345
+ write_attribute(:attr, val).
346
+ Enabled: true
347
+
348
+ Rails/ScopeArgs:
349
+ Description: 'Checks the arguments of ActiveRecord scopes.'
350
+ Enabled: true
351
+
352
+ Rails/TimeZone:
353
+ Description: 'Checks the correct usage of time zone aware methods.'
354
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
355
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
356
+ Enabled: true
357
+
358
+ Rails/Validation:
359
+ Description: 'Use validates :attribute, hash of validations.'
360
+ Enabled: true
361
+
362
+ ################## Style #################################
363
+
364
+ Layout/AccessModifierIndentation:
365
+ Description: Check indentation of private/protected visibility modifiers.
366
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
367
+ Enabled: true
368
+
369
+ Naming/AccessorMethodName:
370
+ Description: Check the naming of accessor methods for get_/set_.
371
+ Enabled: false
372
+
373
+ Style/Alias:
374
+ Description: 'Use alias_method instead of alias.'
375
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
376
+ Enabled: true
377
+
378
+ Layout/AlignArray:
379
+ Description: >-
380
+ Align the elements of an array literal if they span more than
381
+ one line.
382
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
383
+ Enabled: true
384
+
385
+ Layout/AlignHash:
386
+ Description: >-
387
+ Align the elements of a hash literal if they span more than
388
+ one line.
389
+ Enabled: true
390
+
391
+ Layout/AlignParameters:
392
+ Description: >-
393
+ Align the parameters of a method call if they span more
394
+ than one line.
395
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
396
+ Enabled: true
397
+
398
+ Style/AndOr:
399
+ Description: 'Use &&/|| instead of and/or.'
400
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
401
+ Enabled: false
402
+
403
+ Style/ArrayJoin:
404
+ Description: 'Use Array#join instead of Array#*.'
405
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
406
+ Enabled: true
407
+
408
+ Style/AsciiComments:
409
+ Description: 'Use only ascii symbols in comments.'
410
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
411
+ Enabled: false
412
+
413
+ Naming/AsciiIdentifiers:
414
+ Description: 'Use only ascii symbols in identifiers.'
415
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
416
+ Enabled: true
417
+
418
+ Style/Attr:
419
+ Description: 'Checks for uses of Module#attr.'
420
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
421
+ Enabled: true
422
+
423
+ Style/BeginBlock:
424
+ Description: 'Avoid the use of BEGIN blocks.'
425
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
426
+ Enabled: true
427
+
428
+ Style/BarePercentLiterals:
429
+ Description: 'Checks if usage of %() or %Q() matches configuration.'
430
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
431
+ Enabled: true
432
+
433
+ Style/BlockComments:
434
+ Description: 'Do not use block comments.'
435
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
436
+ Enabled: true
437
+
438
+ Layout/BlockEndNewline:
439
+ Description: 'Put end statement of multiline block on its own line.'
440
+ Enabled: true
441
+
442
+ Style/BlockDelimiters:
443
+ Description: >-
444
+ Avoid using {...} for multi-line blocks (multiline chaining is
445
+ always ugly).
446
+ Prefer {...} over do...end for single-line blocks.
447
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
448
+ Enabled: true
449
+
450
+ Style/BracesAroundHashParameters:
451
+ Description: 'Enforce braces style around hash parameters.'
452
+ Enabled: true
453
+
454
+ Style/CaseEquality:
455
+ Description: 'Avoid explicit use of the case equality operator(===).'
456
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
457
+ Enabled: true
458
+
459
+ Layout/CaseIndentation:
460
+ Description: 'Indentation of when in a case/when/[else/]end.'
461
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
462
+ Enabled: true
463
+
464
+ Style/CharacterLiteral:
465
+ Description: 'Checks for uses of character literals.'
466
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
467
+ Enabled: true
468
+
469
+ Naming/ClassAndModuleCamelCase:
470
+ Description: 'Use CamelCase for classes and modules.'
471
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
472
+ Enabled: true
473
+
474
+ Style/ClassAndModuleChildren:
475
+ Description: 'Checks style of children classes and modules.'
476
+ Enabled: false
477
+
478
+ Style/ClassCheck:
479
+ Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
480
+ Enabled: true
481
+
482
+ Style/ClassMethods:
483
+ Description: 'Use self when defining module/class methods.'
484
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
485
+ Enabled: true
486
+
487
+ Style/ClassVars:
488
+ Description: 'Avoid the use of class variables.'
489
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
490
+ Enabled: true
491
+
492
+ Layout/ClosingParenthesisIndentation:
493
+ Description: 'Checks the indentation of hanging closing parentheses.'
494
+ Enabled: true
495
+
496
+ Style/ColonMethodCall:
497
+ Description: 'Do not use :: for method call.'
498
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
499
+ Enabled: true
500
+
501
+ Style/CommandLiteral:
502
+ Description: 'Use `` or %x around command literals.'
503
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
504
+ Enabled: true
505
+
506
+ Style/CommentAnnotation:
507
+ Description: 'Checks formatting of annotation comments.'
508
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
509
+ Enabled: true
510
+
511
+ Layout/CommentIndentation:
512
+ Description: 'Indentation of comments.'
513
+ Enabled: true
514
+
515
+ Naming/ConstantName:
516
+ Description: 'Constants should use SCREAMING_SNAKE_CASE.'
517
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
518
+ Enabled: true
519
+
520
+ Style/DefWithParentheses:
521
+ Description: 'Use def with parentheses when there are arguments.'
522
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
523
+ Enabled: true
524
+
525
+ Style/PreferredHashMethods:
526
+ Description: 'Checks for use of deprecated Hash methods.'
527
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
528
+ Enabled: true
529
+
530
+ Style/Documentation:
531
+ Description: 'Document classes and non-namespace modules.'
532
+ Enabled: false
533
+
534
+ Layout/DotPosition:
535
+ Description: 'Checks the position of the dot in multi-line method calls.'
536
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
537
+ Enabled: true
538
+
539
+ Style/DoubleNegation:
540
+ Description: 'Checks for uses of double negation (!!).'
541
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
542
+ Enabled: true
543
+
544
+ Style/EachWithObject:
545
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
546
+ Enabled: true
547
+
548
+ Layout/ElseAlignment:
549
+ Description: 'Align elses and elsifs correctly.'
550
+ Enabled: true
551
+
552
+ Style/EmptyElse:
553
+ Description: 'Avoid empty else-clauses.'
554
+ Enabled: true
555
+
556
+ Layout/EmptyLineBetweenDefs:
557
+ Description: 'Use empty lines between defs.'
558
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
559
+ Enabled: true
560
+
561
+ Layout/EmptyLines:
562
+ Description: "Don't use several empty lines in a row."
563
+ Enabled: true
564
+
565
+ Layout/EmptyLinesAroundAccessModifier:
566
+ Description: "Keep blank lines around access modifiers."
567
+ Enabled: true
568
+
569
+ Layout/EmptyLinesAroundBlockBody:
570
+ Description: "Keeps track of empty lines around block bodies."
571
+ Enabled: true
572
+
573
+ Layout/EmptyLinesAroundClassBody:
574
+ Description: "Keeps track of empty lines around class bodies."
575
+ Enabled: true
576
+
577
+ Layout/EmptyLinesAroundModuleBody:
578
+ Description: "Keeps track of empty lines around module bodies."
579
+ Enabled: true
580
+
581
+ Layout/EmptyLinesAroundMethodBody:
582
+ Description: "Keeps track of empty lines around method bodies."
583
+ Enabled: true
584
+
585
+ Style/EmptyLiteral:
586
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
587
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
588
+ Enabled: true
589
+
590
+ Style/EndBlock:
591
+ Description: 'Avoid the use of END blocks.'
592
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
593
+ Enabled: true
594
+
595
+ Layout/EndOfLine:
596
+ Description: 'Use Unix-style line endings.'
597
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
598
+ Enabled: true
599
+
600
+ Style/EvenOdd:
601
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
602
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
603
+ Enabled: true
604
+
605
+ Layout/ExtraSpacing:
606
+ Description: 'Do not use unnecessary spacing.'
607
+ Enabled: true
608
+
609
+ Naming/FileName:
610
+ Description: 'Use snake_case for source file names.'
611
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
612
+ Enabled: true
613
+
614
+ Layout/InitialIndentation:
615
+ Description: >-
616
+ Checks the indentation of the first non-blank non-comment line in a file.
617
+ Enabled: true
618
+
619
+ Layout/FirstParameterIndentation:
620
+ Description: 'Checks the indentation of the first parameter in a method call.'
621
+ Enabled: true
622
+
623
+ Style/FlipFlop:
624
+ Description: 'Checks for flip flops'
625
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
626
+ Enabled: true
627
+
628
+ Style/For:
629
+ Description: 'Checks use of for or each in multiline loops.'
630
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
631
+ Enabled: true
632
+
633
+ Style/FormatString:
634
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
635
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
636
+ EnforcedStyle: sprintf
637
+ Enabled: true
638
+
639
+ Style/GlobalVars:
640
+ Description: 'Do not introduce global variables.'
641
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
642
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
643
+ Enabled: true
644
+
645
+ Style/GuardClause:
646
+ Description: 'Check for conditionals that can be replaced with guard clauses'
647
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
648
+ Enabled: true
649
+
650
+ Style/HashSyntax:
651
+ Description: >-
652
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
653
+ { :a => 1, :b => 2 }.
654
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
655
+ Enabled: true
656
+
657
+ Style/IfUnlessModifier:
658
+ Description: >-
659
+ Favor modifier if/unless usage when you have a
660
+ single-line body.
661
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
662
+ Enabled: true
663
+
664
+ Style/IfWithSemicolon:
665
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
666
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
667
+ Enabled: true
668
+
669
+ Layout/IndentationConsistency:
670
+ Description: 'Keep indentation straight.'
671
+ Enabled: true
672
+
673
+ Layout/IndentationWidth:
674
+ Description: 'Use 2 spaces for indentation.'
675
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
676
+ Enabled: true
677
+
678
+ Layout/IndentArray:
679
+ Description: >-
680
+ Checks the indentation of the first element in an array
681
+ literal.
682
+ EnforcedStyle: consistent
683
+ Enabled: true
684
+
685
+ Layout/IndentHash:
686
+ Description: 'Checks the indentation of the first key in a hash literal.'
687
+ EnforcedStyle: consistent
688
+ Enabled: true
689
+
690
+ Style/InfiniteLoop:
691
+ Description: 'Use Kernel#loop for infinite loops.'
692
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
693
+ Enabled: true
694
+
695
+ Style/Lambda:
696
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
697
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
698
+ Enabled: true
699
+
700
+ Style/LambdaCall:
701
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
702
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
703
+ Enabled: true
704
+
705
+ Layout/LeadingCommentSpace:
706
+ Description: 'Comments should start with a space.'
707
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
708
+ Enabled: true
709
+
710
+ Style/LineEndConcatenation:
711
+ Description: >-
712
+ Use \ instead of + or << to concatenate two string literals at
713
+ line end.
714
+ Enabled: true
715
+
716
+ Style/MethodCallWithoutArgsParentheses:
717
+ Description: 'Do not use parentheses for method calls with no arguments.'
718
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
719
+ Enabled: true
720
+
721
+ Style/MethodDefParentheses:
722
+ Description: >-
723
+ Checks if the method definitions have or don't have
724
+ parentheses.
725
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
726
+ Enabled: true
727
+
728
+ Naming/MethodName:
729
+ Description: 'Use the configured style when naming methods.'
730
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
731
+ Enabled: true
732
+
733
+ Style/ModuleFunction:
734
+ Description: 'Checks for usage of `extend self` in modules.'
735
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
736
+ Enabled: true
737
+
738
+ Style/MultilineBlockChain:
739
+ Description: 'Avoid multi-line chains of blocks.'
740
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
741
+ Enabled: true
742
+
743
+ Layout/MultilineBlockLayout:
744
+ Description: 'Ensures newlines after multiline block do statements.'
745
+ Enabled: true
746
+
747
+ Style/MultilineIfThen:
748
+ Description: 'Do not use then for multi-line if/unless.'
749
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
750
+ Enabled: true
751
+
752
+ Layout/MultilineOperationIndentation:
753
+ Description: >-
754
+ Checks indentation of binary operations that span more than
755
+ one line.
756
+ Enabled: true
757
+
758
+ Style/MultilineTernaryOperator:
759
+ Description: >-
760
+ Avoid multi-line ?: (the ternary operator);
761
+ use if/unless instead.
762
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
763
+ Enabled: true
764
+
765
+ Style/NegatedIf:
766
+ Description: >-
767
+ Favor unless over if for negative conditions
768
+ (or control flow or).
769
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
770
+ Enabled: false
771
+
772
+ Style/NegatedWhile:
773
+ Description: 'Favor until over while for negative conditions.'
774
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
775
+ Enabled: false
776
+
777
+ Style/NestedTernaryOperator:
778
+ Description: 'Use one expression per branch in a ternary operator.'
779
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
780
+ Enabled: true
781
+
782
+ Style/Next:
783
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
784
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
785
+ Enabled: true
786
+
787
+ Style/NilComparison:
788
+ Description: 'Prefer x.nil? to x == nil.'
789
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
790
+ Enabled: false
791
+
792
+ Style/NonNilCheck:
793
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
794
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
795
+ # **usually** OK, but might change behavior.
796
+ #
797
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
798
+ # offenses for `!x.nil?` and does no changes that might change behavior.
799
+ Description: 'Checks for redundant nil checks.'
800
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
801
+ IncludeSemanticChanges: true
802
+ Enabled: true
803
+
804
+ Style/Not:
805
+ Description: 'Use ! instead of not.'
806
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
807
+ Enabled: false
808
+
809
+ Style/NumericLiterals:
810
+ Description: >-
811
+ Add underscores to large numeric literals to improve their
812
+ readability.
813
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
814
+ Enabled: true
815
+
816
+ Style/OneLineConditional:
817
+ Description: >-
818
+ Favor the ternary operator(?:) over
819
+ if/then/else/end constructs.
820
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
821
+ Enabled: true
822
+
823
+ Naming/BinaryOperatorParameterName:
824
+ Description: 'When defining binary operators, name the argument other.'
825
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
826
+ Enabled: true
827
+
828
+ Style/OptionalArguments:
829
+ Description: >-
830
+ Checks for optional arguments that do not appear at the end
831
+ of the argument list
832
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
833
+ Enabled: true
834
+
835
+ Style/ParallelAssignment:
836
+ Description: >-
837
+ Check for simple usages of parallel assignment.
838
+ It will only warn when the number of variables
839
+ matches on both sides of the assignment.
840
+ This also provides performance benefits
841
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
842
+ Enabled: true
843
+
844
+ Style/ParenthesesAroundCondition:
845
+ Description: >-
846
+ Don't use parentheses around the condition of an
847
+ if/unless/while.
848
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
849
+ Enabled: true
850
+
851
+ Style/PercentLiteralDelimiters:
852
+ Description: 'Use `%`-literal delimiters consistently'
853
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
854
+ Enabled: true
855
+
856
+ Style/PercentQLiterals:
857
+ Description: 'Checks if uses of %Q/%q match the configured preference.'
858
+ Enabled: true
859
+
860
+ Style/PerlBackrefs:
861
+ Description: 'Avoid Perl-style regex back references.'
862
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
863
+ Enabled: true
864
+
865
+ Naming/PredicateName:
866
+ Description: 'Check the names of predicate methods.'
867
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
868
+ Enabled: true
869
+
870
+ Style/Proc:
871
+ Description: 'Use proc instead of Proc.new.'
872
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
873
+ Enabled: true
874
+
875
+ Style/RaiseArgs:
876
+ Description: 'Checks the arguments passed to raise/fail.'
877
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
878
+ Enabled: true
879
+
880
+ Style/RedundantBegin:
881
+ Description: "Don't use begin blocks when they are not needed."
882
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
883
+ Enabled: true
884
+
885
+ Style/RedundantException:
886
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
887
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
888
+ Enabled: true
889
+
890
+ Style/RedundantReturn:
891
+ Description: "Don't use return where it's not required."
892
+ # When `true` allows code like `return x, y`.
893
+ AllowMultipleReturnValues: false
894
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
895
+ Enabled: false
896
+
897
+ Style/RedundantSelf:
898
+ Description: "Don't use self where it's not needed."
899
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
900
+ Enabled: true
901
+
902
+ Style/RegexpLiteral:
903
+ Description: 'Use / or %r around regular expressions.'
904
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
905
+ EnforcedStyle: slashes
906
+ AllowInnerSlashes: true
907
+ Enabled: true
908
+
909
+ Layout/RescueEnsureAlignment:
910
+ Description: 'Align rescues and ensures correctly.'
911
+ Enabled: true
912
+
913
+ Style/RescueModifier:
914
+ Description: 'Avoid using rescue in its modifier form.'
915
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
916
+ Enabled: true
917
+
918
+ Style/SelfAssignment:
919
+ Description: >-
920
+ Checks for places where self-assignment shorthand should have
921
+ been used.
922
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
923
+ Enabled: true
924
+
925
+ Style/Semicolon:
926
+ Description: "Don't use semicolons to terminate expressions."
927
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
928
+ Enabled: true
929
+
930
+ Style/SignalException:
931
+ Description: 'Checks for proper usage of fail and raise.'
932
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
933
+ EnforcedStyle: semantic
934
+ Enabled: true
935
+
936
+ Style/SingleLineBlockParams:
937
+ Description: 'Enforces the names of some block params.'
938
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
939
+ Methods:
940
+ - reduce:
941
+ - acc
942
+ - elem
943
+ - inject:
944
+ - acc
945
+ - elem
946
+ Enabled: true
947
+
948
+ Style/SingleLineMethods:
949
+ Description: 'Avoid single-line methods.'
950
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
951
+ Enabled: true
952
+
953
+ Layout/SpaceBeforeFirstArg:
954
+ Description: >-
955
+ Checks that exactly one space is used between a method name
956
+ and the first argument for method calls without parentheses.
957
+ Enabled: true
958
+
959
+ Layout/SpaceAfterColon:
960
+ Description: 'Use spaces after colons.'
961
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
962
+ Enabled: true
963
+
964
+ Layout/SpaceAfterComma:
965
+ Description: 'Use spaces after commas.'
966
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
967
+ Enabled: true
968
+
969
+ Layout/SpaceAroundKeyword:
970
+ Description: 'Use spaces around keywords.'
971
+ Enabled: true
972
+
973
+ Layout/SpaceAfterMethodName:
974
+ Description: >-
975
+ Do not put a space between a method name and the opening
976
+ parenthesis in a method definition.
977
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
978
+ Enabled: true
979
+
980
+ Layout/SpaceAfterNot:
981
+ Description: Tracks redundant space after the ! operator.
982
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
983
+ Enabled: true
984
+
985
+ Layout/SpaceAfterSemicolon:
986
+ Description: 'Use spaces after semicolons.'
987
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
988
+ Enabled: true
989
+
990
+ Layout/SpaceBeforeBlockBraces:
991
+ Description: >-
992
+ Checks that the left block brace has or doesn't have space
993
+ before it.
994
+ EnforcedStyle: no_space
995
+ Enabled: true
996
+
997
+ Layout/SpaceBeforeComma:
998
+ Description: 'No spaces before commas.'
999
+ Enabled: true
1000
+
1001
+ Layout/SpaceBeforeComment:
1002
+ Description: >-
1003
+ Checks for missing space between code and a comment on the
1004
+ same line.
1005
+ Enabled: true
1006
+
1007
+ Layout/SpaceBeforeSemicolon:
1008
+ Description: 'No spaces before semicolons.'
1009
+ Enabled: false
1010
+
1011
+ Layout/SpaceInsideBlockBraces:
1012
+ Description: >-
1013
+ Checks that block braces have or don't have surrounding space.
1014
+ For blocks taking parameters, checks that the left brace has
1015
+ or doesn't have trailing space.
1016
+ Enabled: false
1017
+
1018
+ Layout/SpaceAroundBlockParameters:
1019
+ Description: 'Checks the spacing inside and after block parameters pipes.'
1020
+ Enabled: true
1021
+
1022
+ Layout/SpaceAroundEqualsInParameterDefault:
1023
+ Description: >-
1024
+ Checks that the equals signs in parameter default assignments
1025
+ have or don't have surrounding space depending on
1026
+ configuration.
1027
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
1028
+ Enabled: true
1029
+
1030
+ Layout/SpaceAroundOperators:
1031
+ Description: 'Use a single space around operators.'
1032
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1033
+ Enabled: true
1034
+
1035
+ Layout/SpaceInsideBrackets:
1036
+ Description: 'No spaces after [ or before ].'
1037
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1038
+ Enabled: true
1039
+
1040
+ Layout/SpaceInsideHashLiteralBraces:
1041
+ Description: "Use spaces inside hash literal braces - or don't."
1042
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1043
+ # SupportedStyles:
1044
+ # - space
1045
+ # - no_space
1046
+ # # 'compact' normally requires a space inside hash braces, with the exception
1047
+ # # that successive left braces or right braces are collapsed together
1048
+ # - compact
1049
+ EnforcedStyle: compact
1050
+ Enabled: true
1051
+
1052
+ Layout/SpaceInsideParens:
1053
+ Description: 'No spaces after ( or before ).'
1054
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1055
+ Enabled: true
1056
+
1057
+ Layout/SpaceInsideRangeLiteral:
1058
+ Description: 'No spaces inside range literals.'
1059
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
1060
+ Enabled: true
1061
+
1062
+ Layout/SpaceInsideStringInterpolation:
1063
+ Description: 'Checks for padding/surrounding spaces inside string interpolation.'
1064
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
1065
+ Enabled: true
1066
+
1067
+ Style/SpecialGlobalVars:
1068
+ Description: 'Avoid Perl-style global variables.'
1069
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
1070
+ Enabled: true
1071
+
1072
+ Style/StringLiterals:
1073
+ Description: 'Checks if uses of quotes match the configured preference.'
1074
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
1075
+ Enabled: true
1076
+
1077
+ Style/StringLiteralsInInterpolation:
1078
+ Description: >-
1079
+ Checks if uses of quotes inside expressions in interpolated
1080
+ strings match the configured preference.
1081
+ Enabled: true
1082
+
1083
+ Style/StructInheritance:
1084
+ Description: 'Checks for inheritance from Struct.new.'
1085
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
1086
+ Enabled: true
1087
+
1088
+ Style/SymbolLiteral:
1089
+ Description: 'Use plain symbols instead of string symbols when possible.'
1090
+ Enabled: true
1091
+
1092
+ Style/SymbolProc:
1093
+ Description: 'Use symbols as procs instead of blocks when possible.'
1094
+ Enabled: true
1095
+
1096
+ Layout/Tab:
1097
+ Description: 'No hard tabs.'
1098
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1099
+ Enabled: true
1100
+
1101
+ Layout/TrailingBlankLines:
1102
+ Description: 'Checks trailing blank lines and final newline.'
1103
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
1104
+ Enabled: true
1105
+
1106
+ Style/TrailingCommaInArguments:
1107
+ # If `comma`, the cop requires a comma after the last argument, but only for
1108
+ # parenthesized method calls where each argument is on its own line.
1109
+ # If `comma_for_multiple_args`, the cop behaves like `comma` except when
1110
+ # there's only one argument, in which case it requires that there's no
1111
+ # trailing comma.
1112
+ # If `consistent_comma`, the cop requires a comma after the last argument,
1113
+ # for all parenthesized method calls with arguments.
1114
+ Description: 'Checks for trailing comma in parameter lists.'
1115
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
1116
+ EnforcedStyleForMultiline: comma
1117
+ Enabled: true
1118
+
1119
+ Style/TrailingCommaInLiteral:
1120
+ # If `comma`, the cop requires a comma after the last item in an array or
1121
+ # hash, but only when each item is on its own line.
1122
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1123
+ # non-empty array and hash literals.
1124
+ Description: 'Checks for trailing comma in literals.'
1125
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1126
+ EnforcedStyleForMultiline: comma
1127
+ Enabled: true
1128
+
1129
+ Layout/TrailingWhitespace:
1130
+ Description: 'Avoid trailing whitespace.'
1131
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
1132
+ Enabled: true
1133
+
1134
+ Style/TrivialAccessors:
1135
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
1136
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
1137
+ Enabled: true
1138
+
1139
+ Style/UnlessElse:
1140
+ Description: >-
1141
+ Do not use unless with else. Rewrite these with the positive
1142
+ case first.
1143
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
1144
+ Enabled: true
1145
+
1146
+ Style/UnneededCapitalW:
1147
+ Description: 'Checks for %W when interpolation is not needed.'
1148
+ Enabled: true
1149
+
1150
+ Style/UnneededPercentQ:
1151
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
1152
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
1153
+ Enabled: true
1154
+
1155
+ Style/TrailingUnderscoreVariable:
1156
+ Description: >-
1157
+ Checks for the usage of unneeded trailing underscores at the
1158
+ end of parallel variable assignment.
1159
+ Enabled: true
1160
+
1161
+ Style/VariableInterpolation:
1162
+ Description: >-
1163
+ Don't interpolate global, instance and class variables
1164
+ directly in strings.
1165
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
1166
+ Enabled: true
1167
+
1168
+ Naming/VariableName:
1169
+ Description: 'Use the configured style when naming variables.'
1170
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
1171
+ Enabled: true
1172
+
1173
+ Style/WhenThen:
1174
+ Description: 'Use when x then ... for one-line cases.'
1175
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
1176
+ Enabled: false
1177
+
1178
+ Style/WhileUntilDo:
1179
+ Description: 'Checks for redundant do after while or until.'
1180
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
1181
+ Enabled: true
1182
+
1183
+ Style/WhileUntilModifier:
1184
+ Description: >-
1185
+ Favor modifier while/until usage when you have a
1186
+ single-line body.
1187
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
1188
+ Enabled: true
1189
+
1190
+ Style/WordArray:
1191
+ Description: 'Use %w or %W for arrays of words.'
1192
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
1193
+ Enabled: true