generators_rails 0.0.1

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