gist_updater 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/enabled.yml ADDED
@@ -0,0 +1,1492 @@
1
+ # These are all the cops that are enabled in the default configuration.
2
+
3
+ Style/AccessModifierIndentation:
4
+ Description: Check indentation of private/protected visibility modifiers.
5
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
6
+ Enabled: true
7
+
8
+ Style/AccessorMethodName:
9
+ Description: Check the naming of accessor methods for get_/set_.
10
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names'
11
+ Enabled: true
12
+
13
+ Style/Alias:
14
+ Description: 'Use alias instead of alias_method.'
15
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
16
+ Enabled: true
17
+
18
+ Style/AlignArray:
19
+ Description: >-
20
+ Align the elements of an array literal if they span more than
21
+ one line.
22
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
23
+ Enabled: true
24
+
25
+ Style/AlignHash:
26
+ Description: >-
27
+ Align the elements of a hash literal if they span more than
28
+ one line.
29
+ Enabled: true
30
+
31
+ Style/AlignParameters:
32
+ Description: >-
33
+ Align the parameters of a method call if they span more
34
+ than one line.
35
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
36
+ Enabled: true
37
+
38
+ Style/AndOr:
39
+ Description: 'Use &&/|| instead of and/or.'
40
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
41
+ Enabled: true
42
+
43
+ Style/ArrayJoin:
44
+ Description: 'Use Array#join instead of Array#*.'
45
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
46
+ Enabled: true
47
+
48
+ Style/AsciiComments:
49
+ Description: 'Use only ascii symbols in comments.'
50
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
51
+ Enabled: true
52
+
53
+ Style/AsciiIdentifiers:
54
+ Description: 'Use only ascii symbols in identifiers.'
55
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
56
+ Enabled: true
57
+
58
+ Style/Attr:
59
+ Description: 'Checks for uses of Module#attr.'
60
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
61
+ Enabled: true
62
+
63
+ Style/BeginBlock:
64
+ Description: 'Avoid the use of BEGIN blocks.'
65
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
66
+ Enabled: true
67
+
68
+ Style/BarePercentLiterals:
69
+ Description: 'Checks if usage of %() or %Q() matches configuration.'
70
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
71
+ Enabled: true
72
+
73
+ Style/BlockComments:
74
+ Description: 'Do not use block comments.'
75
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
76
+ Enabled: true
77
+
78
+ Style/BlockEndNewline:
79
+ Description: 'Put end statement of multiline block on its own line.'
80
+ Enabled: true
81
+
82
+ Style/BlockDelimiters:
83
+ Description: >-
84
+ Avoid using {...} for multi-line blocks (multiline chaining is
85
+ always ugly).
86
+ Prefer {...} over do...end for single-line blocks.
87
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
88
+ Enabled: true
89
+
90
+ Style/BracesAroundHashParameters:
91
+ Description: 'Enforce braces style around hash parameters.'
92
+ Enabled: true
93
+
94
+ Style/CaseEquality:
95
+ Description: 'Avoid explicit use of the case equality operator(===).'
96
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
97
+ Enabled: true
98
+
99
+ Style/CaseIndentation:
100
+ Description: 'Indentation of when in a case/when/[else/]end.'
101
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
102
+ Enabled: true
103
+
104
+ Style/CharacterLiteral:
105
+ Description: 'Checks for uses of character literals.'
106
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
107
+ Enabled: true
108
+
109
+ Style/ClassAndModuleCamelCase:
110
+ Description: 'Use CamelCase for classes and modules.'
111
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
112
+ Enabled: true
113
+
114
+ Style/ClassAndModuleChildren:
115
+ Description: 'Checks style of children classes and modules.'
116
+ Enabled: true
117
+
118
+ Style/ClassCheck:
119
+ Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
120
+ Enabled: true
121
+
122
+ Style/ClassMethods:
123
+ Description: 'Use self when defining module/class methods.'
124
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
125
+ Enabled: true
126
+
127
+ Style/ClassVars:
128
+ Description: 'Avoid the use of class variables.'
129
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
130
+ Enabled: true
131
+
132
+ Style/ClosingParenthesisIndentation:
133
+ Description: 'Checks the indentation of hanging closing parentheses.'
134
+ Enabled: true
135
+
136
+ Style/ColonMethodCall:
137
+ Description: 'Do not use :: for method call.'
138
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
139
+ Enabled: true
140
+
141
+ Style/CommandLiteral:
142
+ Description: 'Use `` or %x around command literals.'
143
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
144
+ Enabled: true
145
+
146
+ Style/CommentAnnotation:
147
+ Description: >-
148
+ Checks formatting of special comments
149
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
150
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
151
+ Enabled: true
152
+
153
+ Style/CommentIndentation:
154
+ Description: 'Indentation of comments.'
155
+ Enabled: true
156
+
157
+ Style/ConditionalAssignment:
158
+ Description: >-
159
+ Use the return value of `if` and `case` statements for
160
+ assignment to a variable and variable comparison instead
161
+ of assigning that variable inside of each branch.
162
+ Enabled: true
163
+
164
+ Style/ConstantName:
165
+ Description: 'Constants should use SCREAMING_SNAKE_CASE.'
166
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
167
+ Enabled: true
168
+
169
+ Style/DefWithParentheses:
170
+ Description: 'Use def with parentheses when there are arguments.'
171
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
172
+ Enabled: true
173
+
174
+ Style/PreferredHashMethods:
175
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
176
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
177
+ Enabled: true
178
+
179
+ Style/DotPosition:
180
+ Description: 'Checks the position of the dot in multi-line method calls.'
181
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
182
+ Enabled: true
183
+
184
+ Style/DoubleNegation:
185
+ Description: 'Checks for uses of double negation (!!).'
186
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
187
+ Enabled: true
188
+
189
+ Style/EachForSimpleLoop:
190
+ Description: >-
191
+ Use `Integer#times` for a simple loop which iterates a fixed
192
+ number of times.
193
+ Enabled: true
194
+
195
+ Style/EachWithObject:
196
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
197
+ Enabled: true
198
+
199
+ Style/ElseAlignment:
200
+ Description: 'Align elses and elsifs correctly.'
201
+ Enabled: true
202
+
203
+ Style/EmptyElse:
204
+ Description: 'Avoid empty else-clauses.'
205
+ Enabled: true
206
+
207
+ Style/EmptyCaseCondition:
208
+ Description: 'Avoid empty condition in case statements.'
209
+ Enabled: true
210
+
211
+ Style/EmptyLineBetweenDefs:
212
+ Description: 'Use empty lines between defs.'
213
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
214
+ Enabled: true
215
+
216
+ Style/EmptyLines:
217
+ Description: "Don't use several empty lines in a row."
218
+ Enabled: true
219
+
220
+ Style/EmptyLinesAroundAccessModifier:
221
+ Description: "Keep blank lines around access modifiers."
222
+ Enabled: true
223
+
224
+ Style/EmptyLinesAroundBlockBody:
225
+ Description: "Keeps track of empty lines around block bodies."
226
+ Enabled: true
227
+
228
+ Style/EmptyLinesAroundClassBody:
229
+ Description: "Keeps track of empty lines around class bodies."
230
+ Enabled: true
231
+
232
+ Style/EmptyLinesAroundModuleBody:
233
+ Description: "Keeps track of empty lines around module bodies."
234
+ Enabled: true
235
+
236
+ Style/EmptyLinesAroundMethodBody:
237
+ Description: "Keeps track of empty lines around method bodies."
238
+ Enabled: true
239
+
240
+ Style/EmptyLiteral:
241
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
242
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
243
+ Enabled: true
244
+
245
+ Style/EndBlock:
246
+ Description: 'Avoid the use of END blocks.'
247
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
248
+ Enabled: true
249
+
250
+ Style/EndOfLine:
251
+ Description: 'Use Unix-style line endings.'
252
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
253
+ Enabled: true
254
+
255
+ Style/EvenOdd:
256
+ Description: 'Favor the use of Integer#even? && Integer#odd?'
257
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
258
+ Enabled: true
259
+
260
+ Style/ExtraSpacing:
261
+ Description: 'Do not use unnecessary spacing.'
262
+ Enabled: true
263
+
264
+ Style/FileName:
265
+ Description: 'Use snake_case for source file names.'
266
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
267
+ Enabled: true
268
+
269
+ Style/FrozenStringLiteralComment:
270
+ Description: >-
271
+ Add the frozen_string_literal comment to the top of files
272
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
273
+ Enabled: true
274
+
275
+ Style/InitialIndentation:
276
+ Description: >-
277
+ Checks the indentation of the first non-blank non-comment line in a file.
278
+ Enabled: true
279
+
280
+ Style/FirstParameterIndentation:
281
+ Description: 'Checks the indentation of the first parameter in a method call.'
282
+ Enabled: true
283
+
284
+ Style/FlipFlop:
285
+ Description: 'Checks for flip flops'
286
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
287
+ Enabled: true
288
+
289
+ Style/For:
290
+ Description: 'Checks use of for or each in multiline loops.'
291
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
292
+ Enabled: true
293
+
294
+ Style/FormatString:
295
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
296
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
297
+ Enabled: true
298
+
299
+ Style/GlobalVars:
300
+ Description: 'Do not introduce global variables.'
301
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
302
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
303
+ Enabled: true
304
+
305
+ Style/GuardClause:
306
+ Description: 'Check for conditionals that can be replaced with guard clauses'
307
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
308
+ Enabled: true
309
+
310
+ Style/HashSyntax:
311
+ Description: >-
312
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
313
+ { :a => 1, :b => 2 }.
314
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
315
+ Enabled: true
316
+
317
+ Style/IfInsideElse:
318
+ Description: 'Finds if nodes inside else, which can be converted to elsif.'
319
+ Enabled: true
320
+
321
+ Style/IfUnlessModifier:
322
+ Description: >-
323
+ Favor modifier if/unless usage when you have a
324
+ single-line body.
325
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
326
+ Enabled: true
327
+
328
+ Style/IfUnlessModifierOfIfUnless:
329
+ Description: >-
330
+ Avoid modifier if/unless usage on conditionals.
331
+ Enabled: true
332
+
333
+ Style/IfWithSemicolon:
334
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
335
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
336
+ Enabled: true
337
+
338
+ Style/IndentationConsistency:
339
+ Description: 'Keep indentation straight.'
340
+ Enabled: true
341
+
342
+ Style/IndentationWidth:
343
+ Description: 'Use 2 spaces for indentation.'
344
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
345
+ Enabled: true
346
+
347
+ Style/IdenticalConditionalBranches:
348
+ Description: >-
349
+ Checks that conditional statements do not have an identical
350
+ line at the end of each branch, which can validly be moved
351
+ out of the conditional.
352
+ Enabled: true
353
+
354
+ Style/IndentArray:
355
+ Description: >-
356
+ Checks the indentation of the first element in an array
357
+ literal.
358
+ Enabled: true
359
+
360
+ Style/IndentAssignment:
361
+ Description: >-
362
+ Checks the indentation of the first line of the
363
+ right-hand-side of a multi-line assignment.
364
+ Enabled: true
365
+
366
+ Style/IndentHash:
367
+ Description: 'Checks the indentation of the first key in a hash literal.'
368
+ Enabled: true
369
+
370
+ Style/InfiniteLoop:
371
+ Description: 'Use Kernel#loop for infinite loops.'
372
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
373
+ Enabled: true
374
+
375
+ Style/Lambda:
376
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
377
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
378
+ Enabled: true
379
+
380
+ Style/LambdaCall:
381
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
382
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
383
+ Enabled: true
384
+
385
+ Style/LeadingCommentSpace:
386
+ Description: 'Comments should start with a space.'
387
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
388
+ Enabled: true
389
+
390
+ Style/LineEndConcatenation:
391
+ Description: >-
392
+ Use \ instead of + or << to concatenate two string literals at
393
+ line end.
394
+ Enabled: true
395
+
396
+ Style/MethodCallParentheses:
397
+ Description: 'Do not use parentheses for method calls with no arguments.'
398
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-invocation-parens'
399
+ Enabled: true
400
+
401
+ Style/MethodDefParentheses:
402
+ Description: >-
403
+ Checks if the method definitions have or don't have
404
+ parentheses.
405
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
406
+ Enabled: true
407
+
408
+ Style/MethodName:
409
+ Description: 'Use the configured style when naming methods.'
410
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
411
+ Enabled: true
412
+
413
+ Style/MethodMissing:
414
+ Description: 'Avoid using `method_missing`.'
415
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-method-missing'
416
+ Enabled: true
417
+
418
+ Style/ModuleFunction:
419
+ Description: 'Checks for usage of `extend self` in modules.'
420
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
421
+ Enabled: true
422
+
423
+ Style/MultilineArrayBraceLayout:
424
+ Description: >-
425
+ Checks that the closing brace in an array literal is
426
+ either on the same line as the last array element, or
427
+ a new line.
428
+ Enabled: true
429
+
430
+ Style/MultilineBlockChain:
431
+ Description: 'Avoid multi-line chains of blocks.'
432
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
433
+ Enabled: true
434
+
435
+ Style/MultilineBlockLayout:
436
+ Description: 'Ensures newlines after multiline block do statements.'
437
+ Enabled: true
438
+
439
+ Style/MultilineHashBraceLayout:
440
+ Description: >-
441
+ Checks that the closing brace in a hash literal is
442
+ either on the same line as the last hash element, or
443
+ a new line.
444
+ Enabled: true
445
+
446
+ Style/MultilineIfThen:
447
+ Description: 'Do not use then for multi-line if/unless.'
448
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
449
+ Enabled: true
450
+
451
+ Style/MultilineMethodCallBraceLayout:
452
+ Description: >-
453
+ Checks that the closing brace in a method call is
454
+ either on the same line as the last method argument, or
455
+ a new line.
456
+ Enabled: true
457
+
458
+ Style/MultilineMethodCallIndentation:
459
+ Description: >-
460
+ Checks indentation of method calls with the dot operator
461
+ that span more than one line.
462
+ Enabled: true
463
+
464
+ Style/MultilineMethodDefinitionBraceLayout:
465
+ Description: >-
466
+ Checks that the closing brace in a method definition is
467
+ either on the same line as the last method parameter, or
468
+ a new line.
469
+ Enabled: true
470
+
471
+ Style/MultilineOperationIndentation:
472
+ Description: >-
473
+ Checks indentation of binary operations that span more than
474
+ one line.
475
+ Enabled: true
476
+
477
+ Style/MultilineTernaryOperator:
478
+ Description: >-
479
+ Avoid multi-line ?: (the ternary operator);
480
+ use if/unless instead.
481
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
482
+ Enabled: true
483
+
484
+ Style/MutableConstant:
485
+ Description: 'Do not assign mutable objects to constants.'
486
+ Enabled: true
487
+
488
+ Style/NegatedIf:
489
+ Description: >-
490
+ Favor unless over if for negative conditions
491
+ (or control flow or).
492
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
493
+ Enabled: true
494
+
495
+ Style/NegatedWhile:
496
+ Description: 'Favor until over while for negative conditions.'
497
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
498
+ Enabled: true
499
+
500
+ Style/NestedModifier:
501
+ Description: 'Avoid using nested modifiers.'
502
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers'
503
+ Enabled: true
504
+
505
+ Style/NestedParenthesizedCalls:
506
+ Description: >-
507
+ Parenthesize method calls which are nested inside the
508
+ argument list of another parenthesized method call.
509
+ Enabled: true
510
+
511
+ Style/NestedTernaryOperator:
512
+ Description: 'Use one expression per branch in a ternary operator.'
513
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
514
+ Enabled: true
515
+
516
+ Style/Next:
517
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
518
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
519
+ Enabled: true
520
+
521
+ Style/NilComparison:
522
+ Description: 'Prefer x.nil? to x == nil.'
523
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
524
+ Enabled: true
525
+
526
+ Style/NonNilCheck:
527
+ Description: 'Checks for redundant nil checks.'
528
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
529
+ Enabled: true
530
+
531
+ Style/Not:
532
+ Description: 'Use ! instead of not.'
533
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
534
+ Enabled: true
535
+
536
+ Style/NumericLiterals:
537
+ Description: >-
538
+ Add underscores to large numeric literals to improve their
539
+ readability.
540
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
541
+ Enabled: true
542
+
543
+ Style/NumericLiteralPrefix:
544
+ Description: 'Use smallcase prefixes for numeric literals.'
545
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#numeric-literal-prefixes'
546
+ Enabled: true
547
+
548
+ Style/NumericPredicate:
549
+ Description: >-
550
+ Checks for the use of predicate- or comparison methods for
551
+ numeric comparisons.
552
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
553
+ Enabled: true
554
+
555
+ Style/OneLineConditional:
556
+ Description: >-
557
+ Favor the ternary operator(?:) over
558
+ if/then/else/end constructs.
559
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
560
+ Enabled: true
561
+
562
+ Style/OpMethod:
563
+ Description: 'When defining binary operators, name the argument other.'
564
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
565
+ Enabled: true
566
+
567
+ Style/OptionalArguments:
568
+ Description: >-
569
+ Checks for optional arguments that do not appear at the end
570
+ of the argument list
571
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
572
+ Enabled: true
573
+
574
+ Style/ParallelAssignment:
575
+ Description: >-
576
+ Check for simple usages of parallel assignment.
577
+ It will only warn when the number of variables
578
+ matches on both sides of the assignment.
579
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
580
+ Enabled: true
581
+
582
+ Style/ParenthesesAroundCondition:
583
+ Description: >-
584
+ Don't use parentheses around the condition of an
585
+ if/unless/while.
586
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
587
+ Enabled: true
588
+
589
+ Style/PercentLiteralDelimiters:
590
+ Description: 'Use `%`-literal delimiters consistently'
591
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
592
+ Enabled: true
593
+
594
+ Style/PercentQLiterals:
595
+ Description: 'Checks if uses of %Q/%q match the configured preference.'
596
+ Enabled: true
597
+
598
+ Style/PerlBackrefs:
599
+ Description: 'Avoid Perl-style regex back references.'
600
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
601
+ Enabled: true
602
+
603
+ Style/PredicateName:
604
+ Description: 'Check the names of predicate methods.'
605
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
606
+ Enabled: true
607
+
608
+ Style/Proc:
609
+ Description: 'Use proc instead of Proc.new.'
610
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
611
+ Enabled: true
612
+
613
+ Style/RaiseArgs:
614
+ Description: 'Checks the arguments passed to raise/fail.'
615
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
616
+ Enabled: true
617
+
618
+ Style/RedundantBegin:
619
+ Description: "Don't use begin blocks when they are not needed."
620
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
621
+ Enabled: true
622
+
623
+ Style/RedundantException:
624
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
625
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
626
+ Enabled: true
627
+
628
+ Style/RedundantFreeze:
629
+ Description: "Checks usages of Object#freeze on immutable objects."
630
+ Enabled: true
631
+
632
+ Style/RedundantParentheses:
633
+ Description: "Checks for parentheses that seem not to serve any purpose."
634
+ Enabled: true
635
+
636
+ Style/RedundantReturn:
637
+ Description: "Don't use return where it's not required."
638
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
639
+ Enabled: true
640
+
641
+ Style/RedundantSelf:
642
+ Description: "Don't use self where it's not needed."
643
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
644
+ Enabled: true
645
+
646
+ Style/RegexpLiteral:
647
+ Description: 'Use / or %r around regular expressions.'
648
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
649
+ Enabled: true
650
+
651
+ Style/RescueEnsureAlignment:
652
+ Description: 'Align rescues and ensures correctly.'
653
+ Enabled: true
654
+
655
+ Style/RescueModifier:
656
+ Description: 'Avoid using rescue in its modifier form.'
657
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
658
+ Enabled: true
659
+
660
+ Style/SafeNavigation:
661
+ Description: >-
662
+ This cop transforms usages of a method call safeguarded by
663
+ a check for the existance of the object to
664
+ safe navigation (`&.`).
665
+ Enabled: true
666
+
667
+ Style/SelfAssignment:
668
+ Description: >-
669
+ Checks for places where self-assignment shorthand should have
670
+ been used.
671
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
672
+ Enabled: true
673
+
674
+ Style/Semicolon:
675
+ Description: "Don't use semicolons to terminate expressions."
676
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
677
+ Enabled: true
678
+
679
+ Style/SignalException:
680
+ Description: 'Checks for proper usage of fail and raise.'
681
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail'
682
+ Enabled: true
683
+
684
+ Style/SingleLineBlockParams:
685
+ Description: 'Enforces the names of some block params.'
686
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
687
+ Enabled: true
688
+
689
+ Style/SingleLineMethods:
690
+ Description: 'Avoid single-line methods.'
691
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
692
+ Enabled: true
693
+
694
+ Style/SpaceBeforeFirstArg:
695
+ Description: >-
696
+ Checks that exactly one space is used between a method name
697
+ and the first argument for method calls without parentheses.
698
+ Enabled: true
699
+
700
+ Style/SpaceAfterColon:
701
+ Description: 'Use spaces after colons.'
702
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
703
+ Enabled: true
704
+
705
+ Style/SpaceAfterComma:
706
+ Description: 'Use spaces after commas.'
707
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
708
+ Enabled: true
709
+
710
+ Style/SpaceAfterMethodName:
711
+ Description: >-
712
+ Do not put a space between a method name and the opening
713
+ parenthesis in a method definition.
714
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
715
+ Enabled: true
716
+
717
+ Style/SpaceAfterNot:
718
+ Description: Tracks redundant space after the ! operator.
719
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
720
+ Enabled: true
721
+
722
+ Style/SpaceAfterSemicolon:
723
+ Description: 'Use spaces after semicolons.'
724
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
725
+ Enabled: true
726
+
727
+ Style/SpaceBeforeBlockBraces:
728
+ Description: >-
729
+ Checks that the left block brace has or doesn't have space
730
+ before it.
731
+ Enabled: true
732
+
733
+ Style/SpaceBeforeComma:
734
+ Description: 'No spaces before commas.'
735
+ Enabled: true
736
+
737
+ Style/SpaceBeforeComment:
738
+ Description: >-
739
+ Checks for missing space between code and a comment on the
740
+ same line.
741
+ Enabled: true
742
+
743
+ Style/SpaceBeforeSemicolon:
744
+ Description: 'No spaces before semicolons.'
745
+ Enabled: true
746
+
747
+ Style/SpaceInsideBlockBraces:
748
+ Description: >-
749
+ Checks that block braces have or don't have surrounding space.
750
+ For blocks taking parameters, checks that the left brace has
751
+ or doesn't have trailing space.
752
+ Enabled: true
753
+
754
+ Style/SpaceAroundBlockParameters:
755
+ Description: 'Checks the spacing inside and after block parameters pipes.'
756
+ Enabled: true
757
+
758
+ Style/SpaceAroundEqualsInParameterDefault:
759
+ Description: >-
760
+ Checks that the equals signs in parameter default assignments
761
+ have or don't have surrounding space depending on
762
+ configuration.
763
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
764
+ Enabled: true
765
+
766
+ Style/SpaceAroundKeyword:
767
+ Description: 'Use a space around keywords if appropriate.'
768
+ Enabled: true
769
+
770
+ Style/SpaceAroundOperators:
771
+ Description: 'Use a single space around operators.'
772
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
773
+ Enabled: true
774
+
775
+ Style/SpaceInsideArrayPercentLiteral:
776
+ Description: 'No unnecessary additional spaces between elements in %i/%w literals.'
777
+ Enabled: true
778
+
779
+ Style/SpaceInsidePercentLiteralDelimiters:
780
+ Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
781
+ Enabled: true
782
+
783
+ Style/SpaceInsideBrackets:
784
+ Description: 'No spaces after [ or before ].'
785
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
786
+ Enabled: true
787
+
788
+ Style/SpaceInsideHashLiteralBraces:
789
+ Description: "Use spaces inside hash literal braces - or don't."
790
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
791
+ Enabled: true
792
+
793
+ Style/SpaceInsideParens:
794
+ Description: 'No spaces after ( or before ).'
795
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
796
+ Enabled: true
797
+
798
+ Style/SpaceInsideRangeLiteral:
799
+ Description: 'No spaces inside range literals.'
800
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
801
+ Enabled: true
802
+
803
+ Style/SpaceInsideStringInterpolation:
804
+ Description: 'Checks for padding/surrounding spaces inside string interpolation.'
805
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
806
+ Enabled: true
807
+
808
+ Style/SpecialGlobalVars:
809
+ Description: 'Avoid Perl-style global variables.'
810
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
811
+ Enabled: true
812
+
813
+ Style/StabbyLambdaParentheses:
814
+ Description: 'Check for the usage of parentheses around stabby lambda arguments.'
815
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args'
816
+ Enabled: true
817
+
818
+ Style/StringLiterals:
819
+ Description: 'Checks if uses of quotes match the configured preference.'
820
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
821
+ Enabled: true
822
+
823
+ Style/StringLiteralsInInterpolation:
824
+ Description: >-
825
+ Checks if uses of quotes inside expressions in interpolated
826
+ strings match the configured preference.
827
+ Enabled: true
828
+
829
+ Style/StructInheritance:
830
+ Description: 'Checks for inheritance from Struct.new.'
831
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
832
+ Enabled: true
833
+
834
+ Style/SymbolLiteral:
835
+ Description: 'Use plain symbols instead of string symbols when possible.'
836
+ Enabled: true
837
+
838
+ Style/SymbolProc:
839
+ Description: 'Use symbols as procs instead of blocks when possible.'
840
+ Enabled: true
841
+
842
+ Style/Tab:
843
+ Description: 'No hard tabs.'
844
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
845
+ Enabled: true
846
+
847
+ Style/TernaryParentheses:
848
+ Description: 'Checks for use of parentheses around ternary conditions.'
849
+ Enabled: true
850
+
851
+ Style/TrailingBlankLines:
852
+ Description: 'Checks trailing blank lines and final newline.'
853
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
854
+ Enabled: true
855
+
856
+ Style/TrailingCommaInArguments:
857
+ Description: 'Checks for trailing comma in argument lists.'
858
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
859
+ Enabled: true
860
+
861
+ Style/TrailingCommaInLiteral:
862
+ Description: 'Checks for trailing comma in array and hash literals.'
863
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
864
+ Enabled: true
865
+
866
+ Style/TrailingWhitespace:
867
+ Description: 'Avoid trailing whitespace.'
868
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
869
+ Enabled: true
870
+
871
+ Style/TrivialAccessors:
872
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
873
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
874
+ Enabled: true
875
+
876
+ Style/UnlessElse:
877
+ Description: >-
878
+ Do not use unless with else. Rewrite these with the positive
879
+ case first.
880
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
881
+ Enabled: true
882
+
883
+ Style/UnneededCapitalW:
884
+ Description: 'Checks for %W when interpolation is not needed.'
885
+ Enabled: true
886
+
887
+ Style/UnneededInterpolation:
888
+ Description: 'Checks for strings that are just an interpolated expression.'
889
+ Enabled: true
890
+
891
+ Style/UnneededPercentQ:
892
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
893
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
894
+ Enabled: true
895
+
896
+ Style/TrailingUnderscoreVariable:
897
+ Description: >-
898
+ Checks for the usage of unneeded trailing underscores at the
899
+ end of parallel variable assignment.
900
+ AllowNamedUnderscoreVariables: true
901
+ Enabled: true
902
+
903
+ Style/VariableInterpolation:
904
+ Description: >-
905
+ Don't interpolate global, instance and class variables
906
+ directly in strings.
907
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
908
+ Enabled: true
909
+
910
+ Style/VariableName:
911
+ Description: 'Use the configured style when naming variables.'
912
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
913
+ Enabled: true
914
+
915
+ Style/VariableNumber:
916
+ Description: 'Use the configured style when numbering variables.'
917
+ Enabled: true
918
+
919
+ Style/WhenThen:
920
+ Description: 'Use when x then ... for one-line cases.'
921
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
922
+ Enabled: true
923
+
924
+ Style/WhileUntilDo:
925
+ Description: 'Checks for redundant do after while or until.'
926
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
927
+ Enabled: true
928
+
929
+ Style/WhileUntilModifier:
930
+ Description: >-
931
+ Favor modifier while/until usage when you have a
932
+ single-line body.
933
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
934
+ Enabled: true
935
+
936
+ Style/WordArray:
937
+ Description: 'Use %w or %W for arrays of words.'
938
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
939
+ Enabled: true
940
+
941
+ Style/ZeroLengthPredicate:
942
+ Description: 'Use #empty? when testing for objects of length 0.'
943
+ Enabled: true
944
+
945
+ #################### Metrics ################################
946
+
947
+ Metrics/AbcSize:
948
+ Description: >-
949
+ A calculated magnitude based on number of assignments,
950
+ branches, and conditions.
951
+ Reference: 'http://c2.com/cgi/wiki?AbcMetric'
952
+ Enabled: true
953
+
954
+ Metrics/BlockNesting:
955
+ Description: 'Avoid excessive block nesting'
956
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
957
+ Enabled: true
958
+
959
+ Metrics/ClassLength:
960
+ Description: 'Avoid classes longer than 100 lines of code.'
961
+ Enabled: true
962
+
963
+ Metrics/ModuleLength:
964
+ Description: 'Avoid modules longer than 100 lines of code.'
965
+ Enabled: true
966
+
967
+ Metrics/CyclomaticComplexity:
968
+ Description: >-
969
+ A complexity metric that is strongly correlated to the number
970
+ of test cases needed to validate a method.
971
+ Enabled: true
972
+
973
+ Metrics/LineLength:
974
+ Description: 'Limit lines to 80 characters.'
975
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
976
+ Enabled: true
977
+
978
+ Metrics/MethodLength:
979
+ Description: 'Avoid methods longer than 10 lines of code.'
980
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
981
+ Enabled: true
982
+
983
+ Metrics/ParameterLists:
984
+ Description: 'Avoid parameter lists longer than three or four parameters.'
985
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
986
+ Enabled: true
987
+
988
+ Metrics/PerceivedComplexity:
989
+ Description: >-
990
+ A complexity metric geared towards measuring complexity for a
991
+ human reader.
992
+ Enabled: true
993
+
994
+ #################### Lint ################################
995
+ ### Warnings
996
+
997
+ Lint/AmbiguousOperator:
998
+ Description: >-
999
+ Checks for ambiguous operators in the first argument of a
1000
+ method invocation without parentheses.
1001
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-invocation-parens'
1002
+ Enabled: true
1003
+
1004
+ Lint/AmbiguousRegexpLiteral:
1005
+ Description: >-
1006
+ Checks for ambiguous regexp literals in the first argument of
1007
+ a method invocation without parentheses.
1008
+ Enabled: true
1009
+
1010
+ Lint/AssignmentInCondition:
1011
+ Description: "Don't use assignment in conditions."
1012
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
1013
+ Enabled: true
1014
+
1015
+ Lint/BlockAlignment:
1016
+ Description: 'Align block ends correctly.'
1017
+ Enabled: true
1018
+
1019
+ Lint/CircularArgumentReference:
1020
+ Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
1021
+ Enabled: true
1022
+
1023
+ Lint/ConditionPosition:
1024
+ Description: >-
1025
+ Checks for condition placed in a confusing position relative to
1026
+ the keyword.
1027
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
1028
+ Enabled: true
1029
+
1030
+ Lint/Debugger:
1031
+ Description: 'Check for debugger calls.'
1032
+ Enabled: true
1033
+
1034
+ Lint/DefEndAlignment:
1035
+ Description: 'Align ends corresponding to defs correctly.'
1036
+ Enabled: true
1037
+
1038
+ Lint/DeprecatedClassMethods:
1039
+ Description: 'Check for deprecated class method calls.'
1040
+ Enabled: true
1041
+
1042
+ Lint/DuplicateMethods:
1043
+ Description: 'Check for duplicate method definitions.'
1044
+ Enabled: true
1045
+
1046
+ Lint/DuplicatedKey:
1047
+ Description: 'Check for duplicate keys in hash literals.'
1048
+ Enabled: true
1049
+
1050
+ Lint/EachWithObjectArgument:
1051
+ Description: 'Check for immutable argument given to each_with_object.'
1052
+ Enabled: true
1053
+
1054
+ Lint/ElseLayout:
1055
+ Description: 'Check for odd code arrangement in an else block.'
1056
+ Enabled: true
1057
+
1058
+ Lint/EmptyEnsure:
1059
+ Description: 'Checks for empty ensure block.'
1060
+ Enabled: true
1061
+
1062
+ Lint/EmptyInterpolation:
1063
+ Description: 'Checks for empty string interpolation.'
1064
+ Enabled: true
1065
+
1066
+ Lint/EndAlignment:
1067
+ Description: 'Align ends correctly.'
1068
+ Enabled: true
1069
+
1070
+ Lint/EndInMethod:
1071
+ Description: 'END blocks should not be placed inside method definitions.'
1072
+ Enabled: true
1073
+
1074
+ Lint/EnsureReturn:
1075
+ Description: 'Do not use return in an ensure block.'
1076
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
1077
+ Enabled: true
1078
+
1079
+ Lint/Eval:
1080
+ Description: 'The use of eval represents a serious security risk.'
1081
+ Enabled: true
1082
+
1083
+ Lint/FloatOutOfRange:
1084
+ Description: >-
1085
+ Catches floating-point literals too large or small for Ruby to
1086
+ represent.
1087
+ Enabled: true
1088
+
1089
+ Lint/FormatParameterMismatch:
1090
+ Description: 'The number of parameters to format/sprint must match the fields.'
1091
+ Enabled: true
1092
+
1093
+ Lint/HandleExceptions:
1094
+ Description: "Don't suppress exception."
1095
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
1096
+ Enabled: true
1097
+
1098
+ Lint/ImplicitStringConcatenation:
1099
+ Description: >-
1100
+ Checks for adjacent string literals on the same line, which
1101
+ could better be represented as a single string literal.
1102
+ Enabled: true
1103
+
1104
+ Lint/IneffectiveAccessModifier:
1105
+ Description: >-
1106
+ Checks for attempts to use `private` or `protected` to set
1107
+ the visibility of a class method, which does not work.
1108
+ Enabled: true
1109
+
1110
+ Lint/InheritException:
1111
+ Description: 'Avoid inheriting from the `Exception` class.'
1112
+ Enabled: true
1113
+
1114
+ Lint/InvalidCharacterLiteral:
1115
+ Description: >-
1116
+ Checks for invalid character literals with a non-escaped
1117
+ whitespace character.
1118
+ Enabled: true
1119
+
1120
+ Lint/LiteralInCondition:
1121
+ Description: 'Checks of literals used in conditions.'
1122
+ Enabled: true
1123
+
1124
+ Lint/LiteralInInterpolation:
1125
+ Description: 'Checks for literals used in interpolation.'
1126
+ Enabled: true
1127
+
1128
+ Lint/Loop:
1129
+ Description: >-
1130
+ Use Kernel#loop with break rather than begin/end/until or
1131
+ begin/end/while for post-loop tests.
1132
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
1133
+ Enabled: true
1134
+
1135
+ Lint/NestedMethodDefinition:
1136
+ Description: 'Do not use nested method definitions.'
1137
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
1138
+ Enabled: true
1139
+
1140
+ Lint/NextWithoutAccumulator:
1141
+ Description: >-
1142
+ Do not omit the accumulator when calling `next`
1143
+ in a `reduce`/`inject` block.
1144
+ Enabled: true
1145
+
1146
+ Lint/NonLocalExitFromIterator:
1147
+ Description: 'Do not use return in iterator to cause non-local exit.'
1148
+ Enabled: true
1149
+
1150
+ Lint/ParenthesesAsGroupedExpression:
1151
+ Description: >-
1152
+ Checks for method calls with a space before the opening
1153
+ parenthesis.
1154
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
1155
+ Enabled: true
1156
+
1157
+ Lint/PercentStringArray:
1158
+ Description: >-
1159
+ Checks for unwanted commas and quotes in %w/%W literals.
1160
+ Enabled: true
1161
+
1162
+ Lint/PercentSymbolArray:
1163
+ Description: >-
1164
+ Checks for unwanted commas and colons in %i/%I literals.
1165
+ Enabled: true
1166
+
1167
+ Lint/RandOne:
1168
+ Description: >-
1169
+ Checks for `rand(1)` calls. Such calls always return `0`
1170
+ and most likely a mistake.
1171
+ Enabled: true
1172
+
1173
+ Lint/RequireParentheses:
1174
+ Description: >-
1175
+ Use parentheses in the method call to avoid confusion
1176
+ about precedence.
1177
+ Enabled: true
1178
+
1179
+ Lint/RescueException:
1180
+ Description: 'Avoid rescuing the Exception class.'
1181
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
1182
+ Enabled: true
1183
+
1184
+ Lint/ShadowedException:
1185
+ Description: >-
1186
+ Avoid rescuing a higher level exception
1187
+ before a lower level exception.
1188
+ Enabled: true
1189
+
1190
+ Lint/ShadowingOuterLocalVariable:
1191
+ Description: >-
1192
+ Do not use the same name as outer local variable
1193
+ for block arguments or block local variables.
1194
+ Enabled: true
1195
+
1196
+ Lint/StringConversionInInterpolation:
1197
+ Description: 'Checks for Object#to_s usage in string interpolation.'
1198
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
1199
+ Enabled: true
1200
+
1201
+ Lint/UnderscorePrefixedVariableName:
1202
+ Description: 'Do not use prefix `_` for a variable that is used.'
1203
+ Enabled: true
1204
+
1205
+ Lint/UnifiedInteger:
1206
+ Description: 'Use Integer instead of Fixnum or Bignum'
1207
+ Enabled: true
1208
+
1209
+ Lint/UnneededDisable:
1210
+ Description: >-
1211
+ Checks for rubocop:disable comments that can be removed.
1212
+ Note: this cop is not disabled when disabling all cops.
1213
+ It must be explicitly disabled.
1214
+ Enabled: true
1215
+
1216
+ Lint/UnneededSplatExpansion:
1217
+ Description: 'Checks for splat unnecessarily being called on literals'
1218
+ Enabled: true
1219
+
1220
+ Lint/UnusedBlockArgument:
1221
+ Description: 'Checks for unused block arguments.'
1222
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1223
+ Enabled: true
1224
+
1225
+ Lint/UnusedMethodArgument:
1226
+ Description: 'Checks for unused method arguments.'
1227
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1228
+ Enabled: true
1229
+
1230
+ Lint/UnreachableCode:
1231
+ Description: 'Unreachable code.'
1232
+ Enabled: true
1233
+
1234
+ Lint/UselessAccessModifier:
1235
+ Description: 'Checks for useless access modifiers.'
1236
+ Enabled: true
1237
+ ContextCreatingMethods: []
1238
+
1239
+ Lint/UselessAssignment:
1240
+ Description: 'Checks for useless assignment to a local variable.'
1241
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1242
+ Enabled: true
1243
+
1244
+ Lint/UselessComparison:
1245
+ Description: 'Checks for comparison of something with itself.'
1246
+ Enabled: true
1247
+
1248
+ Lint/UselessElseWithoutRescue:
1249
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
1250
+ Enabled: true
1251
+
1252
+ Lint/UselessSetterCall:
1253
+ Description: 'Checks for useless setter call to a local variable.'
1254
+ Enabled: true
1255
+
1256
+ Lint/Void:
1257
+ Description: 'Possible use of operator/literal/variable in void context.'
1258
+ Enabled: true
1259
+
1260
+ ##################### Performance #############################
1261
+
1262
+ Performance/Casecmp:
1263
+ Description: >-
1264
+ Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`..
1265
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code'
1266
+ Enabled: true
1267
+
1268
+ Performance/CaseWhenSplat:
1269
+ Description: >-
1270
+ Place `when` conditions that use splat at the end
1271
+ of the list of `when` branches.
1272
+ Enabled: true
1273
+
1274
+ Performance/Count:
1275
+ Description: >-
1276
+ Use `count` instead of `select...size`, `reject...size`,
1277
+ `select...count`, `reject...count`, `select...length`,
1278
+ and `reject...length`.
1279
+ # This cop has known compatibility issues with `ActiveRecord` and other
1280
+ # frameworks. ActiveRecord's `count` ignores the block that is passed to it.
1281
+ # For more information, see the documentation in the cop itself.
1282
+ # If you understand the known risk, you can disable `SafeMode`.
1283
+ SafeMode: true
1284
+ Enabled: true
1285
+
1286
+ Performance/Detect:
1287
+ Description: >-
1288
+ Use `detect` instead of `select.first`, `find_all.first`,
1289
+ `select.last`, and `find_all.last`.
1290
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
1291
+ # This cop has known compatibility issues with `ActiveRecord` and other
1292
+ # frameworks. `ActiveRecord` does not implement a `detect` method and `find`
1293
+ # has its own meaning. Correcting `ActiveRecord` methods with this cop
1294
+ # should be considered unsafe.
1295
+ SafeMode: true
1296
+ Enabled: true
1297
+
1298
+ Performance/DoubleStartEndWith:
1299
+ Description: >-
1300
+ Use `str.{start,end}_with?(x, ..., y, ...)`
1301
+ instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
1302
+ Enabled: true
1303
+
1304
+ Performance/EndWith:
1305
+ Description: 'Use `end_with?` instead of a regex match anchored to the end of a string.'
1306
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
1307
+ Enabled: true
1308
+
1309
+ Performance/FixedSize:
1310
+ Description: 'Do not compute the size of statically sized objects except in constants'
1311
+ Enabled: true
1312
+
1313
+ Performance/FlatMap:
1314
+ Description: >-
1315
+ Use `Enumerable#flat_map`
1316
+ instead of `Enumerable#map...Array#flatten(1)`
1317
+ or `Enumberable#collect..Array#flatten(1)`
1318
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
1319
+ Enabled: true
1320
+ EnabledForFlattenWithoutParams: false
1321
+ # If enabled, this cop will warn about usages of
1322
+ # `flatten` being called without any parameters.
1323
+ # This can be dangerous since `flat_map` will only flatten 1 level, and
1324
+ # `flatten` without any parameters can flatten multiple levels.
1325
+
1326
+ Performance/HashEachMethods:
1327
+ Description: >-
1328
+ Use `Hash#each_key` and `Hash#each_value` instead of
1329
+ `Hash#keys.each` and `Hash#values.each`.
1330
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-each'
1331
+ Enabled: true
1332
+ AutoCorrect: false
1333
+
1334
+ Performance/LstripRstrip:
1335
+ Description: 'Use `strip` instead of `lstrip.rstrip`.'
1336
+ Enabled: true
1337
+
1338
+ Performance/RangeInclude:
1339
+ Description: 'Use `Range#cover?` instead of `Range#include?`.'
1340
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code'
1341
+ Enabled: true
1342
+
1343
+ Performance/RedundantBlockCall:
1344
+ Description: 'Use `yield` instead of `block.call`.'
1345
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code'
1346
+ Enabled: true
1347
+
1348
+ Performance/RedundantMatch:
1349
+ Description: >-
1350
+ Use `=~` instead of `String#match` or `Regexp#match` in a context where the
1351
+ returned `MatchData` is not needed.
1352
+ Enabled: true
1353
+
1354
+ Performance/RedundantMerge:
1355
+ Description: 'Use Hash#[]=, rather than Hash#merge! with a single key-value pair.'
1356
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code'
1357
+ Enabled: true
1358
+
1359
+ Performance/RedundantSortBy:
1360
+ Description: 'Use `sort` instead of `sort_by { |x| x }`.'
1361
+ Enabled: true
1362
+
1363
+ Performance/ReverseEach:
1364
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
1365
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
1366
+ Enabled: true
1367
+
1368
+ Performance/Sample:
1369
+ Description: >-
1370
+ Use `sample` instead of `shuffle.first`,
1371
+ `shuffle.last`, and `shuffle[Integer]`.
1372
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
1373
+ Enabled: true
1374
+
1375
+ Performance/Size:
1376
+ Description: >-
1377
+ Use `size` instead of `count` for counting
1378
+ the number of elements in `Array` and `Hash`.
1379
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
1380
+ Enabled: true
1381
+
1382
+ Performance/SortWithBlock:
1383
+ Description: 'Use `sort_by(&:foo)` instead of `sort_by { |a, b| a.foo <=> b.foo }`.'
1384
+ Enabled: true
1385
+
1386
+ Performance/StartWith:
1387
+ Description: 'Use `start_with?` instead of a regex match anchored to the beginning of a string.'
1388
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
1389
+ Enabled: true
1390
+
1391
+ Performance/StringReplacement:
1392
+ Description: >-
1393
+ Use `tr` instead of `gsub` when you are replacing the same
1394
+ number of characters. Use `delete` instead of `gsub` when
1395
+ you are deleting characters.
1396
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
1397
+ Enabled: true
1398
+
1399
+ Performance/TimesMap:
1400
+ Description: 'Checks for .times.map calls.'
1401
+ Enabled: true
1402
+
1403
+ ##################### Rails ##################################
1404
+
1405
+ Rails/ActionFilter:
1406
+ Description: 'Enforces consistent use of action filter methods.'
1407
+ Enabled: true
1408
+
1409
+ Rails/Date:
1410
+ Description: >-
1411
+ Checks the correct usage of date aware methods,
1412
+ such as Date.today, Date.current etc.
1413
+ Enabled: true
1414
+
1415
+ Rails/Delegate:
1416
+ Description: 'Prefer delegate method for delegations.'
1417
+ Enabled: true
1418
+
1419
+ Rails/Exit:
1420
+ Description: >-
1421
+ Favor `fail`, `break`, `return`, etc. over `exit` in
1422
+ application or library code outside of Rake files to avoid
1423
+ exits during unit testing or running in production.
1424
+ Enabled: true
1425
+
1426
+ Rails/FindBy:
1427
+ Description: 'Prefer find_by over where.first.'
1428
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by'
1429
+ Enabled: true
1430
+
1431
+ Rails/FindEach:
1432
+ Description: 'Prefer all.find_each over all.find.'
1433
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find-each'
1434
+ Enabled: true
1435
+
1436
+ Rails/HasAndBelongsToMany:
1437
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
1438
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#has-many-through'
1439
+ Enabled: true
1440
+
1441
+ Rails/NotNullColumn:
1442
+ Description: 'Do not add a NOT NULL column without a default value'
1443
+ Enabled: true
1444
+
1445
+ Rails/Output:
1446
+ Description: 'Checks for calls to puts, print, etc.'
1447
+ Enabled: true
1448
+
1449
+ Rails/OutputSafety:
1450
+ Description: 'The use of `html_safe` or `raw` may be a security risk.'
1451
+ Enabled: true
1452
+
1453
+ Rails/PluralizationGrammar:
1454
+ Description: 'Checks for incorrect grammar when using methods like `3.day.ago`.'
1455
+ Enabled: true
1456
+
1457
+ Rails/ReadWriteAttribute:
1458
+ Description: >-
1459
+ Checks for read_attribute(:attr) and
1460
+ write_attribute(:attr, val).
1461
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#read-attribute'
1462
+ Enabled: true
1463
+
1464
+ Rails/RequestReferer:
1465
+ Description: 'Use consistent syntax for request.referer.'
1466
+ Enabled: true
1467
+
1468
+ Rails/SafeNavigation:
1469
+ Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`"
1470
+ Enabled: true
1471
+
1472
+ Rails/ScopeArgs:
1473
+ Description: 'Checks the arguments of ActiveRecord scopes.'
1474
+ Enabled: true
1475
+
1476
+ Rails/TimeZone:
1477
+ Description: 'Checks the correct usage of time zone aware methods.'
1478
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
1479
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
1480
+ Enabled: true
1481
+
1482
+ Rails/UniqBeforePluck:
1483
+ Description: 'Prefer the use of uniq or distinct before pluck.'
1484
+ Enabled: true
1485
+
1486
+ Rails/Validation:
1487
+ Description: 'Use validates :attribute, hash of validations.'
1488
+ Enabled: true
1489
+
1490
+ Security/JSONLoad:
1491
+ Description : 'Prefer usage of JSON.parse'
1492
+ Enabled: true