phonejack 1.2.0

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