mystery_shopper 0.1.6 → 0.1.7

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