transform_tree 0.1.0 → 0.2.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.
data/.rubocop.yml DELETED
@@ -1,3468 +0,0 @@
1
- AllCops:
2
- DisabledByDefault: true
3
-
4
- #################### Lint ################################
5
-
6
- Lint/AmbiguousOperator:
7
- Description: >-
8
- Checks for ambiguous operators in the first argument of a
9
- method invocation without parentheses.
10
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
11
- Enabled: true
12
-
13
- Lint/AmbiguousRegexpLiteral:
14
- Description: >-
15
- Checks for ambiguous regexp literals in the first argument of
16
- a method invocation without parenthesis.
17
- Enabled: true
18
-
19
- Lint/AssignmentInCondition:
20
- Description: "Don't use assignment in conditions."
21
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
22
- Enabled: true
23
-
24
- Lint/BlockAlignment:
25
- Description: 'Align block ends correctly.'
26
- Enabled: true
27
-
28
- Lint/CircularArgumentReference:
29
- Description: "Don't refer to the keyword argument in the default value."
30
- Enabled: true
31
-
32
- Lint/ConditionPosition:
33
- Description: >-
34
- Checks for condition placed in a confusing position relative to
35
- the keyword.
36
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
37
- Enabled: true
38
-
39
- Lint/Debugger:
40
- Description: 'Check for debugger calls.'
41
- Enabled: true
42
-
43
- Lint/DefEndAlignment:
44
- Description: 'Align ends corresponding to defs correctly.'
45
- Enabled: true
46
-
47
- Lint/DeprecatedClassMethods:
48
- Description: 'Check for deprecated class method calls.'
49
- Enabled: true
50
-
51
- Lint/DuplicateMethods:
52
- Description: 'Check for duplicate methods calls.'
53
- Enabled: true
54
-
55
- Lint/EachWithObjectArgument:
56
- Description: 'Check for immutable argument given to each_with_object.'
57
- Enabled: true
58
-
59
- Lint/ElseLayout:
60
- Description: 'Check for odd code arrangement in an else block.'
61
- Enabled: true
62
-
63
- Lint/EmptyEnsure:
64
- Description: 'Checks for empty ensure block.'
65
- Enabled: true
66
-
67
- Lint/EmptyInterpolation:
68
- Description: 'Checks for empty string interpolation.'
69
- Enabled: true
70
-
71
- Lint/EndAlignment:
72
- Description: 'Align ends correctly.'
73
- Enabled: true
74
-
75
- Lint/EndInMethod:
76
- Description: 'END blocks should not be placed inside method definitions.'
77
- Enabled: true
78
-
79
- Lint/EnsureReturn:
80
- Description: 'Do not use return in an ensure block.'
81
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
82
- Enabled: true
83
-
84
- Lint/Eval:
85
- Description: 'The use of eval represents a serious security risk.'
86
- Enabled: true
87
-
88
- Lint/FormatParameterMismatch:
89
- Description: 'The number of parameters to format/sprint must match the fields.'
90
- Enabled: true
91
-
92
- Lint/HandleExceptions:
93
- Description: "Don't suppress exception."
94
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
95
- Enabled: true
96
-
97
- Lint/InvalidCharacterLiteral:
98
- Description: >-
99
- Checks for invalid character literals with a non-escaped
100
- whitespace character.
101
- Enabled: true
102
-
103
- Lint/LiteralInCondition:
104
- Description: 'Checks of literals used in conditions.'
105
- Enabled: true
106
-
107
- Lint/LiteralInInterpolation:
108
- Description: 'Checks for literals used in interpolation.'
109
- Enabled: true
110
-
111
- Lint/Loop:
112
- Description: >-
113
- Use Kernel#loop with break rather than begin/end/until or
114
- begin/end/while for post-loop tests.
115
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
116
- Enabled: true
117
-
118
- Lint/NestedMethodDefinition:
119
- Description: 'Do not use nested method definitions.'
120
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
121
- Enabled: true
122
-
123
- Lint/NonLocalExitFromIterator:
124
- Description: 'Do not use return in iterator to cause non-local exit.'
125
- Enabled: true
126
-
127
- Lint/ParenthesesAsGroupedExpression:
128
- Description: >-
129
- Checks for method calls with a space before the opening
130
- parenthesis.
131
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
132
- Enabled: true
133
-
134
- Lint/RequireParentheses:
135
- Description: >-
136
- Use parentheses in the method call to avoid confusion
137
- about precedence.
138
- Enabled: true
139
-
140
- Lint/RescueException:
141
- Description: 'Avoid rescuing the Exception class.'
142
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
143
- Enabled: true
144
-
145
- Lint/ShadowingOuterLocalVariable:
146
- Description: >-
147
- Do not use the same name as outer local variable
148
- for block arguments or block local variables.
149
- Enabled: true
150
-
151
- Lint/StringConversionInInterpolation:
152
- Description: 'Checks for Object#to_s usage in string interpolation.'
153
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
154
- Enabled: true
155
-
156
- Lint/UnderscorePrefixedVariableName:
157
- Description: 'Do not use prefix `_` for a variable that is used.'
158
- Enabled: true
159
-
160
- Lint/UnneededDisable:
161
- Description: >-
162
- Checks for rubocop:disable comments that can be removed.
163
- Note: this cop is not disabled when disabling all cops.
164
- It must be explicitly disabled.
165
- Enabled: true
166
-
167
- Lint/UnusedBlockArgument:
168
- Description: 'Checks for unused block arguments.'
169
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
170
- Enabled: true
171
-
172
- Lint/UnusedMethodArgument:
173
- Description: 'Checks for unused method arguments.'
174
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
175
- Enabled: true
176
-
177
- Lint/UnreachableCode:
178
- Description: 'Unreachable code.'
179
- Enabled: true
180
-
181
- Lint/UselessAccessModifier:
182
- Description: 'Checks for useless access modifiers.'
183
- Enabled: true
184
-
185
- Lint/UselessAssignment:
186
- Description: 'Checks for useless assignment to a local variable.'
187
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
188
- Enabled: true
189
-
190
- Lint/UselessComparison:
191
- Description: 'Checks for comparison of something with itself.'
192
- Enabled: true
193
-
194
- Lint/UselessElseWithoutRescue:
195
- Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
196
- Enabled: true
197
-
198
- Lint/UselessSetterCall:
199
- Description: 'Checks for useless setter call to a local variable.'
200
- Enabled: true
201
-
202
- Lint/Void:
203
- Description: 'Possible use of operator/literal/variable in void context.'
204
- Enabled: true
205
-
206
- ###################### Metrics ####################################
207
-
208
- Metrics/AbcSize:
209
- Description: >-
210
- A calculated magnitude based on number of assignments,
211
- branches, and conditions.
212
- Reference: 'http://c2.com/cgi/wiki?AbcMetric'
213
- Enabled: false
214
- Max: 20
215
-
216
- Metrics/BlockNesting:
217
- Description: 'Avoid excessive block nesting'
218
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
219
- Enabled: true
220
- Max: 4
221
-
222
- Metrics/ClassLength:
223
- Description: 'Avoid classes longer than 250 lines of code.'
224
- Enabled: true
225
- Max: 250
226
-
227
- Metrics/CyclomaticComplexity:
228
- Description: >-
229
- A complexity metric that is strongly correlated to the number
230
- of test cases needed to validate a method.
231
- Enabled: true
232
-
233
- Metrics/LineLength:
234
- Description: 'Limit lines to 80 characters.'
235
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
236
- Enabled: false
237
-
238
- Metrics/MethodLength:
239
- Description: 'Avoid methods longer than 30 lines of code.'
240
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
241
- Enabled: true
242
- Max: 30
243
-
244
- Metrics/ModuleLength:
245
- Description: 'Avoid modules longer than 250 lines of code.'
246
- Enabled: true
247
- Max: 250
248
-
249
- Metrics/ParameterLists:
250
- Description: 'Avoid parameter lists longer than three or four parameters.'
251
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
252
- Enabled: true
253
-
254
- Metrics/PerceivedComplexity:
255
- Description: >-
256
- A complexity metric geared towards measuring complexity for a
257
- human reader.
258
- Enabled: false
259
-
260
- ##################### Performance #############################
261
-
262
- Performance/Count:
263
- Description: >-
264
- Use `count` instead of `select...size`, `reject...size`,
265
- `select...count`, `reject...count`, `select...length`,
266
- and `reject...length`.
267
- Enabled: true
268
-
269
- Performance/Detect:
270
- Description: >-
271
- Use `detect` instead of `select.first`, `find_all.first`,
272
- `select.last`, and `find_all.last`.
273
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
274
- Enabled: true
275
-
276
- Performance/FlatMap:
277
- Description: >-
278
- Use `Enumerable#flat_map`
279
- instead of `Enumerable#map...Array#flatten(1)`
280
- or `Enumberable#collect..Array#flatten(1)`
281
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
282
- Enabled: true
283
- EnabledForFlattenWithoutParams: false
284
- # If enabled, this cop will warn about usages of
285
- # `flatten` being called without any parameters.
286
- # This can be dangerous since `flat_map` will only flatten 1 level, and
287
- # `flatten` without any parameters can flatten multiple levels.
288
-
289
- Performance/ReverseEach:
290
- Description: 'Use `reverse_each` instead of `reverse.each`.'
291
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
292
- Enabled: true
293
-
294
- Performance/Sample:
295
- Description: >-
296
- Use `sample` instead of `shuffle.first`,
297
- `shuffle.last`, and `shuffle[Fixnum]`.
298
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
299
- Enabled: true
300
-
301
- Performance/Size:
302
- Description: >-
303
- Use `size` instead of `count` for counting
304
- the number of elements in `Array` and `Hash`.
305
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
306
- Enabled: true
307
-
308
- Performance/StringReplacement:
309
- Description: >-
310
- Use `tr` instead of `gsub` when you are replacing the same
311
- number of characters. Use `delete` instead of `gsub` when
312
- you are deleting characters.
313
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
314
- Enabled: true
315
-
316
- ##################### Rails ##################################
317
-
318
- Rails/ActionFilter:
319
- Description: 'Enforces consistent use of action filter methods.'
320
- Enabled: false
321
-
322
- Rails/Date:
323
- Description: >-
324
- Checks the correct usage of date aware methods,
325
- such as Date.today, Date.current etc.
326
- Enabled: false
327
-
328
- Rails/Delegate:
329
- Description: 'Prefer delegate method for delegations.'
330
- Enabled: false
331
-
332
- Rails/FindBy:
333
- Description: 'Prefer find_by over where.first.'
334
- Enabled: false
335
-
336
- Rails/FindEach:
337
- Description: 'Prefer all.find_each over all.find.'
338
- Enabled: false
339
-
340
- Rails/HasAndBelongsToMany:
341
- Description: 'Prefer has_many :through to has_and_belongs_to_many.'
342
- Enabled: false
343
-
344
- Rails/Output:
345
- Description: 'Checks for calls to puts, print, etc.'
346
- Enabled: false
347
-
348
- Rails/ReadWriteAttribute:
349
- Description: >-
350
- Checks for read_attribute(:attr) and
351
- write_attribute(:attr, val).
352
- Enabled: false
353
-
354
- Rails/ScopeArgs:
355
- Description: 'Checks the arguments of ActiveRecord scopes.'
356
- Enabled: false
357
-
358
- Rails/TimeZone:
359
- Description: 'Checks the correct usage of time zone aware methods.'
360
- StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
361
- Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
362
- Enabled: false
363
-
364
- Rails/Validation:
365
- Description: 'Use validates :attribute, hash of validations.'
366
- Enabled: false
367
-
368
- ################## Style #################################
369
-
370
- Style/AccessModifierIndentation:
371
- Description: Check indentation of private/protected visibility modifiers.
372
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
373
- Enabled: false
374
-
375
- Style/AccessorMethodName:
376
- Description: Check the naming of accessor methods for get_/set_.
377
- Enabled: false
378
-
379
- Style/Alias:
380
- Description: 'Use alias_method instead of alias.'
381
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
382
- Enabled: false
383
-
384
- Style/AlignArray:
385
- Description: >-
386
- Align the elements of an array literal if they span more than
387
- one line.
388
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
389
- Enabled: false
390
-
391
- Style/AlignHash:
392
- Description: >-
393
- Align the elements of a hash literal if they span more than
394
- one line.
395
- Enabled: false
396
-
397
- Style/AlignParameters:
398
- Description: >-
399
- Align the parameters of a method call if they span more
400
- than one line.
401
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
402
- Enabled: false
403
-
404
- Style/AndOr:
405
- Description: 'Use &&/|| instead of and/or.'
406
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
407
- Enabled: false
408
-
409
- Style/ArrayJoin:
410
- Description: 'Use Array#join instead of Array#*.'
411
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
412
- Enabled: false
413
-
414
- Style/AsciiComments:
415
- Description: 'Use only ascii symbols in comments.'
416
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
417
- Enabled: false
418
-
419
- Style/AsciiIdentifiers:
420
- Description: 'Use only ascii symbols in identifiers.'
421
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
422
- Enabled: false
423
-
424
- Style/Attr:
425
- Description: 'Checks for uses of Module#attr.'
426
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
427
- Enabled: false
428
-
429
- Style/BeginBlock:
430
- Description: 'Avoid the use of BEGIN blocks.'
431
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
432
- Enabled: false
433
-
434
- Style/BarePercentLiterals:
435
- Description: 'Checks if usage of %() or %Q() matches configuration.'
436
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
437
- Enabled: false
438
-
439
- Style/BlockComments:
440
- Description: 'Do not use block comments.'
441
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
442
- Enabled: false
443
-
444
- Style/BlockEndNewline:
445
- Description: 'Put end statement of multiline block on its own line.'
446
- Enabled: false
447
-
448
- Style/BlockDelimiters:
449
- Description: >-
450
- Avoid using {...} for multi-line blocks (multiline chaining is
451
- always ugly).
452
- Prefer {...} over do...end for single-line blocks.
453
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
454
- Enabled: false
455
-
456
- Style/BracesAroundHashParameters:
457
- Description: 'Enforce braces style around hash parameters.'
458
- Enabled: false
459
-
460
- Style/CaseEquality:
461
- Description: 'Avoid explicit use of the case equality operator(===).'
462
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
463
- Enabled: false
464
-
465
- Style/CaseIndentation:
466
- Description: 'Indentation of when in a case/when/[else/]end.'
467
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
468
- Enabled: false
469
-
470
- Style/CharacterLiteral:
471
- Description: 'Checks for uses of character literals.'
472
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
473
- Enabled: false
474
-
475
- Style/ClassAndModuleCamelCase:
476
- Description: 'Use CamelCase for classes and modules.'
477
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
478
- Enabled: false
479
-
480
- Style/ClassAndModuleChildren:
481
- Description: 'Checks style of children classes and modules.'
482
- Enabled: false
483
-
484
- Style/ClassCheck:
485
- Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
486
- Enabled: false
487
-
488
- Style/ClassMethods:
489
- Description: 'Use self when defining module/class methods.'
490
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
491
- Enabled: false
492
-
493
- Style/ClassVars:
494
- Description: 'Avoid the use of class variables.'
495
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
496
- Enabled: false
497
-
498
- Style/ClosingParenthesisIndentation:
499
- Description: 'Checks the indentation of hanging closing parentheses.'
500
- Enabled: false
501
-
502
- Style/ColonMethodCall:
503
- Description: 'Do not use :: for method call.'
504
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
505
- Enabled: false
506
-
507
- Style/CommandLiteral:
508
- Description: 'Use `` or %x around command literals.'
509
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
510
- Enabled: false
511
-
512
- Style/CommentAnnotation:
513
- Description: 'Checks formatting of annotation comments.'
514
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
515
- Enabled: false
516
-
517
- Style/CommentIndentation:
518
- Description: 'Indentation of comments.'
519
- Enabled: false
520
-
521
- Style/ConstantName:
522
- Description: 'Constants should use SCREAMING_SNAKE_CASE.'
523
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
524
- Enabled: false
525
-
526
- Style/DefWithParentheses:
527
- Description: 'Use def with parentheses when there are arguments.'
528
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
529
- Enabled: false
530
-
531
- Style/DeprecatedHashMethods:
532
- Description: 'Checks for use of deprecated Hash methods.'
533
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
534
- Enabled: false
535
-
536
- Style/Documentation:
537
- Description: 'Document classes and non-namespace modules.'
538
- Enabled: false
539
-
540
- Style/DotPosition:
541
- Description: 'Checks the position of the dot in multi-line method calls.'
542
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
543
- Enabled: false
544
-
545
- Style/DoubleNegation:
546
- Description: 'Checks for uses of double negation (!!).'
547
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
548
- Enabled: false
549
-
550
- Style/EachWithObject:
551
- Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
552
- Enabled: false
553
-
554
- Style/ElseAlignment:
555
- Description: 'Align elses and elsifs correctly.'
556
- Enabled: false
557
-
558
- Style/EmptyElse:
559
- Description: 'Avoid empty else-clauses.'
560
- Enabled: false
561
-
562
- Style/EmptyLineBetweenDefs:
563
- Description: 'Use empty lines between defs.'
564
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
565
- Enabled: false
566
-
567
- Style/EmptyLines:
568
- Description: "Don't use several empty lines in a row."
569
- Enabled: false
570
-
571
- Style/EmptyLinesAroundAccessModifier:
572
- Description: "Keep blank lines around access modifiers."
573
- Enabled: false
574
-
575
- Style/EmptyLinesAroundBlockBody:
576
- Description: "Keeps track of empty lines around block bodies."
577
- Enabled: false
578
-
579
- Style/EmptyLinesAroundClassBody:
580
- Description: "Keeps track of empty lines around class bodies."
581
- Enabled: false
582
-
583
- Style/EmptyLinesAroundModuleBody:
584
- Description: "Keeps track of empty lines around module bodies."
585
- Enabled: false
586
-
587
- Style/EmptyLinesAroundMethodBody:
588
- Description: "Keeps track of empty lines around method bodies."
589
- Enabled: false
590
-
591
- Style/EmptyLiteral:
592
- Description: 'Prefer literals to Array.new/Hash.new/String.new.'
593
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
594
- Enabled: false
595
-
596
- Style/EndBlock:
597
- Description: 'Avoid the use of END blocks.'
598
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
599
- Enabled: false
600
-
601
- Style/EndOfLine:
602
- Description: 'Use Unix-style line endings.'
603
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
604
- Enabled: false
605
-
606
- Style/EvenOdd:
607
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
608
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
609
- Enabled: false
610
-
611
- Style/ExtraSpacing:
612
- Description: 'Do not use unnecessary spacing.'
613
- Enabled: false
614
-
615
- Style/FileName:
616
- Description: 'Use snake_case for source file names.'
617
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
618
- Enabled: false
619
-
620
- Style/InitialIndentation:
621
- Description: >-
622
- Checks the indentation of the first non-blank non-comment line in a file.
623
- Enabled: false
624
-
625
- Style/FirstParameterIndentation:
626
- Description: 'Checks the indentation of the first parameter in a method call.'
627
- Enabled: false
628
-
629
- Style/FlipFlop:
630
- Description: 'Checks for flip flops'
631
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
632
- Enabled: false
633
-
634
- Style/For:
635
- Description: 'Checks use of for or each in multiline loops.'
636
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
637
- Enabled: false
638
-
639
- Style/FormatString:
640
- Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
641
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
642
- Enabled: false
643
-
644
- Style/GlobalVars:
645
- Description: 'Do not introduce global variables.'
646
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
647
- Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
648
- Enabled: false
649
-
650
- Style/GuardClause:
651
- Description: 'Check for conditionals that can be replaced with guard clauses'
652
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
653
- Enabled: false
654
-
655
- Style/HashSyntax:
656
- Description: >-
657
- Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
658
- { :a => 1, :b => 2 }.
659
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
660
- Enabled: false
661
-
662
- Style/IfUnlessModifier:
663
- Description: >-
664
- Favor modifier if/unless usage when you have a
665
- single-line body.
666
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
667
- Enabled: false
668
-
669
- Style/IfWithSemicolon:
670
- Description: 'Do not use if x; .... Use the ternary operator instead.'
671
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
672
- Enabled: false
673
-
674
- Style/IndentationConsistency:
675
- Description: 'Keep indentation straight.'
676
- Enabled: false
677
-
678
- Style/IndentationWidth:
679
- Description: 'Use 2 spaces for indentation.'
680
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
681
- Enabled: false
682
-
683
- Style/IndentArray:
684
- Description: >-
685
- Checks the indentation of the first element in an array
686
- literal.
687
- Enabled: false
688
-
689
- Style/IndentHash:
690
- Description: 'Checks the indentation of the first key in a hash literal.'
691
- Enabled: false
692
-
693
- Style/InfiniteLoop:
694
- Description: 'Use Kernel#loop for infinite loops.'
695
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
696
- Enabled: false
697
-
698
- Style/Lambda:
699
- Description: 'Use the new lambda literal syntax for single-line blocks.'
700
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
701
- Enabled: false
702
-
703
- Style/LambdaCall:
704
- Description: 'Use lambda.call(...) instead of lambda.(...).'
705
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
706
- Enabled: false
707
-
708
- Style/LeadingCommentSpace:
709
- Description: 'Comments should start with a space.'
710
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
711
- Enabled: false
712
-
713
- Style/LineEndConcatenation:
714
- Description: >-
715
- Use \ instead of + or << to concatenate two string literals at
716
- line end.
717
- Enabled: false
718
-
719
- Style/MethodCallParentheses:
720
- Description: 'Do not use parentheses for method calls with no arguments.'
721
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
722
- Enabled: false
723
-
724
- Style/MethodDefParentheses:
725
- Description: >-
726
- Checks if the method definitions have or don't have
727
- parentheses.
728
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
729
- Enabled: false
730
-
731
- Style/MethodName:
732
- Description: 'Use the configured style when naming methods.'
733
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
734
- Enabled: false
735
-
736
- Style/ModuleFunction:
737
- Description: 'Checks for usage of `extend self` in modules.'
738
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
739
- Enabled: false
740
-
741
- Style/MultilineBlockChain:
742
- Description: 'Avoid multi-line chains of blocks.'
743
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
744
- Enabled: false
745
-
746
- Style/MultilineBlockLayout:
747
- Description: 'Ensures newlines after multiline block do statements.'
748
- Enabled: false
749
-
750
- Style/MultilineIfThen:
751
- Description: 'Do not use then for multi-line if/unless.'
752
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
753
- Enabled: false
754
-
755
- Style/MultilineOperationIndentation:
756
- Description: >-
757
- Checks indentation of binary operations that span more than
758
- one line.
759
- Enabled: false
760
-
761
- Style/MultilineTernaryOperator:
762
- Description: >-
763
- Avoid multi-line ?: (the ternary operator);
764
- use if/unless instead.
765
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
766
- Enabled: false
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: false
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: false
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: false
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: false
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: false
799
-
800
- Style/Not:
801
- Description: 'Use ! instead of not.'
802
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
803
- Enabled: false
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: false
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: false
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: false
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: false
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: false
846
-
847
- Style/PercentLiteralDelimiters:
848
- Description: 'Use `%`-literal delimiters consistently'
849
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
850
- Enabled: false
851
-
852
- Style/PercentQLiterals:
853
- Description: 'Checks if uses of %Q/%q match the configured preference.'
854
- Enabled: false
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: false
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: false
865
-
866
- Style/Proc:
867
- Description: 'Use proc instead of Proc.new.'
868
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
869
- Enabled: false
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: false
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: false
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: false
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: false
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: false
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: false
900
-
901
- Style/RescueEnsureAlignment:
902
- Description: 'Align rescues and ensures correctly.'
903
- Enabled: false
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: false
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: false
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: false
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: false
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: false
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: false
936
-
937
- Style/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
- Style/SpaceAfterColon:
944
- Description: 'Use spaces after colons.'
945
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
946
- Enabled: false
947
-
948
- Style/SpaceAfterComma:
949
- Description: 'Use spaces after commas.'
950
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
951
- Enabled: false
952
-
953
- Style/SpaceAroundKeyword:
954
- Description: 'Use spaces around keywords.'
955
- Enabled: false
956
-
957
- Style/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: false
963
-
964
- Style/SpaceAfterNot:
965
- Description: Tracks redundant space after the ! operator.
966
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
967
- Enabled: false
968
-
969
- Style/SpaceAfterSemicolon:
970
- Description: 'Use spaces after semicolons.'
971
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
972
- Enabled: false
973
-
974
- Style/SpaceBeforeBlockBraces:
975
- Description: >-
976
- Checks that the left block brace has or doesn't have space
977
- before it.
978
- Enabled: false
979
-
980
- Style/SpaceBeforeComma:
981
- Description: 'No spaces before commas.'
982
- Enabled: false
983
-
984
- Style/SpaceBeforeComment:
985
- Description: >-
986
- Checks for missing space between code and a comment on the
987
- same line.
988
- Enabled: false
989
-
990
- Style/SpaceBeforeSemicolon:
991
- Description: 'No spaces before semicolons.'
992
- Enabled: false
993
-
994
- Style/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: false
1000
-
1001
- Style/SpaceAroundBlockParameters:
1002
- Description: 'Checks the spacing inside and after block parameters pipes.'
1003
- Enabled: false
1004
-
1005
- Style/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: false
1012
-
1013
- Style/SpaceAroundOperators:
1014
- Description: 'Use a single space around operators.'
1015
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1016
- Enabled: false
1017
-
1018
- Style/SpaceInsideBrackets:
1019
- Description: 'No spaces after [ or before ].'
1020
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1021
- Enabled: false
1022
-
1023
- Style/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: false
1027
-
1028
- Style/SpaceInsideParens:
1029
- Description: 'No spaces after ( or before ).'
1030
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1031
- Enabled: false
1032
-
1033
- Style/SpaceInsideRangeLiteral:
1034
- Description: 'No spaces inside range literals.'
1035
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
1036
- Enabled: false
1037
-
1038
- Style/SpaceInsideStringInterpolation:
1039
- Description: 'Checks for padding/surrounding spaces inside string interpolation.'
1040
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
1041
- Enabled: false
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: false
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: false
1052
-
1053
- Style/StringLiteralsInInterpolation:
1054
- Description: >-
1055
- Checks if uses of quotes inside expressions in interpolated
1056
- strings match the configured preference.
1057
- Enabled: false
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: false
1063
-
1064
- Style/SymbolLiteral:
1065
- Description: 'Use plain symbols instead of string symbols when possible.'
1066
- Enabled: false
1067
-
1068
- Style/SymbolProc:
1069
- Description: 'Use symbols as procs instead of blocks when possible.'
1070
- Enabled: false
1071
-
1072
- Style/Tab:
1073
- Description: 'No hard tabs.'
1074
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1075
- Enabled: false
1076
-
1077
- Style/TrailingBlankLines:
1078
- Description: 'Checks trailing blank lines and final newline.'
1079
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
1080
- Enabled: false
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: false
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: false
1091
-
1092
- Style/TrailingWhitespace:
1093
- Description: 'Avoid trailing whitespace.'
1094
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
1095
- Enabled: false
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: false
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: false
1108
-
1109
- Style/UnneededCapitalW:
1110
- Description: 'Checks for %W when interpolation is not needed.'
1111
- Enabled: false
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: false
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: false
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: false
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: false
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: false
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: false
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: false
1157
- AllCops:
1158
- DisabledByDefault: true
1159
-
1160
- #################### Lint ################################
1161
-
1162
- Lint/AmbiguousOperator:
1163
- Description: >-
1164
- Checks for ambiguous operators in the first argument of a
1165
- method invocation without parentheses.
1166
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
1167
- Enabled: true
1168
-
1169
- Lint/AmbiguousRegexpLiteral:
1170
- Description: >-
1171
- Checks for ambiguous regexp literals in the first argument of
1172
- a method invocation without parenthesis.
1173
- Enabled: true
1174
-
1175
- Lint/AssignmentInCondition:
1176
- Description: "Don't use assignment in conditions."
1177
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
1178
- Enabled: true
1179
-
1180
- Lint/BlockAlignment:
1181
- Description: 'Align block ends correctly.'
1182
- Enabled: true
1183
-
1184
- Lint/CircularArgumentReference:
1185
- Description: "Don't refer to the keyword argument in the default value."
1186
- Enabled: true
1187
-
1188
- Lint/ConditionPosition:
1189
- Description: >-
1190
- Checks for condition placed in a confusing position relative to
1191
- the keyword.
1192
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
1193
- Enabled: true
1194
-
1195
- Lint/Debugger:
1196
- Description: 'Check for debugger calls.'
1197
- Enabled: true
1198
-
1199
- Lint/DefEndAlignment:
1200
- Description: 'Align ends corresponding to defs correctly.'
1201
- Enabled: true
1202
-
1203
- Lint/DeprecatedClassMethods:
1204
- Description: 'Check for deprecated class method calls.'
1205
- Enabled: true
1206
-
1207
- Lint/DuplicateMethods:
1208
- Description: 'Check for duplicate methods calls.'
1209
- Enabled: true
1210
-
1211
- Lint/EachWithObjectArgument:
1212
- Description: 'Check for immutable argument given to each_with_object.'
1213
- Enabled: true
1214
-
1215
- Lint/ElseLayout:
1216
- Description: 'Check for odd code arrangement in an else block.'
1217
- Enabled: true
1218
-
1219
- Lint/EmptyEnsure:
1220
- Description: 'Checks for empty ensure block.'
1221
- Enabled: true
1222
-
1223
- Lint/EmptyInterpolation:
1224
- Description: 'Checks for empty string interpolation.'
1225
- Enabled: true
1226
-
1227
- Lint/EndAlignment:
1228
- Description: 'Align ends correctly.'
1229
- Enabled: true
1230
-
1231
- Lint/EndInMethod:
1232
- Description: 'END blocks should not be placed inside method definitions.'
1233
- Enabled: true
1234
-
1235
- Lint/EnsureReturn:
1236
- Description: 'Do not use return in an ensure block.'
1237
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
1238
- Enabled: true
1239
-
1240
- Lint/Eval:
1241
- Description: 'The use of eval represents a serious security risk.'
1242
- Enabled: true
1243
-
1244
- Lint/FormatParameterMismatch:
1245
- Description: 'The number of parameters to format/sprint must match the fields.'
1246
- Enabled: true
1247
-
1248
- Lint/HandleExceptions:
1249
- Description: "Don't suppress exception."
1250
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
1251
- Enabled: true
1252
-
1253
- Lint/InvalidCharacterLiteral:
1254
- Description: >-
1255
- Checks for invalid character literals with a non-escaped
1256
- whitespace character.
1257
- Enabled: true
1258
-
1259
- Lint/LiteralInCondition:
1260
- Description: 'Checks of literals used in conditions.'
1261
- Enabled: true
1262
-
1263
- Lint/LiteralInInterpolation:
1264
- Description: 'Checks for literals used in interpolation.'
1265
- Enabled: true
1266
-
1267
- Lint/Loop:
1268
- Description: >-
1269
- Use Kernel#loop with break rather than begin/end/until or
1270
- begin/end/while for post-loop tests.
1271
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
1272
- Enabled: true
1273
-
1274
- Lint/NestedMethodDefinition:
1275
- Description: 'Do not use nested method definitions.'
1276
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
1277
- Enabled: true
1278
-
1279
- Lint/NonLocalExitFromIterator:
1280
- Description: 'Do not use return in iterator to cause non-local exit.'
1281
- Enabled: true
1282
-
1283
- Lint/ParenthesesAsGroupedExpression:
1284
- Description: >-
1285
- Checks for method calls with a space before the opening
1286
- parenthesis.
1287
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
1288
- Enabled: true
1289
-
1290
- Lint/RequireParentheses:
1291
- Description: >-
1292
- Use parentheses in the method call to avoid confusion
1293
- about precedence.
1294
- Enabled: true
1295
-
1296
- Lint/RescueException:
1297
- Description: 'Avoid rescuing the Exception class.'
1298
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
1299
- Enabled: true
1300
-
1301
- Lint/ShadowingOuterLocalVariable:
1302
- Description: >-
1303
- Do not use the same name as outer local variable
1304
- for block arguments or block local variables.
1305
- Enabled: true
1306
-
1307
- Lint/StringConversionInInterpolation:
1308
- Description: 'Checks for Object#to_s usage in string interpolation.'
1309
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
1310
- Enabled: true
1311
-
1312
- Lint/UnderscorePrefixedVariableName:
1313
- Description: 'Do not use prefix `_` for a variable that is used.'
1314
- Enabled: true
1315
-
1316
- Lint/UnneededDisable:
1317
- Description: >-
1318
- Checks for rubocop:disable comments that can be removed.
1319
- Note: this cop is not disabled when disabling all cops.
1320
- It must be explicitly disabled.
1321
- Enabled: true
1322
-
1323
- Lint/UnusedBlockArgument:
1324
- Description: 'Checks for unused block arguments.'
1325
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1326
- Enabled: true
1327
-
1328
- Lint/UnusedMethodArgument:
1329
- Description: 'Checks for unused method arguments.'
1330
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1331
- Enabled: true
1332
-
1333
- Lint/UnreachableCode:
1334
- Description: 'Unreachable code.'
1335
- Enabled: true
1336
-
1337
- Lint/UselessAccessModifier:
1338
- Description: 'Checks for useless access modifiers.'
1339
- Enabled: true
1340
-
1341
- Lint/UselessAssignment:
1342
- Description: 'Checks for useless assignment to a local variable.'
1343
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1344
- Enabled: true
1345
-
1346
- Lint/UselessComparison:
1347
- Description: 'Checks for comparison of something with itself.'
1348
- Enabled: true
1349
-
1350
- Lint/UselessElseWithoutRescue:
1351
- Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
1352
- Enabled: true
1353
-
1354
- Lint/UselessSetterCall:
1355
- Description: 'Checks for useless setter call to a local variable.'
1356
- Enabled: true
1357
-
1358
- Lint/Void:
1359
- Description: 'Possible use of operator/literal/variable in void context.'
1360
- Enabled: true
1361
-
1362
- ###################### Metrics ####################################
1363
-
1364
- Metrics/AbcSize:
1365
- Description: >-
1366
- A calculated magnitude based on number of assignments,
1367
- branches, and conditions.
1368
- Reference: 'http://c2.com/cgi/wiki?AbcMetric'
1369
- Enabled: false
1370
- Max: 20
1371
-
1372
- Metrics/BlockNesting:
1373
- Description: 'Avoid excessive block nesting'
1374
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
1375
- Enabled: true
1376
- Max: 4
1377
-
1378
- Metrics/ClassLength:
1379
- Description: 'Avoid classes longer than 250 lines of code.'
1380
- Enabled: true
1381
- Max: 250
1382
-
1383
- Metrics/CyclomaticComplexity:
1384
- Description: >-
1385
- A complexity metric that is strongly correlated to the number
1386
- of test cases needed to validate a method.
1387
- Enabled: true
1388
-
1389
- Metrics/LineLength:
1390
- Description: 'Limit lines to 80 characters.'
1391
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
1392
- Enabled: false
1393
-
1394
- Metrics/MethodLength:
1395
- Description: 'Avoid methods longer than 30 lines of code.'
1396
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
1397
- Enabled: true
1398
- Max: 30
1399
-
1400
- Metrics/ModuleLength:
1401
- Description: 'Avoid modules longer than 250 lines of code.'
1402
- Enabled: true
1403
- Max: 250
1404
-
1405
- Metrics/ParameterLists:
1406
- Description: 'Avoid parameter lists longer than three or four parameters.'
1407
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
1408
- Enabled: true
1409
-
1410
- Metrics/PerceivedComplexity:
1411
- Description: >-
1412
- A complexity metric geared towards measuring complexity for a
1413
- human reader.
1414
- Enabled: false
1415
-
1416
- ##################### Performance #############################
1417
-
1418
- Performance/Count:
1419
- Description: >-
1420
- Use `count` instead of `select...size`, `reject...size`,
1421
- `select...count`, `reject...count`, `select...length`,
1422
- and `reject...length`.
1423
- Enabled: true
1424
-
1425
- Performance/Detect:
1426
- Description: >-
1427
- Use `detect` instead of `select.first`, `find_all.first`,
1428
- `select.last`, and `find_all.last`.
1429
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
1430
- Enabled: true
1431
-
1432
- Performance/FlatMap:
1433
- Description: >-
1434
- Use `Enumerable#flat_map`
1435
- instead of `Enumerable#map...Array#flatten(1)`
1436
- or `Enumberable#collect..Array#flatten(1)`
1437
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
1438
- Enabled: true
1439
- EnabledForFlattenWithoutParams: false
1440
- # If enabled, this cop will warn about usages of
1441
- # `flatten` being called without any parameters.
1442
- # This can be dangerous since `flat_map` will only flatten 1 level, and
1443
- # `flatten` without any parameters can flatten multiple levels.
1444
-
1445
- Performance/ReverseEach:
1446
- Description: 'Use `reverse_each` instead of `reverse.each`.'
1447
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
1448
- Enabled: true
1449
-
1450
- Performance/Sample:
1451
- Description: >-
1452
- Use `sample` instead of `shuffle.first`,
1453
- `shuffle.last`, and `shuffle[Fixnum]`.
1454
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
1455
- Enabled: true
1456
-
1457
- Performance/Size:
1458
- Description: >-
1459
- Use `size` instead of `count` for counting
1460
- the number of elements in `Array` and `Hash`.
1461
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
1462
- Enabled: true
1463
-
1464
- Performance/StringReplacement:
1465
- Description: >-
1466
- Use `tr` instead of `gsub` when you are replacing the same
1467
- number of characters. Use `delete` instead of `gsub` when
1468
- you are deleting characters.
1469
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
1470
- Enabled: true
1471
-
1472
- ##################### Rails ##################################
1473
-
1474
- Rails/ActionFilter:
1475
- Description: 'Enforces consistent use of action filter methods.'
1476
- Enabled: false
1477
-
1478
- Rails/Date:
1479
- Description: >-
1480
- Checks the correct usage of date aware methods,
1481
- such as Date.today, Date.current etc.
1482
- Enabled: false
1483
-
1484
- Rails/Delegate:
1485
- Description: 'Prefer delegate method for delegations.'
1486
- Enabled: false
1487
-
1488
- Rails/FindBy:
1489
- Description: 'Prefer find_by over where.first.'
1490
- Enabled: false
1491
-
1492
- Rails/FindEach:
1493
- Description: 'Prefer all.find_each over all.find.'
1494
- Enabled: false
1495
-
1496
- Rails/HasAndBelongsToMany:
1497
- Description: 'Prefer has_many :through to has_and_belongs_to_many.'
1498
- Enabled: false
1499
-
1500
- Rails/Output:
1501
- Description: 'Checks for calls to puts, print, etc.'
1502
- Enabled: false
1503
-
1504
- Rails/ReadWriteAttribute:
1505
- Description: >-
1506
- Checks for read_attribute(:attr) and
1507
- write_attribute(:attr, val).
1508
- Enabled: false
1509
-
1510
- Rails/ScopeArgs:
1511
- Description: 'Checks the arguments of ActiveRecord scopes.'
1512
- Enabled: false
1513
-
1514
- Rails/TimeZone:
1515
- Description: 'Checks the correct usage of time zone aware methods.'
1516
- StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
1517
- Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
1518
- Enabled: false
1519
-
1520
- Rails/Validation:
1521
- Description: 'Use validates :attribute, hash of validations.'
1522
- Enabled: false
1523
-
1524
- ################## Style #################################
1525
-
1526
- Style/AccessModifierIndentation:
1527
- Description: Check indentation of private/protected visibility modifiers.
1528
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
1529
- Enabled: false
1530
-
1531
- Style/AccessorMethodName:
1532
- Description: Check the naming of accessor methods for get_/set_.
1533
- Enabled: false
1534
-
1535
- Style/Alias:
1536
- Description: 'Use alias_method instead of alias.'
1537
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
1538
- Enabled: false
1539
-
1540
- Style/AlignArray:
1541
- Description: >-
1542
- Align the elements of an array literal if they span more than
1543
- one line.
1544
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
1545
- Enabled: false
1546
-
1547
- Style/AlignHash:
1548
- Description: >-
1549
- Align the elements of a hash literal if they span more than
1550
- one line.
1551
- Enabled: false
1552
-
1553
- Style/AlignParameters:
1554
- Description: >-
1555
- Align the parameters of a method call if they span more
1556
- than one line.
1557
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
1558
- Enabled: false
1559
-
1560
- Style/AndOr:
1561
- Description: 'Use &&/|| instead of and/or.'
1562
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
1563
- Enabled: false
1564
-
1565
- Style/ArrayJoin:
1566
- Description: 'Use Array#join instead of Array#*.'
1567
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
1568
- Enabled: false
1569
-
1570
- Style/AsciiComments:
1571
- Description: 'Use only ascii symbols in comments.'
1572
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
1573
- Enabled: false
1574
-
1575
- Style/AsciiIdentifiers:
1576
- Description: 'Use only ascii symbols in identifiers.'
1577
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
1578
- Enabled: false
1579
-
1580
- Style/Attr:
1581
- Description: 'Checks for uses of Module#attr.'
1582
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
1583
- Enabled: false
1584
-
1585
- Style/BeginBlock:
1586
- Description: 'Avoid the use of BEGIN blocks.'
1587
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
1588
- Enabled: false
1589
-
1590
- Style/BarePercentLiterals:
1591
- Description: 'Checks if usage of %() or %Q() matches configuration.'
1592
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
1593
- Enabled: false
1594
-
1595
- Style/BlockComments:
1596
- Description: 'Do not use block comments.'
1597
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
1598
- Enabled: false
1599
-
1600
- Style/BlockEndNewline:
1601
- Description: 'Put end statement of multiline block on its own line.'
1602
- Enabled: false
1603
-
1604
- Style/BlockDelimiters:
1605
- Description: >-
1606
- Avoid using {...} for multi-line blocks (multiline chaining is
1607
- always ugly).
1608
- Prefer {...} over do...end for single-line blocks.
1609
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
1610
- Enabled: false
1611
-
1612
- Style/BracesAroundHashParameters:
1613
- Description: 'Enforce braces style around hash parameters.'
1614
- Enabled: false
1615
-
1616
- Style/CaseEquality:
1617
- Description: 'Avoid explicit use of the case equality operator(===).'
1618
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
1619
- Enabled: false
1620
-
1621
- Style/CaseIndentation:
1622
- Description: 'Indentation of when in a case/when/[else/]end.'
1623
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
1624
- Enabled: false
1625
-
1626
- Style/CharacterLiteral:
1627
- Description: 'Checks for uses of character literals.'
1628
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
1629
- Enabled: false
1630
-
1631
- Style/ClassAndModuleCamelCase:
1632
- Description: 'Use CamelCase for classes and modules.'
1633
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
1634
- Enabled: false
1635
-
1636
- Style/ClassAndModuleChildren:
1637
- Description: 'Checks style of children classes and modules.'
1638
- Enabled: false
1639
-
1640
- Style/ClassCheck:
1641
- Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
1642
- Enabled: false
1643
-
1644
- Style/ClassMethods:
1645
- Description: 'Use self when defining module/class methods.'
1646
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
1647
- Enabled: false
1648
-
1649
- Style/ClassVars:
1650
- Description: 'Avoid the use of class variables.'
1651
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
1652
- Enabled: false
1653
-
1654
- Style/ClosingParenthesisIndentation:
1655
- Description: 'Checks the indentation of hanging closing parentheses.'
1656
- Enabled: false
1657
-
1658
- Style/ColonMethodCall:
1659
- Description: 'Do not use :: for method call.'
1660
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
1661
- Enabled: false
1662
-
1663
- Style/CommandLiteral:
1664
- Description: 'Use `` or %x around command literals.'
1665
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
1666
- Enabled: false
1667
-
1668
- Style/CommentAnnotation:
1669
- Description: 'Checks formatting of annotation comments.'
1670
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
1671
- Enabled: false
1672
-
1673
- Style/CommentIndentation:
1674
- Description: 'Indentation of comments.'
1675
- Enabled: false
1676
-
1677
- Style/ConstantName:
1678
- Description: 'Constants should use SCREAMING_SNAKE_CASE.'
1679
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
1680
- Enabled: false
1681
-
1682
- Style/DefWithParentheses:
1683
- Description: 'Use def with parentheses when there are arguments.'
1684
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
1685
- Enabled: false
1686
-
1687
- Style/DeprecatedHashMethods:
1688
- Description: 'Checks for use of deprecated Hash methods.'
1689
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
1690
- Enabled: false
1691
-
1692
- Style/Documentation:
1693
- Description: 'Document classes and non-namespace modules.'
1694
- Enabled: false
1695
-
1696
- Style/DotPosition:
1697
- Description: 'Checks the position of the dot in multi-line method calls.'
1698
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
1699
- Enabled: false
1700
-
1701
- Style/DoubleNegation:
1702
- Description: 'Checks for uses of double negation (!!).'
1703
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
1704
- Enabled: false
1705
-
1706
- Style/EachWithObject:
1707
- Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
1708
- Enabled: false
1709
-
1710
- Style/ElseAlignment:
1711
- Description: 'Align elses and elsifs correctly.'
1712
- Enabled: false
1713
-
1714
- Style/EmptyElse:
1715
- Description: 'Avoid empty else-clauses.'
1716
- Enabled: false
1717
-
1718
- Style/EmptyLineBetweenDefs:
1719
- Description: 'Use empty lines between defs.'
1720
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
1721
- Enabled: false
1722
-
1723
- Style/EmptyLines:
1724
- Description: "Don't use several empty lines in a row."
1725
- Enabled: false
1726
-
1727
- Style/EmptyLinesAroundAccessModifier:
1728
- Description: "Keep blank lines around access modifiers."
1729
- Enabled: false
1730
-
1731
- Style/EmptyLinesAroundBlockBody:
1732
- Description: "Keeps track of empty lines around block bodies."
1733
- Enabled: false
1734
-
1735
- Style/EmptyLinesAroundClassBody:
1736
- Description: "Keeps track of empty lines around class bodies."
1737
- Enabled: false
1738
-
1739
- Style/EmptyLinesAroundModuleBody:
1740
- Description: "Keeps track of empty lines around module bodies."
1741
- Enabled: false
1742
-
1743
- Style/EmptyLinesAroundMethodBody:
1744
- Description: "Keeps track of empty lines around method bodies."
1745
- Enabled: false
1746
-
1747
- Style/EmptyLiteral:
1748
- Description: 'Prefer literals to Array.new/Hash.new/String.new.'
1749
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
1750
- Enabled: false
1751
-
1752
- Style/EndBlock:
1753
- Description: 'Avoid the use of END blocks.'
1754
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
1755
- Enabled: false
1756
-
1757
- Style/EndOfLine:
1758
- Description: 'Use Unix-style line endings.'
1759
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
1760
- Enabled: false
1761
-
1762
- Style/EvenOdd:
1763
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
1764
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
1765
- Enabled: false
1766
-
1767
- Style/ExtraSpacing:
1768
- Description: 'Do not use unnecessary spacing.'
1769
- Enabled: false
1770
-
1771
- Style/FileName:
1772
- Description: 'Use snake_case for source file names.'
1773
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
1774
- Enabled: false
1775
-
1776
- Style/InitialIndentation:
1777
- Description: >-
1778
- Checks the indentation of the first non-blank non-comment line in a file.
1779
- Enabled: false
1780
-
1781
- Style/FirstParameterIndentation:
1782
- Description: 'Checks the indentation of the first parameter in a method call.'
1783
- Enabled: false
1784
-
1785
- Style/FlipFlop:
1786
- Description: 'Checks for flip flops'
1787
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
1788
- Enabled: false
1789
-
1790
- Style/For:
1791
- Description: 'Checks use of for or each in multiline loops.'
1792
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
1793
- Enabled: false
1794
-
1795
- Style/FormatString:
1796
- Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
1797
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
1798
- Enabled: false
1799
-
1800
- Style/GlobalVars:
1801
- Description: 'Do not introduce global variables.'
1802
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
1803
- Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
1804
- Enabled: false
1805
-
1806
- Style/GuardClause:
1807
- Description: 'Check for conditionals that can be replaced with guard clauses'
1808
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
1809
- Enabled: false
1810
-
1811
- Style/HashSyntax:
1812
- Description: >-
1813
- Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
1814
- { :a => 1, :b => 2 }.
1815
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
1816
- Enabled: false
1817
-
1818
- Style/IfUnlessModifier:
1819
- Description: >-
1820
- Favor modifier if/unless usage when you have a
1821
- single-line body.
1822
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
1823
- Enabled: false
1824
-
1825
- Style/IfWithSemicolon:
1826
- Description: 'Do not use if x; .... Use the ternary operator instead.'
1827
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
1828
- Enabled: false
1829
-
1830
- Style/IndentationConsistency:
1831
- Description: 'Keep indentation straight.'
1832
- Enabled: false
1833
-
1834
- Style/IndentationWidth:
1835
- Description: 'Use 2 spaces for indentation.'
1836
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1837
- Enabled: false
1838
-
1839
- Style/IndentArray:
1840
- Description: >-
1841
- Checks the indentation of the first element in an array
1842
- literal.
1843
- Enabled: false
1844
-
1845
- Style/IndentHash:
1846
- Description: 'Checks the indentation of the first key in a hash literal.'
1847
- Enabled: false
1848
-
1849
- Style/InfiniteLoop:
1850
- Description: 'Use Kernel#loop for infinite loops.'
1851
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
1852
- Enabled: false
1853
-
1854
- Style/Lambda:
1855
- Description: 'Use the new lambda literal syntax for single-line blocks.'
1856
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
1857
- Enabled: false
1858
-
1859
- Style/LambdaCall:
1860
- Description: 'Use lambda.call(...) instead of lambda.(...).'
1861
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
1862
- Enabled: false
1863
-
1864
- Style/LeadingCommentSpace:
1865
- Description: 'Comments should start with a space.'
1866
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
1867
- Enabled: false
1868
-
1869
- Style/LineEndConcatenation:
1870
- Description: >-
1871
- Use \ instead of + or << to concatenate two string literals at
1872
- line end.
1873
- Enabled: false
1874
-
1875
- Style/MethodCallParentheses:
1876
- Description: 'Do not use parentheses for method calls with no arguments.'
1877
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
1878
- Enabled: false
1879
-
1880
- Style/MethodDefParentheses:
1881
- Description: >-
1882
- Checks if the method definitions have or don't have
1883
- parentheses.
1884
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
1885
- Enabled: false
1886
-
1887
- Style/MethodName:
1888
- Description: 'Use the configured style when naming methods.'
1889
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
1890
- Enabled: false
1891
-
1892
- Style/ModuleFunction:
1893
- Description: 'Checks for usage of `extend self` in modules.'
1894
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
1895
- Enabled: false
1896
-
1897
- Style/MultilineBlockChain:
1898
- Description: 'Avoid multi-line chains of blocks.'
1899
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
1900
- Enabled: false
1901
-
1902
- Style/MultilineBlockLayout:
1903
- Description: 'Ensures newlines after multiline block do statements.'
1904
- Enabled: false
1905
-
1906
- Style/MultilineIfThen:
1907
- Description: 'Do not use then for multi-line if/unless.'
1908
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
1909
- Enabled: false
1910
-
1911
- Style/MultilineOperationIndentation:
1912
- Description: >-
1913
- Checks indentation of binary operations that span more than
1914
- one line.
1915
- Enabled: false
1916
-
1917
- Style/MultilineTernaryOperator:
1918
- Description: >-
1919
- Avoid multi-line ?: (the ternary operator);
1920
- use if/unless instead.
1921
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
1922
- Enabled: false
1923
-
1924
- Style/NegatedIf:
1925
- Description: >-
1926
- Favor unless over if for negative conditions
1927
- (or control flow or).
1928
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
1929
- Enabled: false
1930
-
1931
- Style/NegatedWhile:
1932
- Description: 'Favor until over while for negative conditions.'
1933
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
1934
- Enabled: false
1935
-
1936
- Style/NestedTernaryOperator:
1937
- Description: 'Use one expression per branch in a ternary operator.'
1938
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
1939
- Enabled: false
1940
-
1941
- Style/Next:
1942
- Description: 'Use `next` to skip iteration instead of a condition at the end.'
1943
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
1944
- Enabled: false
1945
-
1946
- Style/NilComparison:
1947
- Description: 'Prefer x.nil? to x == nil.'
1948
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
1949
- Enabled: false
1950
-
1951
- Style/NonNilCheck:
1952
- Description: 'Checks for redundant nil checks.'
1953
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
1954
- Enabled: false
1955
-
1956
- Style/Not:
1957
- Description: 'Use ! instead of not.'
1958
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
1959
- Enabled: false
1960
-
1961
- Style/NumericLiterals:
1962
- Description: >-
1963
- Add underscores to large numeric literals to improve their
1964
- readability.
1965
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
1966
- Enabled: false
1967
-
1968
- Style/OneLineConditional:
1969
- Description: >-
1970
- Favor the ternary operator(?:) over
1971
- if/then/else/end constructs.
1972
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
1973
- Enabled: false
1974
-
1975
- Style/OpMethod:
1976
- Description: 'When defining binary operators, name the argument other.'
1977
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
1978
- Enabled: false
1979
-
1980
- Style/OptionalArguments:
1981
- Description: >-
1982
- Checks for optional arguments that do not appear at the end
1983
- of the argument list
1984
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
1985
- Enabled: false
1986
-
1987
- Style/ParallelAssignment:
1988
- Description: >-
1989
- Check for simple usages of parallel assignment.
1990
- It will only warn when the number of variables
1991
- matches on both sides of the assignment.
1992
- This also provides performance benefits
1993
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
1994
- Enabled: false
1995
-
1996
- Style/ParenthesesAroundCondition:
1997
- Description: >-
1998
- Don't use parentheses around the condition of an
1999
- if/unless/while.
2000
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
2001
- Enabled: false
2002
-
2003
- Style/PercentLiteralDelimiters:
2004
- Description: 'Use `%`-literal delimiters consistently'
2005
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
2006
- Enabled: false
2007
-
2008
- Style/PercentQLiterals:
2009
- Description: 'Checks if uses of %Q/%q match the configured preference.'
2010
- Enabled: false
2011
-
2012
- Style/PerlBackrefs:
2013
- Description: 'Avoid Perl-style regex back references.'
2014
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
2015
- Enabled: false
2016
-
2017
- Style/PredicateName:
2018
- Description: 'Check the names of predicate methods.'
2019
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
2020
- Enabled: false
2021
-
2022
- Style/Proc:
2023
- Description: 'Use proc instead of Proc.new.'
2024
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
2025
- Enabled: false
2026
-
2027
- Style/RaiseArgs:
2028
- Description: 'Checks the arguments passed to raise/fail.'
2029
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
2030
- Enabled: false
2031
-
2032
- Style/RedundantBegin:
2033
- Description: "Don't use begin blocks when they are not needed."
2034
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
2035
- Enabled: false
2036
-
2037
- Style/RedundantException:
2038
- Description: "Checks for an obsolete RuntimeException argument in raise/fail."
2039
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
2040
- Enabled: false
2041
-
2042
- Style/RedundantReturn:
2043
- Description: "Don't use return where it's not required."
2044
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
2045
- Enabled: false
2046
-
2047
- Style/RedundantSelf:
2048
- Description: "Don't use self where it's not needed."
2049
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
2050
- Enabled: false
2051
-
2052
- Style/RegexpLiteral:
2053
- Description: 'Use / or %r around regular expressions.'
2054
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
2055
- Enabled: false
2056
-
2057
- Style/RescueEnsureAlignment:
2058
- Description: 'Align rescues and ensures correctly.'
2059
- Enabled: false
2060
-
2061
- Style/RescueModifier:
2062
- Description: 'Avoid using rescue in its modifier form.'
2063
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
2064
- Enabled: false
2065
-
2066
- Style/SelfAssignment:
2067
- Description: >-
2068
- Checks for places where self-assignment shorthand should have
2069
- been used.
2070
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
2071
- Enabled: false
2072
-
2073
- Style/Semicolon:
2074
- Description: "Don't use semicolons to terminate expressions."
2075
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
2076
- Enabled: false
2077
-
2078
- Style/SignalException:
2079
- Description: 'Checks for proper usage of fail and raise.'
2080
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
2081
- Enabled: false
2082
-
2083
- Style/SingleLineBlockParams:
2084
- Description: 'Enforces the names of some block params.'
2085
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
2086
- Enabled: false
2087
-
2088
- Style/SingleLineMethods:
2089
- Description: 'Avoid single-line methods.'
2090
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
2091
- Enabled: false
2092
-
2093
- Style/SpaceBeforeFirstArg:
2094
- Description: >-
2095
- Checks that exactly one space is used between a method name
2096
- and the first argument for method calls without parentheses.
2097
- Enabled: true
2098
-
2099
- Style/SpaceAfterColon:
2100
- Description: 'Use spaces after colons.'
2101
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
2102
- Enabled: false
2103
-
2104
- Style/SpaceAfterComma:
2105
- Description: 'Use spaces after commas.'
2106
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
2107
- Enabled: false
2108
-
2109
- Style/SpaceAroundKeyword:
2110
- Description: 'Use spaces around keywords.'
2111
- Enabled: false
2112
-
2113
- Style/SpaceAfterMethodName:
2114
- Description: >-
2115
- Do not put a space between a method name and the opening
2116
- parenthesis in a method definition.
2117
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
2118
- Enabled: false
2119
-
2120
- Style/SpaceAfterNot:
2121
- Description: Tracks redundant space after the ! operator.
2122
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
2123
- Enabled: false
2124
-
2125
- Style/SpaceAfterSemicolon:
2126
- Description: 'Use spaces after semicolons.'
2127
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
2128
- Enabled: false
2129
-
2130
- Style/SpaceBeforeBlockBraces:
2131
- Description: >-
2132
- Checks that the left block brace has or doesn't have space
2133
- before it.
2134
- Enabled: false
2135
-
2136
- Style/SpaceBeforeComma:
2137
- Description: 'No spaces before commas.'
2138
- Enabled: false
2139
-
2140
- Style/SpaceBeforeComment:
2141
- Description: >-
2142
- Checks for missing space between code and a comment on the
2143
- same line.
2144
- Enabled: false
2145
-
2146
- Style/SpaceBeforeSemicolon:
2147
- Description: 'No spaces before semicolons.'
2148
- Enabled: false
2149
-
2150
- Style/SpaceInsideBlockBraces:
2151
- Description: >-
2152
- Checks that block braces have or don't have surrounding space.
2153
- For blocks taking parameters, checks that the left brace has
2154
- or doesn't have trailing space.
2155
- Enabled: false
2156
-
2157
- Style/SpaceAroundBlockParameters:
2158
- Description: 'Checks the spacing inside and after block parameters pipes.'
2159
- Enabled: false
2160
-
2161
- Style/SpaceAroundEqualsInParameterDefault:
2162
- Description: >-
2163
- Checks that the equals signs in parameter default assignments
2164
- have or don't have surrounding space depending on
2165
- configuration.
2166
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
2167
- Enabled: false
2168
-
2169
- Style/SpaceAroundOperators:
2170
- Description: 'Use a single space around operators.'
2171
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
2172
- Enabled: false
2173
-
2174
- Style/SpaceInsideBrackets:
2175
- Description: 'No spaces after [ or before ].'
2176
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
2177
- Enabled: false
2178
-
2179
- Style/SpaceInsideHashLiteralBraces:
2180
- Description: "Use spaces inside hash literal braces - or don't."
2181
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
2182
- Enabled: false
2183
-
2184
- Style/SpaceInsideParens:
2185
- Description: 'No spaces after ( or before ).'
2186
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
2187
- Enabled: false
2188
-
2189
- Style/SpaceInsideRangeLiteral:
2190
- Description: 'No spaces inside range literals.'
2191
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
2192
- Enabled: false
2193
-
2194
- Style/SpaceInsideStringInterpolation:
2195
- Description: 'Checks for padding/surrounding spaces inside string interpolation.'
2196
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
2197
- Enabled: false
2198
-
2199
- Style/SpecialGlobalVars:
2200
- Description: 'Avoid Perl-style global variables.'
2201
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
2202
- Enabled: false
2203
-
2204
- Style/StringLiterals:
2205
- Description: 'Checks if uses of quotes match the configured preference.'
2206
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
2207
- Enabled: false
2208
-
2209
- Style/StringLiteralsInInterpolation:
2210
- Description: >-
2211
- Checks if uses of quotes inside expressions in interpolated
2212
- strings match the configured preference.
2213
- Enabled: false
2214
-
2215
- Style/StructInheritance:
2216
- Description: 'Checks for inheritance from Struct.new.'
2217
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
2218
- Enabled: false
2219
-
2220
- Style/SymbolLiteral:
2221
- Description: 'Use plain symbols instead of string symbols when possible.'
2222
- Enabled: false
2223
-
2224
- Style/SymbolProc:
2225
- Description: 'Use symbols as procs instead of blocks when possible.'
2226
- Enabled: false
2227
-
2228
- Style/Tab:
2229
- Description: 'No hard tabs.'
2230
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
2231
- Enabled: false
2232
-
2233
- Style/TrailingBlankLines:
2234
- Description: 'Checks trailing blank lines and final newline.'
2235
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
2236
- Enabled: false
2237
-
2238
- Style/TrailingCommaInArguments:
2239
- Description: 'Checks for trailing comma in parameter lists.'
2240
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
2241
- Enabled: false
2242
-
2243
- Style/TrailingCommaInLiteral:
2244
- Description: 'Checks for trailing comma in literals.'
2245
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
2246
- Enabled: false
2247
-
2248
- Style/TrailingWhitespace:
2249
- Description: 'Avoid trailing whitespace.'
2250
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
2251
- Enabled: false
2252
-
2253
- Style/TrivialAccessors:
2254
- Description: 'Prefer attr_* methods to trivial readers/writers.'
2255
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
2256
- Enabled: false
2257
-
2258
- Style/UnlessElse:
2259
- Description: >-
2260
- Do not use unless with else. Rewrite these with the positive
2261
- case first.
2262
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
2263
- Enabled: false
2264
-
2265
- Style/UnneededCapitalW:
2266
- Description: 'Checks for %W when interpolation is not needed.'
2267
- Enabled: false
2268
-
2269
- Style/UnneededPercentQ:
2270
- Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
2271
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
2272
- Enabled: false
2273
-
2274
- Style/TrailingUnderscoreVariable:
2275
- Description: >-
2276
- Checks for the usage of unneeded trailing underscores at the
2277
- end of parallel variable assignment.
2278
- Enabled: false
2279
-
2280
- Style/VariableInterpolation:
2281
- Description: >-
2282
- Don't interpolate global, instance and class variables
2283
- directly in strings.
2284
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
2285
- Enabled: false
2286
-
2287
- Style/VariableName:
2288
- Description: 'Use the configured style when naming variables.'
2289
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
2290
- Enabled: false
2291
-
2292
- Style/WhenThen:
2293
- Description: 'Use when x then ... for one-line cases.'
2294
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
2295
- Enabled: false
2296
-
2297
- Style/WhileUntilDo:
2298
- Description: 'Checks for redundant do after while or until.'
2299
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
2300
- Enabled: false
2301
-
2302
- Style/WhileUntilModifier:
2303
- Description: >-
2304
- Favor modifier while/until usage when you have a
2305
- single-line body.
2306
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
2307
- Enabled: false
2308
-
2309
- Style/WordArray:
2310
- Description: 'Use %w or %W for arrays of words.'
2311
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
2312
- Enabled: false
2313
- AllCops:
2314
- DisabledByDefault: true
2315
-
2316
- #################### Lint ################################
2317
-
2318
- Lint/AmbiguousOperator:
2319
- Description: >-
2320
- Checks for ambiguous operators in the first argument of a
2321
- method invocation without parentheses.
2322
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
2323
- Enabled: true
2324
-
2325
- Lint/AmbiguousRegexpLiteral:
2326
- Description: >-
2327
- Checks for ambiguous regexp literals in the first argument of
2328
- a method invocation without parenthesis.
2329
- Enabled: true
2330
-
2331
- Lint/AssignmentInCondition:
2332
- Description: "Don't use assignment in conditions."
2333
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
2334
- Enabled: true
2335
-
2336
- Lint/BlockAlignment:
2337
- Description: 'Align block ends correctly.'
2338
- Enabled: true
2339
-
2340
- Lint/CircularArgumentReference:
2341
- Description: "Don't refer to the keyword argument in the default value."
2342
- Enabled: true
2343
-
2344
- Lint/ConditionPosition:
2345
- Description: >-
2346
- Checks for condition placed in a confusing position relative to
2347
- the keyword.
2348
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
2349
- Enabled: true
2350
-
2351
- Lint/Debugger:
2352
- Description: 'Check for debugger calls.'
2353
- Enabled: true
2354
-
2355
- Lint/DefEndAlignment:
2356
- Description: 'Align ends corresponding to defs correctly.'
2357
- Enabled: true
2358
-
2359
- Lint/DeprecatedClassMethods:
2360
- Description: 'Check for deprecated class method calls.'
2361
- Enabled: true
2362
-
2363
- Lint/DuplicateMethods:
2364
- Description: 'Check for duplicate methods calls.'
2365
- Enabled: true
2366
-
2367
- Lint/EachWithObjectArgument:
2368
- Description: 'Check for immutable argument given to each_with_object.'
2369
- Enabled: true
2370
-
2371
- Lint/ElseLayout:
2372
- Description: 'Check for odd code arrangement in an else block.'
2373
- Enabled: true
2374
-
2375
- Lint/EmptyEnsure:
2376
- Description: 'Checks for empty ensure block.'
2377
- Enabled: true
2378
-
2379
- Lint/EmptyInterpolation:
2380
- Description: 'Checks for empty string interpolation.'
2381
- Enabled: true
2382
-
2383
- Lint/EndAlignment:
2384
- Description: 'Align ends correctly.'
2385
- Enabled: true
2386
-
2387
- Lint/EndInMethod:
2388
- Description: 'END blocks should not be placed inside method definitions.'
2389
- Enabled: true
2390
-
2391
- Lint/EnsureReturn:
2392
- Description: 'Do not use return in an ensure block.'
2393
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
2394
- Enabled: true
2395
-
2396
- Lint/Eval:
2397
- Description: 'The use of eval represents a serious security risk.'
2398
- Enabled: true
2399
-
2400
- Lint/FormatParameterMismatch:
2401
- Description: 'The number of parameters to format/sprint must match the fields.'
2402
- Enabled: true
2403
-
2404
- Lint/HandleExceptions:
2405
- Description: "Don't suppress exception."
2406
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
2407
- Enabled: true
2408
-
2409
- Lint/InvalidCharacterLiteral:
2410
- Description: >-
2411
- Checks for invalid character literals with a non-escaped
2412
- whitespace character.
2413
- Enabled: true
2414
-
2415
- Lint/LiteralInCondition:
2416
- Description: 'Checks of literals used in conditions.'
2417
- Enabled: true
2418
-
2419
- Lint/LiteralInInterpolation:
2420
- Description: 'Checks for literals used in interpolation.'
2421
- Enabled: true
2422
-
2423
- Lint/Loop:
2424
- Description: >-
2425
- Use Kernel#loop with break rather than begin/end/until or
2426
- begin/end/while for post-loop tests.
2427
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
2428
- Enabled: true
2429
-
2430
- Lint/NestedMethodDefinition:
2431
- Description: 'Do not use nested method definitions.'
2432
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
2433
- Enabled: true
2434
-
2435
- Lint/NonLocalExitFromIterator:
2436
- Description: 'Do not use return in iterator to cause non-local exit.'
2437
- Enabled: true
2438
-
2439
- Lint/ParenthesesAsGroupedExpression:
2440
- Description: >-
2441
- Checks for method calls with a space before the opening
2442
- parenthesis.
2443
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
2444
- Enabled: true
2445
-
2446
- Lint/RequireParentheses:
2447
- Description: >-
2448
- Use parentheses in the method call to avoid confusion
2449
- about precedence.
2450
- Enabled: true
2451
-
2452
- Lint/RescueException:
2453
- Description: 'Avoid rescuing the Exception class.'
2454
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
2455
- Enabled: true
2456
-
2457
- Lint/ShadowingOuterLocalVariable:
2458
- Description: >-
2459
- Do not use the same name as outer local variable
2460
- for block arguments or block local variables.
2461
- Enabled: true
2462
-
2463
- Lint/StringConversionInInterpolation:
2464
- Description: 'Checks for Object#to_s usage in string interpolation.'
2465
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
2466
- Enabled: true
2467
-
2468
- Lint/UnderscorePrefixedVariableName:
2469
- Description: 'Do not use prefix `_` for a variable that is used.'
2470
- Enabled: true
2471
-
2472
- Lint/UnneededDisable:
2473
- Description: >-
2474
- Checks for rubocop:disable comments that can be removed.
2475
- Note: this cop is not disabled when disabling all cops.
2476
- It must be explicitly disabled.
2477
- Enabled: true
2478
-
2479
- Lint/UnusedBlockArgument:
2480
- Description: 'Checks for unused block arguments.'
2481
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
2482
- Enabled: true
2483
-
2484
- Lint/UnusedMethodArgument:
2485
- Description: 'Checks for unused method arguments.'
2486
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
2487
- Enabled: true
2488
-
2489
- Lint/UnreachableCode:
2490
- Description: 'Unreachable code.'
2491
- Enabled: true
2492
-
2493
- Lint/UselessAccessModifier:
2494
- Description: 'Checks for useless access modifiers.'
2495
- Enabled: true
2496
-
2497
- Lint/UselessAssignment:
2498
- Description: 'Checks for useless assignment to a local variable.'
2499
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
2500
- Enabled: true
2501
-
2502
- Lint/UselessComparison:
2503
- Description: 'Checks for comparison of something with itself.'
2504
- Enabled: true
2505
-
2506
- Lint/UselessElseWithoutRescue:
2507
- Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
2508
- Enabled: true
2509
-
2510
- Lint/UselessSetterCall:
2511
- Description: 'Checks for useless setter call to a local variable.'
2512
- Enabled: true
2513
-
2514
- Lint/Void:
2515
- Description: 'Possible use of operator/literal/variable in void context.'
2516
- Enabled: true
2517
-
2518
- ###################### Metrics ####################################
2519
-
2520
- Metrics/AbcSize:
2521
- Description: >-
2522
- A calculated magnitude based on number of assignments,
2523
- branches, and conditions.
2524
- Reference: 'http://c2.com/cgi/wiki?AbcMetric'
2525
- Enabled: false
2526
- Max: 20
2527
-
2528
- Metrics/BlockNesting:
2529
- Description: 'Avoid excessive block nesting'
2530
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
2531
- Enabled: true
2532
- Max: 4
2533
-
2534
- Metrics/ClassLength:
2535
- Description: 'Avoid classes longer than 250 lines of code.'
2536
- Enabled: true
2537
- Max: 250
2538
-
2539
- Metrics/CyclomaticComplexity:
2540
- Description: >-
2541
- A complexity metric that is strongly correlated to the number
2542
- of test cases needed to validate a method.
2543
- Enabled: true
2544
-
2545
- Metrics/LineLength:
2546
- Description: 'Limit lines to 80 characters.'
2547
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
2548
- Enabled: false
2549
-
2550
- Metrics/MethodLength:
2551
- Description: 'Avoid methods longer than 30 lines of code.'
2552
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
2553
- Enabled: true
2554
- Max: 30
2555
-
2556
- Metrics/ModuleLength:
2557
- Description: 'Avoid modules longer than 250 lines of code.'
2558
- Enabled: true
2559
- Max: 250
2560
-
2561
- Metrics/ParameterLists:
2562
- Description: 'Avoid parameter lists longer than three or four parameters.'
2563
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
2564
- Enabled: true
2565
-
2566
- Metrics/PerceivedComplexity:
2567
- Description: >-
2568
- A complexity metric geared towards measuring complexity for a
2569
- human reader.
2570
- Enabled: false
2571
-
2572
- ##################### Performance #############################
2573
-
2574
- Performance/Count:
2575
- Description: >-
2576
- Use `count` instead of `select...size`, `reject...size`,
2577
- `select...count`, `reject...count`, `select...length`,
2578
- and `reject...length`.
2579
- Enabled: true
2580
-
2581
- Performance/Detect:
2582
- Description: >-
2583
- Use `detect` instead of `select.first`, `find_all.first`,
2584
- `select.last`, and `find_all.last`.
2585
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
2586
- Enabled: true
2587
-
2588
- Performance/FlatMap:
2589
- Description: >-
2590
- Use `Enumerable#flat_map`
2591
- instead of `Enumerable#map...Array#flatten(1)`
2592
- or `Enumberable#collect..Array#flatten(1)`
2593
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
2594
- Enabled: true
2595
- EnabledForFlattenWithoutParams: false
2596
- # If enabled, this cop will warn about usages of
2597
- # `flatten` being called without any parameters.
2598
- # This can be dangerous since `flat_map` will only flatten 1 level, and
2599
- # `flatten` without any parameters can flatten multiple levels.
2600
-
2601
- Performance/ReverseEach:
2602
- Description: 'Use `reverse_each` instead of `reverse.each`.'
2603
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
2604
- Enabled: true
2605
-
2606
- Performance/Sample:
2607
- Description: >-
2608
- Use `sample` instead of `shuffle.first`,
2609
- `shuffle.last`, and `shuffle[Fixnum]`.
2610
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
2611
- Enabled: true
2612
-
2613
- Performance/Size:
2614
- Description: >-
2615
- Use `size` instead of `count` for counting
2616
- the number of elements in `Array` and `Hash`.
2617
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
2618
- Enabled: true
2619
-
2620
- Performance/StringReplacement:
2621
- Description: >-
2622
- Use `tr` instead of `gsub` when you are replacing the same
2623
- number of characters. Use `delete` instead of `gsub` when
2624
- you are deleting characters.
2625
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
2626
- Enabled: true
2627
-
2628
- ##################### Rails ##################################
2629
-
2630
- Rails/ActionFilter:
2631
- Description: 'Enforces consistent use of action filter methods.'
2632
- Enabled: false
2633
-
2634
- Rails/Date:
2635
- Description: >-
2636
- Checks the correct usage of date aware methods,
2637
- such as Date.today, Date.current etc.
2638
- Enabled: false
2639
-
2640
- Rails/Delegate:
2641
- Description: 'Prefer delegate method for delegations.'
2642
- Enabled: false
2643
-
2644
- Rails/FindBy:
2645
- Description: 'Prefer find_by over where.first.'
2646
- Enabled: false
2647
-
2648
- Rails/FindEach:
2649
- Description: 'Prefer all.find_each over all.find.'
2650
- Enabled: false
2651
-
2652
- Rails/HasAndBelongsToMany:
2653
- Description: 'Prefer has_many :through to has_and_belongs_to_many.'
2654
- Enabled: false
2655
-
2656
- Rails/Output:
2657
- Description: 'Checks for calls to puts, print, etc.'
2658
- Enabled: false
2659
-
2660
- Rails/ReadWriteAttribute:
2661
- Description: >-
2662
- Checks for read_attribute(:attr) and
2663
- write_attribute(:attr, val).
2664
- Enabled: false
2665
-
2666
- Rails/ScopeArgs:
2667
- Description: 'Checks the arguments of ActiveRecord scopes.'
2668
- Enabled: false
2669
-
2670
- Rails/TimeZone:
2671
- Description: 'Checks the correct usage of time zone aware methods.'
2672
- StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
2673
- Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
2674
- Enabled: false
2675
-
2676
- Rails/Validation:
2677
- Description: 'Use validates :attribute, hash of validations.'
2678
- Enabled: false
2679
-
2680
- ################## Style #################################
2681
-
2682
- Style/AccessModifierIndentation:
2683
- Description: Check indentation of private/protected visibility modifiers.
2684
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
2685
- Enabled: false
2686
-
2687
- Style/AccessorMethodName:
2688
- Description: Check the naming of accessor methods for get_/set_.
2689
- Enabled: false
2690
-
2691
- Style/Alias:
2692
- Description: 'Use alias_method instead of alias.'
2693
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
2694
- Enabled: false
2695
-
2696
- Style/AlignArray:
2697
- Description: >-
2698
- Align the elements of an array literal if they span more than
2699
- one line.
2700
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
2701
- Enabled: false
2702
-
2703
- Style/AlignHash:
2704
- Description: >-
2705
- Align the elements of a hash literal if they span more than
2706
- one line.
2707
- Enabled: false
2708
-
2709
- Style/AlignParameters:
2710
- Description: >-
2711
- Align the parameters of a method call if they span more
2712
- than one line.
2713
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
2714
- Enabled: false
2715
-
2716
- Style/AndOr:
2717
- Description: 'Use &&/|| instead of and/or.'
2718
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
2719
- Enabled: false
2720
-
2721
- Style/ArrayJoin:
2722
- Description: 'Use Array#join instead of Array#*.'
2723
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
2724
- Enabled: false
2725
-
2726
- Style/AsciiComments:
2727
- Description: 'Use only ascii symbols in comments.'
2728
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
2729
- Enabled: false
2730
-
2731
- Style/AsciiIdentifiers:
2732
- Description: 'Use only ascii symbols in identifiers.'
2733
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
2734
- Enabled: false
2735
-
2736
- Style/Attr:
2737
- Description: 'Checks for uses of Module#attr.'
2738
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
2739
- Enabled: false
2740
-
2741
- Style/BeginBlock:
2742
- Description: 'Avoid the use of BEGIN blocks.'
2743
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
2744
- Enabled: false
2745
-
2746
- Style/BarePercentLiterals:
2747
- Description: 'Checks if usage of %() or %Q() matches configuration.'
2748
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
2749
- Enabled: false
2750
-
2751
- Style/BlockComments:
2752
- Description: 'Do not use block comments.'
2753
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
2754
- Enabled: false
2755
-
2756
- Style/BlockEndNewline:
2757
- Description: 'Put end statement of multiline block on its own line.'
2758
- Enabled: false
2759
-
2760
- Style/BlockDelimiters:
2761
- Description: >-
2762
- Avoid using {...} for multi-line blocks (multiline chaining is
2763
- always ugly).
2764
- Prefer {...} over do...end for single-line blocks.
2765
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
2766
- Enabled: false
2767
-
2768
- Style/BracesAroundHashParameters:
2769
- Description: 'Enforce braces style around hash parameters.'
2770
- Enabled: false
2771
-
2772
- Style/CaseEquality:
2773
- Description: 'Avoid explicit use of the case equality operator(===).'
2774
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
2775
- Enabled: false
2776
-
2777
- Style/CaseIndentation:
2778
- Description: 'Indentation of when in a case/when/[else/]end.'
2779
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
2780
- Enabled: false
2781
-
2782
- Style/CharacterLiteral:
2783
- Description: 'Checks for uses of character literals.'
2784
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
2785
- Enabled: false
2786
-
2787
- Style/ClassAndModuleCamelCase:
2788
- Description: 'Use CamelCase for classes and modules.'
2789
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
2790
- Enabled: false
2791
-
2792
- Style/ClassAndModuleChildren:
2793
- Description: 'Checks style of children classes and modules.'
2794
- Enabled: false
2795
-
2796
- Style/ClassCheck:
2797
- Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
2798
- Enabled: false
2799
-
2800
- Style/ClassMethods:
2801
- Description: 'Use self when defining module/class methods.'
2802
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
2803
- Enabled: false
2804
-
2805
- Style/ClassVars:
2806
- Description: 'Avoid the use of class variables.'
2807
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
2808
- Enabled: false
2809
-
2810
- Style/ClosingParenthesisIndentation:
2811
- Description: 'Checks the indentation of hanging closing parentheses.'
2812
- Enabled: false
2813
-
2814
- Style/ColonMethodCall:
2815
- Description: 'Do not use :: for method call.'
2816
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
2817
- Enabled: false
2818
-
2819
- Style/CommandLiteral:
2820
- Description: 'Use `` or %x around command literals.'
2821
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
2822
- Enabled: false
2823
-
2824
- Style/CommentAnnotation:
2825
- Description: 'Checks formatting of annotation comments.'
2826
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
2827
- Enabled: false
2828
-
2829
- Style/CommentIndentation:
2830
- Description: 'Indentation of comments.'
2831
- Enabled: false
2832
-
2833
- Style/ConstantName:
2834
- Description: 'Constants should use SCREAMING_SNAKE_CASE.'
2835
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
2836
- Enabled: false
2837
-
2838
- Style/DefWithParentheses:
2839
- Description: 'Use def with parentheses when there are arguments.'
2840
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
2841
- Enabled: false
2842
-
2843
- Style/DeprecatedHashMethods:
2844
- Description: 'Checks for use of deprecated Hash methods.'
2845
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
2846
- Enabled: false
2847
-
2848
- Style/Documentation:
2849
- Description: 'Document classes and non-namespace modules.'
2850
- Enabled: false
2851
-
2852
- Style/DotPosition:
2853
- Description: 'Checks the position of the dot in multi-line method calls.'
2854
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
2855
- Enabled: false
2856
-
2857
- Style/DoubleNegation:
2858
- Description: 'Checks for uses of double negation (!!).'
2859
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
2860
- Enabled: false
2861
-
2862
- Style/EachWithObject:
2863
- Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
2864
- Enabled: false
2865
-
2866
- Style/ElseAlignment:
2867
- Description: 'Align elses and elsifs correctly.'
2868
- Enabled: false
2869
-
2870
- Style/EmptyElse:
2871
- Description: 'Avoid empty else-clauses.'
2872
- Enabled: false
2873
-
2874
- Style/EmptyLineBetweenDefs:
2875
- Description: 'Use empty lines between defs.'
2876
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
2877
- Enabled: false
2878
-
2879
- Style/EmptyLines:
2880
- Description: "Don't use several empty lines in a row."
2881
- Enabled: false
2882
-
2883
- Style/EmptyLinesAroundAccessModifier:
2884
- Description: "Keep blank lines around access modifiers."
2885
- Enabled: false
2886
-
2887
- Style/EmptyLinesAroundBlockBody:
2888
- Description: "Keeps track of empty lines around block bodies."
2889
- Enabled: false
2890
-
2891
- Style/EmptyLinesAroundClassBody:
2892
- Description: "Keeps track of empty lines around class bodies."
2893
- Enabled: false
2894
-
2895
- Style/EmptyLinesAroundModuleBody:
2896
- Description: "Keeps track of empty lines around module bodies."
2897
- Enabled: false
2898
-
2899
- Style/EmptyLinesAroundMethodBody:
2900
- Description: "Keeps track of empty lines around method bodies."
2901
- Enabled: false
2902
-
2903
- Style/EmptyLiteral:
2904
- Description: 'Prefer literals to Array.new/Hash.new/String.new.'
2905
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
2906
- Enabled: false
2907
-
2908
- Style/EndBlock:
2909
- Description: 'Avoid the use of END blocks.'
2910
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
2911
- Enabled: false
2912
-
2913
- Style/EndOfLine:
2914
- Description: 'Use Unix-style line endings.'
2915
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
2916
- Enabled: false
2917
-
2918
- Style/EvenOdd:
2919
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
2920
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
2921
- Enabled: false
2922
-
2923
- Style/ExtraSpacing:
2924
- Description: 'Do not use unnecessary spacing.'
2925
- Enabled: false
2926
-
2927
- Style/FileName:
2928
- Description: 'Use snake_case for source file names.'
2929
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
2930
- Enabled: false
2931
-
2932
- Style/InitialIndentation:
2933
- Description: >-
2934
- Checks the indentation of the first non-blank non-comment line in a file.
2935
- Enabled: false
2936
-
2937
- Style/FirstParameterIndentation:
2938
- Description: 'Checks the indentation of the first parameter in a method call.'
2939
- Enabled: false
2940
-
2941
- Style/FlipFlop:
2942
- Description: 'Checks for flip flops'
2943
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
2944
- Enabled: false
2945
-
2946
- Style/For:
2947
- Description: 'Checks use of for or each in multiline loops.'
2948
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
2949
- Enabled: false
2950
-
2951
- Style/FormatString:
2952
- Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
2953
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
2954
- Enabled: false
2955
-
2956
- Style/GlobalVars:
2957
- Description: 'Do not introduce global variables.'
2958
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
2959
- Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
2960
- Enabled: false
2961
-
2962
- Style/GuardClause:
2963
- Description: 'Check for conditionals that can be replaced with guard clauses'
2964
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
2965
- Enabled: false
2966
-
2967
- Style/HashSyntax:
2968
- Description: >-
2969
- Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
2970
- { :a => 1, :b => 2 }.
2971
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
2972
- Enabled: false
2973
-
2974
- Style/IfUnlessModifier:
2975
- Description: >-
2976
- Favor modifier if/unless usage when you have a
2977
- single-line body.
2978
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
2979
- Enabled: false
2980
-
2981
- Style/IfWithSemicolon:
2982
- Description: 'Do not use if x; .... Use the ternary operator instead.'
2983
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
2984
- Enabled: false
2985
-
2986
- Style/IndentationConsistency:
2987
- Description: 'Keep indentation straight.'
2988
- Enabled: false
2989
-
2990
- Style/IndentationWidth:
2991
- Description: 'Use 2 spaces for indentation.'
2992
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
2993
- Enabled: false
2994
-
2995
- Style/IndentArray:
2996
- Description: >-
2997
- Checks the indentation of the first element in an array
2998
- literal.
2999
- Enabled: false
3000
-
3001
- Style/IndentHash:
3002
- Description: 'Checks the indentation of the first key in a hash literal.'
3003
- Enabled: false
3004
-
3005
- Style/InfiniteLoop:
3006
- Description: 'Use Kernel#loop for infinite loops.'
3007
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
3008
- Enabled: false
3009
-
3010
- Style/Lambda:
3011
- Description: 'Use the new lambda literal syntax for single-line blocks.'
3012
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
3013
- Enabled: false
3014
-
3015
- Style/LambdaCall:
3016
- Description: 'Use lambda.call(...) instead of lambda.(...).'
3017
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
3018
- Enabled: false
3019
-
3020
- Style/LeadingCommentSpace:
3021
- Description: 'Comments should start with a space.'
3022
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
3023
- Enabled: false
3024
-
3025
- Style/LineEndConcatenation:
3026
- Description: >-
3027
- Use \ instead of + or << to concatenate two string literals at
3028
- line end.
3029
- Enabled: false
3030
-
3031
- Style/MethodCallParentheses:
3032
- Description: 'Do not use parentheses for method calls with no arguments.'
3033
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
3034
- Enabled: false
3035
-
3036
- Style/MethodDefParentheses:
3037
- Description: >-
3038
- Checks if the method definitions have or don't have
3039
- parentheses.
3040
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
3041
- Enabled: false
3042
-
3043
- Style/MethodName:
3044
- Description: 'Use the configured style when naming methods.'
3045
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
3046
- Enabled: false
3047
-
3048
- Style/ModuleFunction:
3049
- Description: 'Checks for usage of `extend self` in modules.'
3050
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
3051
- Enabled: false
3052
-
3053
- Style/MultilineBlockChain:
3054
- Description: 'Avoid multi-line chains of blocks.'
3055
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
3056
- Enabled: false
3057
-
3058
- Style/MultilineBlockLayout:
3059
- Description: 'Ensures newlines after multiline block do statements.'
3060
- Enabled: false
3061
-
3062
- Style/MultilineIfThen:
3063
- Description: 'Do not use then for multi-line if/unless.'
3064
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
3065
- Enabled: false
3066
-
3067
- Style/MultilineOperationIndentation:
3068
- Description: >-
3069
- Checks indentation of binary operations that span more than
3070
- one line.
3071
- Enabled: false
3072
-
3073
- Style/MultilineTernaryOperator:
3074
- Description: >-
3075
- Avoid multi-line ?: (the ternary operator);
3076
- use if/unless instead.
3077
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
3078
- Enabled: false
3079
-
3080
- Style/NegatedIf:
3081
- Description: >-
3082
- Favor unless over if for negative conditions
3083
- (or control flow or).
3084
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
3085
- Enabled: false
3086
-
3087
- Style/NegatedWhile:
3088
- Description: 'Favor until over while for negative conditions.'
3089
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
3090
- Enabled: false
3091
-
3092
- Style/NestedTernaryOperator:
3093
- Description: 'Use one expression per branch in a ternary operator.'
3094
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
3095
- Enabled: false
3096
-
3097
- Style/Next:
3098
- Description: 'Use `next` to skip iteration instead of a condition at the end.'
3099
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
3100
- Enabled: false
3101
-
3102
- Style/NilComparison:
3103
- Description: 'Prefer x.nil? to x == nil.'
3104
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
3105
- Enabled: false
3106
-
3107
- Style/NonNilCheck:
3108
- Description: 'Checks for redundant nil checks.'
3109
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
3110
- Enabled: false
3111
-
3112
- Style/Not:
3113
- Description: 'Use ! instead of not.'
3114
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
3115
- Enabled: false
3116
-
3117
- Style/NumericLiterals:
3118
- Description: >-
3119
- Add underscores to large numeric literals to improve their
3120
- readability.
3121
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
3122
- Enabled: false
3123
-
3124
- Style/OneLineConditional:
3125
- Description: >-
3126
- Favor the ternary operator(?:) over
3127
- if/then/else/end constructs.
3128
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
3129
- Enabled: false
3130
-
3131
- Style/OpMethod:
3132
- Description: 'When defining binary operators, name the argument other.'
3133
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
3134
- Enabled: false
3135
-
3136
- Style/OptionalArguments:
3137
- Description: >-
3138
- Checks for optional arguments that do not appear at the end
3139
- of the argument list
3140
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
3141
- Enabled: false
3142
-
3143
- Style/ParallelAssignment:
3144
- Description: >-
3145
- Check for simple usages of parallel assignment.
3146
- It will only warn when the number of variables
3147
- matches on both sides of the assignment.
3148
- This also provides performance benefits
3149
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
3150
- Enabled: false
3151
-
3152
- Style/ParenthesesAroundCondition:
3153
- Description: >-
3154
- Don't use parentheses around the condition of an
3155
- if/unless/while.
3156
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
3157
- Enabled: false
3158
-
3159
- Style/PercentLiteralDelimiters:
3160
- Description: 'Use `%`-literal delimiters consistently'
3161
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
3162
- Enabled: false
3163
-
3164
- Style/PercentQLiterals:
3165
- Description: 'Checks if uses of %Q/%q match the configured preference.'
3166
- Enabled: false
3167
-
3168
- Style/PerlBackrefs:
3169
- Description: 'Avoid Perl-style regex back references.'
3170
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
3171
- Enabled: false
3172
-
3173
- Style/PredicateName:
3174
- Description: 'Check the names of predicate methods.'
3175
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
3176
- Enabled: false
3177
-
3178
- Style/Proc:
3179
- Description: 'Use proc instead of Proc.new.'
3180
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
3181
- Enabled: false
3182
-
3183
- Style/RaiseArgs:
3184
- Description: 'Checks the arguments passed to raise/fail.'
3185
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
3186
- Enabled: false
3187
-
3188
- Style/RedundantBegin:
3189
- Description: "Don't use begin blocks when they are not needed."
3190
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
3191
- Enabled: false
3192
-
3193
- Style/RedundantException:
3194
- Description: "Checks for an obsolete RuntimeException argument in raise/fail."
3195
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
3196
- Enabled: false
3197
-
3198
- Style/RedundantReturn:
3199
- Description: "Don't use return where it's not required."
3200
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
3201
- Enabled: false
3202
-
3203
- Style/RedundantSelf:
3204
- Description: "Don't use self where it's not needed."
3205
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
3206
- Enabled: false
3207
-
3208
- Style/RegexpLiteral:
3209
- Description: 'Use / or %r around regular expressions.'
3210
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
3211
- Enabled: false
3212
-
3213
- Style/RescueEnsureAlignment:
3214
- Description: 'Align rescues and ensures correctly.'
3215
- Enabled: false
3216
-
3217
- Style/RescueModifier:
3218
- Description: 'Avoid using rescue in its modifier form.'
3219
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
3220
- Enabled: false
3221
-
3222
- Style/SelfAssignment:
3223
- Description: >-
3224
- Checks for places where self-assignment shorthand should have
3225
- been used.
3226
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
3227
- Enabled: false
3228
-
3229
- Style/Semicolon:
3230
- Description: "Don't use semicolons to terminate expressions."
3231
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
3232
- Enabled: false
3233
-
3234
- Style/SignalException:
3235
- Description: 'Checks for proper usage of fail and raise.'
3236
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
3237
- Enabled: false
3238
-
3239
- Style/SingleLineBlockParams:
3240
- Description: 'Enforces the names of some block params.'
3241
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
3242
- Enabled: false
3243
-
3244
- Style/SingleLineMethods:
3245
- Description: 'Avoid single-line methods.'
3246
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
3247
- Enabled: false
3248
-
3249
- Style/SpaceBeforeFirstArg:
3250
- Description: >-
3251
- Checks that exactly one space is used between a method name
3252
- and the first argument for method calls without parentheses.
3253
- Enabled: true
3254
-
3255
- Style/SpaceAfterColon:
3256
- Description: 'Use spaces after colons.'
3257
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
3258
- Enabled: false
3259
-
3260
- Style/SpaceAfterComma:
3261
- Description: 'Use spaces after commas.'
3262
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
3263
- Enabled: false
3264
-
3265
- Style/SpaceAroundKeyword:
3266
- Description: 'Use spaces around keywords.'
3267
- Enabled: false
3268
-
3269
- Style/SpaceAfterMethodName:
3270
- Description: >-
3271
- Do not put a space between a method name and the opening
3272
- parenthesis in a method definition.
3273
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
3274
- Enabled: false
3275
-
3276
- Style/SpaceAfterNot:
3277
- Description: Tracks redundant space after the ! operator.
3278
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
3279
- Enabled: false
3280
-
3281
- Style/SpaceAfterSemicolon:
3282
- Description: 'Use spaces after semicolons.'
3283
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
3284
- Enabled: false
3285
-
3286
- Style/SpaceBeforeBlockBraces:
3287
- Description: >-
3288
- Checks that the left block brace has or doesn't have space
3289
- before it.
3290
- Enabled: false
3291
-
3292
- Style/SpaceBeforeComma:
3293
- Description: 'No spaces before commas.'
3294
- Enabled: false
3295
-
3296
- Style/SpaceBeforeComment:
3297
- Description: >-
3298
- Checks for missing space between code and a comment on the
3299
- same line.
3300
- Enabled: false
3301
-
3302
- Style/SpaceBeforeSemicolon:
3303
- Description: 'No spaces before semicolons.'
3304
- Enabled: false
3305
-
3306
- Style/SpaceInsideBlockBraces:
3307
- Description: >-
3308
- Checks that block braces have or don't have surrounding space.
3309
- For blocks taking parameters, checks that the left brace has
3310
- or doesn't have trailing space.
3311
- Enabled: false
3312
-
3313
- Style/SpaceAroundBlockParameters:
3314
- Description: 'Checks the spacing inside and after block parameters pipes.'
3315
- Enabled: false
3316
-
3317
- Style/SpaceAroundEqualsInParameterDefault:
3318
- Description: >-
3319
- Checks that the equals signs in parameter default assignments
3320
- have or don't have surrounding space depending on
3321
- configuration.
3322
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
3323
- Enabled: false
3324
-
3325
- Style/SpaceAroundOperators:
3326
- Description: 'Use a single space around operators.'
3327
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
3328
- Enabled: false
3329
-
3330
- Style/SpaceInsideBrackets:
3331
- Description: 'No spaces after [ or before ].'
3332
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
3333
- Enabled: false
3334
-
3335
- Style/SpaceInsideHashLiteralBraces:
3336
- Description: "Use spaces inside hash literal braces - or don't."
3337
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
3338
- Enabled: false
3339
-
3340
- Style/SpaceInsideParens:
3341
- Description: 'No spaces after ( or before ).'
3342
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
3343
- Enabled: false
3344
-
3345
- Style/SpaceInsideRangeLiteral:
3346
- Description: 'No spaces inside range literals.'
3347
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
3348
- Enabled: false
3349
-
3350
- Style/SpaceInsideStringInterpolation:
3351
- Description: 'Checks for padding/surrounding spaces inside string interpolation.'
3352
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
3353
- Enabled: false
3354
-
3355
- Style/SpecialGlobalVars:
3356
- Description: 'Avoid Perl-style global variables.'
3357
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
3358
- Enabled: false
3359
-
3360
- Style/StringLiterals:
3361
- Description: 'Checks if uses of quotes match the configured preference.'
3362
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
3363
- Enabled: false
3364
-
3365
- Style/StringLiteralsInInterpolation:
3366
- Description: >-
3367
- Checks if uses of quotes inside expressions in interpolated
3368
- strings match the configured preference.
3369
- Enabled: false
3370
-
3371
- Style/StructInheritance:
3372
- Description: 'Checks for inheritance from Struct.new.'
3373
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
3374
- Enabled: false
3375
-
3376
- Style/SymbolLiteral:
3377
- Description: 'Use plain symbols instead of string symbols when possible.'
3378
- Enabled: false
3379
-
3380
- Style/SymbolProc:
3381
- Description: 'Use symbols as procs instead of blocks when possible.'
3382
- Enabled: false
3383
-
3384
- Style/Tab:
3385
- Description: 'No hard tabs.'
3386
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
3387
- Enabled: false
3388
-
3389
- Style/TrailingBlankLines:
3390
- Description: 'Checks trailing blank lines and final newline.'
3391
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
3392
- Enabled: false
3393
-
3394
- Style/TrailingCommaInArguments:
3395
- Description: 'Checks for trailing comma in parameter lists.'
3396
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
3397
- Enabled: false
3398
-
3399
- Style/TrailingCommaInLiteral:
3400
- Description: 'Checks for trailing comma in literals.'
3401
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
3402
- Enabled: false
3403
-
3404
- Style/TrailingWhitespace:
3405
- Description: 'Avoid trailing whitespace.'
3406
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
3407
- Enabled: false
3408
-
3409
- Style/TrivialAccessors:
3410
- Description: 'Prefer attr_* methods to trivial readers/writers.'
3411
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
3412
- Enabled: false
3413
-
3414
- Style/UnlessElse:
3415
- Description: >-
3416
- Do not use unless with else. Rewrite these with the positive
3417
- case first.
3418
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
3419
- Enabled: false
3420
-
3421
- Style/UnneededCapitalW:
3422
- Description: 'Checks for %W when interpolation is not needed.'
3423
- Enabled: false
3424
-
3425
- Style/UnneededPercentQ:
3426
- Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
3427
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
3428
- Enabled: false
3429
-
3430
- Style/TrailingUnderscoreVariable:
3431
- Description: >-
3432
- Checks for the usage of unneeded trailing underscores at the
3433
- end of parallel variable assignment.
3434
- Enabled: false
3435
-
3436
- Style/VariableInterpolation:
3437
- Description: >-
3438
- Don't interpolate global, instance and class variables
3439
- directly in strings.
3440
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
3441
- Enabled: false
3442
-
3443
- Style/VariableName:
3444
- Description: 'Use the configured style when naming variables.'
3445
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
3446
- Enabled: false
3447
-
3448
- Style/WhenThen:
3449
- Description: 'Use when x then ... for one-line cases.'
3450
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
3451
- Enabled: false
3452
-
3453
- Style/WhileUntilDo:
3454
- Description: 'Checks for redundant do after while or until.'
3455
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
3456
- Enabled: false
3457
-
3458
- Style/WhileUntilModifier:
3459
- Description: >-
3460
- Favor modifier while/until usage when you have a
3461
- single-line body.
3462
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
3463
- Enabled: false
3464
-
3465
- Style/WordArray:
3466
- Description: 'Use %w or %W for arrays of words.'
3467
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
3468
- Enabled: false