wonder-ruby-style 0.0.6 → 0.54.0

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