telephone_number 0.0.0 → 0.1.0

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