eligible 2.5.0 → 2.6.0

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
  SHA1:
3
- metadata.gz: 17923f2b677856fbfddf6fcb264f50c1df9978a3
4
- data.tar.gz: 5893d5023436251f4210528eb04427a3b8df88b8
3
+ metadata.gz: 03be1f1a914b3d75b9f6d41ca16eba33809b0088
4
+ data.tar.gz: 22f6b67282dd9c4f7ff967061ff68b52a3688ee5
5
5
  SHA512:
6
- metadata.gz: b7b78bb2711b50bf924913be82666f60231968cc9fa04b2dbb327bd0db11f0ac178b2554173139bbb4adf1d68516425f932fd9abd876a6db22d73c4ea644fe2e
7
- data.tar.gz: f74b959d868e42bf2a85a903e28aa487fe9d6a5c420cc8f38e83e41bf85d5277ff2c9f7431d207ea90a55cdc791e082d3f68aeeb393d3037bd81894ee5c1c8ce
6
+ metadata.gz: 9376ed2a7a179a2cbc31358e63c82030e585ab4a95ad0aa13ee7e27d5852e28ba915f6ebb09858abfd84db75ebe4fa6c7827c77e1df3536c616debace3393ea9
7
+ data.tar.gz: 69f16379d548aed3ba8e554c5d5362c7edd7bc9e7659eacb47b754901453d4a635fe65b645e2685b30ce8ffc4f5371e9a99cb34dca6c9761cc5a7cdcde30b604
@@ -0,0 +1,29 @@
1
+ engines:
2
+ duplication:
3
+ enabled: true
4
+ config:
5
+ languages:
6
+ - ruby
7
+ - javascript
8
+ - python
9
+ - php
10
+
11
+ fixme:
12
+ enabled: true
13
+
14
+ rubocop:
15
+ enabled: true
16
+
17
+ ratings:
18
+ paths:
19
+ - "**.inc"
20
+ - "**.js"
21
+ - "**.jsx"
22
+ - "**.module"
23
+ - "**.php"
24
+ - "**.py"
25
+ - "**.rb"
26
+
27
+ exclude_paths:
28
+ - .rubocop.yml
29
+ - spec/
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --colour
2
2
  --format documentation
3
+ --require spec_helper
@@ -1,12 +1,1166 @@
1
+ # Disable all checks not explicitly referenced in this file
2
+ # This is used to easily disable Style/* checks
1
3
  AllCops:
2
- Exclude:
3
- - 'test/**/*.rb'
4
+ DisabledByDefault: true
5
+
6
+ ################## STYLE #################################
7
+
8
+ Style/AccessModifierIndentation:
9
+ Description: Check indentation of private/protected visibility modifiers.
10
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
11
+ Enabled: false
12
+
13
+ Style/AccessorMethodName:
14
+ Description: Check the naming of accessor methods for get_/set_.
15
+ Enabled: false
16
+
17
+ Style/Alias:
18
+ Description: 'Use alias_method instead of alias.'
19
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
20
+ Enabled: false
21
+
22
+ Style/AlignArray:
23
+ Description: >-
24
+ Align the elements of an array literal if they span more than
25
+ one line.
26
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
27
+ Enabled: true
28
+
29
+ Style/AlignHash:
30
+ Description: >-
31
+ Align the elements of a hash literal if they span more than
32
+ one line.
33
+ Enabled: true
34
+
35
+ Style/AlignParameters:
36
+ Description: >-
37
+ Align the parameters of a method call if they span more
38
+ than one line.
39
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
40
+ Enabled: true
41
+
42
+ Style/AndOr:
43
+ Description: 'Use &&/|| instead of and/or.'
44
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
45
+ Enabled: true
46
+
47
+ Style/ArrayJoin:
48
+ Description: 'Use Array#join instead of Array#*.'
49
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
50
+ Enabled: true
51
+
52
+ Style/AsciiComments:
53
+ Description: 'Use only ascii symbols in comments.'
54
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
55
+ Enabled: true
56
+
57
+ Style/AsciiIdentifiers:
58
+ Description: 'Use only ascii symbols in identifiers.'
59
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
60
+ Enabled: true
61
+
62
+ Style/Attr:
63
+ Description: 'Checks for uses of Module#attr.'
64
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
65
+ Enabled: false
66
+
67
+ Style/BeginBlock:
68
+ Description: 'Avoid the use of BEGIN blocks.'
69
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
70
+ Enabled: true
71
+
72
+ Style/BarePercentLiterals:
73
+ Description: 'Checks if usage of %() or %Q() matches configuration.'
74
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
75
+ Enabled: false
76
+
77
+ Style/BlockComments:
78
+ Description: 'Do not use block comments.'
79
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
80
+ Enabled: false
81
+
82
+ Style/BlockEndNewline:
83
+ Description: 'Put end statement of multiline block on its own line.'
84
+ Enabled: true
85
+
86
+ Style/BlockDelimiters:
87
+ Description: >-
88
+ Avoid using {...} for multi-line blocks (multiline chaining is
89
+ always ugly).
90
+ Prefer {...} over do...end for single-line blocks.
91
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
92
+ Enabled: false
93
+
94
+ Style/BracesAroundHashParameters:
95
+ Description: 'Enforce braces style around hash parameters.'
96
+ Enabled: false
97
+
98
+ Style/CaseEquality:
99
+ Description: 'Avoid explicit use of the case equality operator(===).'
100
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
101
+ Enabled: true
102
+
103
+ Style/CaseIndentation:
104
+ Description: 'Indentation of when in a case/when/[else/]end.'
105
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
106
+ Enabled: false
107
+
108
+ Style/CharacterLiteral:
109
+ Description: 'Checks for uses of character literals.'
110
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
111
+ Enabled: true
112
+
113
+ Style/ClassAndModuleCamelCase:
114
+ Description: 'Use CamelCase for classes and modules.'
115
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
116
+ Enabled: true
117
+
118
+ Style/ClassAndModuleChildren:
119
+ Description: 'Checks style of children classes and modules.'
120
+ Enabled: false
121
+
122
+ Style/ClassCheck:
123
+ Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
124
+ Enabled: true
125
+
126
+ Style/ClassMethods:
127
+ Description: 'Use self when defining module/class methods.'
128
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
129
+ Enabled: true
130
+
131
+ Style/ClassVars:
132
+ Description: 'Avoid the use of class variables.'
133
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
134
+ Enabled: false
135
+
136
+ Style/ClosingParenthesisIndentation:
137
+ Description: 'Checks the indentation of hanging closing parentheses.'
138
+ Enabled: true
139
+
140
+ Style/ColonMethodCall:
141
+ Description: 'Do not use :: for method call.'
142
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
143
+ Enabled: true
144
+
145
+ Style/CommandLiteral:
146
+ Description: 'Use `` or %x around command literals.'
147
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
148
+ Enabled: false
149
+
150
+ Style/CommentAnnotation:
151
+ Description: >-
152
+ Checks formatting of special comments
153
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
154
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
155
+ Enabled: false
156
+
157
+ Style/CommentIndentation:
158
+ Description: 'Indentation of comments.'
159
+ Enabled: false
160
+
161
+ Style/ConstantName:
162
+ Description: 'Constants should use SCREAMING_SNAKE_CASE.'
163
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
164
+ Enabled: true
165
+
166
+ Style/DefWithParentheses:
167
+ Description: 'Use def with parentheses when there are arguments.'
168
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
169
+ Enabled: true
170
+
171
+ Style/DeprecatedHashMethods:
172
+ Description: 'Checks for use of deprecated Hash methods.'
173
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
174
+ Enabled: true
4
175
 
5
176
  Style/Documentation:
177
+ Description: 'Document classes and non-namespace modules.'
178
+ Enabled: false
179
+
180
+ Style/DotPosition:
181
+ Description: 'Checks the position of the dot in multi-line method calls.'
182
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
183
+ Enabled: true
184
+
185
+ Style/DoubleNegation:
186
+ Description: 'Checks for uses of double negation (!!).'
187
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
188
+ Enabled: false
189
+
190
+ Style/EachWithObject:
191
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
192
+ Enabled: false
193
+
194
+ Style/ElseAlignment:
195
+ Description: 'Align elses and elsifs correctly.'
196
+ Enabled: true
197
+
198
+ Style/EmptyElse:
199
+ Description: 'Avoid empty else-clauses.'
200
+ Enabled: true
201
+
202
+ Style/EmptyLineBetweenDefs:
203
+ Description: 'Use empty lines between defs.'
204
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
205
+ Enabled: true
206
+
207
+ Style/EmptyLines:
208
+ Description: "Don't use several empty lines in a row."
209
+ Enabled: true
210
+
211
+ Style/EmptyLinesAroundAccessModifier:
212
+ Description: "Keep blank lines around access modifiers."
213
+ Enabled: true
214
+
215
+ Style/EmptyLinesAroundBlockBody:
216
+ Description: "Keeps track of empty lines around block bodies."
217
+ Enabled: true
218
+
219
+ Style/EmptyLinesAroundClassBody:
220
+ Description: "Keeps track of empty lines around class bodies."
221
+ Enabled: false
222
+
223
+ Style/EmptyLinesAroundModuleBody:
224
+ Description: "Keeps track of empty lines around module bodies."
225
+ Enabled: false
226
+
227
+ Style/EmptyLinesAroundMethodBody:
228
+ Description: "Keeps track of empty lines around method bodies."
229
+ Enabled: true
230
+
231
+ Style/EmptyLiteral:
232
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
233
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
234
+ Enabled: true
235
+
236
+ Style/EndBlock:
237
+ Description: 'Avoid the use of END blocks.'
238
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
239
+ Enabled: true
240
+
241
+ Style/EndOfLine:
242
+ Description: 'Use Unix-style line endings.'
243
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
244
+ Enabled: true
245
+
246
+ Style/EvenOdd:
247
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
248
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
249
+ Enabled: true
250
+
251
+ Style/ExtraSpacing:
252
+ Description: 'Do not use unnecessary spacing.'
253
+ Enabled: true
254
+
255
+ Style/FileName:
256
+ Description: 'Use snake_case for source file names.'
257
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
258
+ Enabled: true
259
+
260
+ Style/InitialIndentation:
261
+ Description: >-
262
+ Checks the indentation of the first non-blank non-comment line in a file.
263
+ Enabled: true
264
+
265
+ Style/FirstParameterIndentation:
266
+ Description: 'Checks the indentation of the first parameter in a method call.'
267
+ Enabled: false
268
+
269
+ Style/FlipFlop:
270
+ Description: 'Checks for flip flops'
271
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
272
+ Enabled: true
273
+
274
+ Style/For:
275
+ Description: 'Checks use of for or each in multiline loops.'
276
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
277
+ Enabled: true
278
+
279
+ Style/FormatString:
280
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
281
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
282
+ Enabled: true
283
+
284
+ Style/GlobalVars:
285
+ Description: 'Do not introduce global variables.'
286
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
287
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
288
+ Enabled: true
289
+
290
+ Style/GuardClause:
291
+ Description: 'Check for conditionals that can be replaced with guard clauses'
292
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
293
+ Enabled: true
294
+
295
+ Style/HashSyntax:
296
+ Description: >-
297
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
298
+ { :a => 1, :b => 2 }.
299
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
300
+ Enabled: true
301
+
302
+ Style/IfUnlessModifier:
303
+ Description: >-
304
+ Favor modifier if/unless usage when you have a
305
+ single-line body.
306
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
307
+ Enabled: false
308
+
309
+ Style/IfWithSemicolon:
310
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
311
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
312
+ Enabled: true
313
+
314
+ Style/IndentationConsistency:
315
+ Description: 'Keep indentation straight.'
316
+ Enabled: true
317
+
318
+ Style/IndentationWidth:
319
+ Description: 'Use 2 spaces for indentation.'
320
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
321
+ Enabled: true
322
+
323
+ Style/IndentArray:
324
+ Description: >-
325
+ Checks the indentation of the first element in an array
326
+ literal.
327
+ Enabled: true
328
+
329
+ Style/IndentHash:
330
+ Description: 'Checks the indentation of the first key in a hash literal.'
331
+ Enabled: true
332
+
333
+ Style/InfiniteLoop:
334
+ Description: 'Use Kernel#loop for infinite loops.'
335
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
336
+ Enabled: true
337
+
338
+ Style/Lambda:
339
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
340
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
341
+ Enabled: false
342
+
343
+ Style/LambdaCall:
344
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
345
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
346
+ Enabled: true
347
+
348
+ Style/LeadingCommentSpace:
349
+ Description: 'Comments should start with a space.'
350
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
351
+ Enabled: true
352
+
353
+ Style/LineEndConcatenation:
354
+ Description: >-
355
+ Use \ instead of + or << to concatenate two string literals at
356
+ line end.
357
+ Enabled: false
358
+
359
+ Style/MethodCallParentheses:
360
+ Description: 'Do not use parentheses for method calls with no arguments.'
361
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
362
+ Enabled: true
363
+
364
+ Style/MethodDefParentheses:
365
+ Description: >-
366
+ Checks if the method definitions have or don't have
367
+ parentheses.
368
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
369
+ Enabled: true
370
+
371
+ Style/MethodName:
372
+ Description: 'Use the configured style when naming methods.'
373
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
374
+ Enabled: true
375
+
376
+ Style/ModuleFunction:
377
+ Description: 'Checks for usage of `extend self` in modules.'
378
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
379
+ Enabled: false
380
+
381
+ Style/MultilineBlockChain:
382
+ Description: 'Avoid multi-line chains of blocks.'
383
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
384
+ Enabled: false
385
+
386
+ Style/MultilineBlockLayout:
387
+ Description: 'Ensures newlines after multiline block do statements.'
388
+ Enabled: true
389
+
390
+ Style/MultilineIfThen:
391
+ Description: 'Do not use then for multi-line if/unless.'
392
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
393
+ Enabled: true
394
+
395
+ Style/MultilineOperationIndentation:
396
+ Description: >-
397
+ Checks indentation of binary operations that span more than
398
+ one line.
399
+ Enabled: true
400
+
401
+ Style/MultilineTernaryOperator:
402
+ Description: >-
403
+ Avoid multi-line ?: (the ternary operator);
404
+ use if/unless instead.
405
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
406
+ Enabled: true
407
+
408
+ Style/NegatedIf:
409
+ Description: >-
410
+ Favor unless over if for negative conditions
411
+ (or control flow or).
412
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
413
+ Enabled: true
414
+
415
+ Style/NegatedWhile:
416
+ Description: 'Favor until over while for negative conditions.'
417
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
418
+ Enabled: false
419
+
420
+ Style/NestedTernaryOperator:
421
+ Description: 'Use one expression per branch in a ternary operator.'
422
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
423
+ Enabled: true
424
+
425
+ Style/Next:
426
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
427
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
428
+ Enabled: true
429
+
430
+ Style/NilComparison:
431
+ Description: 'Prefer x.nil? to x == nil.'
432
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
433
+ Enabled: true
434
+
435
+ Style/NonNilCheck:
436
+ Description: 'Checks for redundant nil checks.'
437
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
438
+ Enabled: false
439
+
440
+ Style/Not:
441
+ Description: 'Use ! instead of not.'
442
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
443
+ Enabled: true
444
+
445
+ Style/NumericLiterals:
446
+ Description: >-
447
+ Add underscores to large numeric literals to improve their
448
+ readability.
449
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
450
+ Enabled: false
451
+
452
+ Style/OneLineConditional:
453
+ Description: >-
454
+ Favor the ternary operator(?:) over
455
+ if/then/else/end constructs.
456
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
457
+ Enabled: true
458
+
459
+ Style/OpMethod:
460
+ Description: 'When defining binary operators, name the argument other.'
461
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
462
+ Enabled: false
463
+
464
+ Style/OptionalArguments:
465
+ Description: >-
466
+ Checks for optional arguments that do not appear at the end
467
+ of the argument list
468
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
469
+ Enabled: true
470
+
471
+ Style/ParallelAssignment:
472
+ Description: >-
473
+ Check for simple usages of parallel assignment.
474
+ It will only warn when the number of variables
475
+ matches on both sides of the assignment.
476
+ This also provides performance benefits
477
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
478
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#parallel-assignment-vs-sequential-assignment-code'
479
+ Enabled: true
480
+
481
+ Style/ParenthesesAroundCondition:
482
+ Description: >-
483
+ Don't use parentheses around the condition of an
484
+ if/unless/while.
485
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
486
+ Enabled: true
487
+
488
+ Style/PercentLiteralDelimiters:
489
+ Description: 'Use `%`-literal delimiters consistently'
490
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
491
+ Enabled: false
492
+
493
+ Style/PercentQLiterals:
494
+ Description: 'Checks if uses of %Q/%q match the configured preference.'
495
+ Enabled: false
496
+
497
+ Style/PerlBackrefs:
498
+ Description: 'Avoid Perl-style regex back references.'
499
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
500
+ Enabled: false
501
+
502
+ Style/PredicateName:
503
+ Description: 'Check the names of predicate methods.'
504
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
505
+ Enabled: false
506
+
507
+ Style/Proc:
508
+ Description: 'Use proc instead of Proc.new.'
509
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
510
+ Enabled: false
511
+
512
+ Style/RaiseArgs:
513
+ Description: 'Checks the arguments passed to raise/fail.'
514
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
515
+ Enabled: true
516
+
517
+ Style/RedundantBegin:
518
+ Description: "Don't use begin blocks when they are not needed."
519
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
520
+ Enabled: true
521
+
522
+ Style/RedundantException:
523
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
524
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
525
+ Enabled: true
526
+
527
+ Style/RedundantReturn:
528
+ Description: "Don't use return where it's not required."
529
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
530
+ Enabled: false
531
+
532
+ Style/RedundantSelf:
533
+ Description: "Don't use self where it's not needed."
534
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
535
+ Enabled: false
536
+
537
+ Style/RegexpLiteral:
538
+ Description: 'Use / or %r around regular expressions.'
539
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
540
+ Enabled: false
541
+
542
+ Style/RescueEnsureAlignment:
543
+ Description: 'Align rescues and ensures correctly.'
544
+ Enabled: true
545
+
546
+ Style/RescueModifier:
547
+ Description: 'Avoid using rescue in its modifier form.'
548
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
549
+ Enabled: true
550
+
551
+ Style/SelfAssignment:
552
+ Description: >-
553
+ Checks for places where self-assignment shorthand should have
554
+ been used.
555
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
556
+ Enabled: true
557
+
558
+ Style/Semicolon:
559
+ Description: "Don't use semicolons to terminate expressions."
560
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
561
+ Enabled: true
562
+
563
+ Style/SignalException:
564
+ Description: 'Checks for proper usage of fail and raise.'
565
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
566
+ Enabled: false
567
+
568
+ Style/SingleLineBlockParams:
569
+ Description: 'Enforces the names of some block params.'
570
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
571
+ Enabled: false
572
+
573
+ Style/SingleLineMethods:
574
+ Description: 'Avoid single-line methods.'
575
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
576
+ Enabled: true
577
+
578
+ Style/SingleSpaceBeforeFirstArg:
579
+ Description: >-
580
+ Checks that exactly one space is used between a method name
581
+ and the first argument for method calls without parentheses.
582
+ Enabled: true
583
+
584
+ Style/SpaceAfterColon:
585
+ Description: 'Use spaces after colons.'
586
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
587
+ Enabled: true
588
+
589
+ Style/SpaceAfterComma:
590
+ Description: 'Use spaces after commas.'
591
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
592
+ Enabled: true
593
+
594
+ Style/SpaceAfterControlKeyword:
595
+ Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
596
+ Enabled: true
597
+
598
+ Style/SpaceAfterMethodName:
599
+ Description: >-
600
+ Do not put a space between a method name and the opening
601
+ parenthesis in a method definition.
602
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
603
+ Enabled: true
604
+
605
+ Style/SpaceAfterNot:
606
+ Description: Tracks redundant space after the ! operator.
607
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
608
+ Enabled: true
609
+
610
+ Style/SpaceAfterSemicolon:
611
+ Description: 'Use spaces after semicolons.'
612
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
613
+ Enabled: true
614
+
615
+ Style/SpaceBeforeBlockBraces:
616
+ Description: >-
617
+ Checks that the left block brace has or doesn't have space
618
+ before it.
619
+ Enabled: true
620
+
621
+ Style/SpaceBeforeComma:
622
+ Description: 'No spaces before commas.'
623
+ Enabled: true
624
+
625
+ Style/SpaceBeforeComment:
626
+ Description: >-
627
+ Checks for missing space between code and a comment on the
628
+ same line.
629
+ Enabled: false
630
+
631
+ Style/SpaceBeforeSemicolon:
632
+ Description: 'No spaces before semicolons.'
633
+ Enabled: true
634
+
635
+ Style/SpaceInsideBlockBraces:
636
+ Description: >-
637
+ Checks that block braces have or don't have surrounding space.
638
+ For blocks taking parameters, checks that the left brace has
639
+ or doesn't have trailing space.
640
+ Enabled: true
641
+
642
+ Style/SpaceAroundBlockParameters:
643
+ Description: 'Checks the spacing inside and after block parameters pipes.'
644
+ Enabled: true
645
+
646
+ Style/SpaceAroundEqualsInParameterDefault:
647
+ Description: >-
648
+ Checks that the equals signs in parameter default assignments
649
+ have or don't have surrounding space depending on
650
+ configuration.
651
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
652
+ Enabled: true
653
+
654
+ Style/SpaceAroundOperators:
655
+ Description: 'Use a single space around operators.'
656
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
657
+ Enabled: true
658
+
659
+ Style/SpaceBeforeModifierKeyword:
660
+ Description: 'Put a space before the modifier keyword.'
661
+ Enabled: true
662
+
663
+ Style/SpaceInsideBrackets:
664
+ Description: 'No spaces after [ or before ].'
665
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
666
+ Enabled: false
667
+
668
+ Style/SpaceInsideHashLiteralBraces:
669
+ Description: "Use spaces inside hash literal braces - or don't."
670
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
671
+ Enabled: true
672
+
673
+ Style/SpaceInsideParens:
674
+ Description: 'No spaces after ( or before ).'
675
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
676
+ Enabled: true
677
+
678
+ Style/SpaceInsideRangeLiteral:
679
+ Description: 'No spaces inside range literals.'
680
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
681
+ Enabled: true
682
+
683
+ Style/SpaceInsideStringInterpolation:
684
+ Description: 'Checks for padding/surrounding spaces inside string interpolation.'
685
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
686
+ Enabled: true
687
+
688
+ Style/SpecialGlobalVars:
689
+ Description: 'Avoid Perl-style global variables.'
690
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
691
+ Enabled: true
692
+
693
+ Style/StringLiterals:
694
+ Description: 'Checks if uses of quotes match the configured preference.'
695
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
696
+ Enabled: false
697
+
698
+ Style/StringLiteralsInInterpolation:
699
+ Description: >-
700
+ Checks if uses of quotes inside expressions in interpolated
701
+ strings match the configured preference.
702
+ Enabled: false
703
+
704
+ Style/StructInheritance:
705
+ Description: 'Checks for inheritance from Struct.new.'
706
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
707
+ Enabled: true
708
+
709
+ Style/SymbolLiteral:
710
+ Description: 'Use plain symbols instead of string symbols when possible.'
711
+ Enabled: true
712
+
713
+ Style/SymbolProc:
714
+ Description: 'Use symbols as procs instead of blocks when possible.'
715
+ Enabled: true
716
+
717
+ Style/Tab:
718
+ Description: 'No hard tabs.'
719
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
720
+ Enabled: true
721
+
722
+ Style/TrailingBlankLines:
723
+ Description: 'Checks trailing blank lines and final newline.'
724
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
725
+ Enabled: true
726
+
727
+ Style/TrailingWhitespace:
728
+ Description: 'Avoid trailing whitespace.'
729
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
730
+ Enabled: true
731
+
732
+ Style/TrivialAccessors:
733
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
734
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
735
+ Enabled: true
736
+
737
+ Style/UnlessElse:
738
+ Description: >-
739
+ Do not use unless with else. Rewrite these with the positive
740
+ case first.
741
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
742
+ Enabled: true
743
+
744
+ Style/UnneededCapitalW:
745
+ Description: 'Checks for %W when interpolation is not needed.'
746
+ Enabled: false
747
+
748
+ Style/UnneededPercentQ:
749
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
750
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
751
+ Enabled: false
752
+
753
+ Style/TrailingUnderscoreVariable:
754
+ Description: >-
755
+ Checks for the usage of unneeded trailing underscores at the
756
+ end of parallel variable assignment.
757
+ Enabled: true
758
+
759
+ Style/VariableInterpolation:
760
+ Description: >-
761
+ Don't interpolate global, instance and class variables
762
+ directly in strings.
763
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
764
+ Enabled: true
765
+
766
+ Style/VariableName:
767
+ Description: 'Use the configured style when naming variables.'
768
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
769
+ Enabled: true
770
+
771
+ Style/WhenThen:
772
+ Description: 'Use when x then ... for one-line cases.'
773
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
774
+ Enabled: false
775
+
776
+ Style/WhileUntilDo:
777
+ Description: 'Checks for redundant do after while or until.'
778
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
779
+ Enabled: false
780
+
781
+ Style/WhileUntilModifier:
782
+ Description: >-
783
+ Favor modifier while/until usage when you have a
784
+ single-line body.
785
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
786
+ Enabled: false
787
+
788
+ Style/WordArray:
789
+ Description: 'Use %w or %W for arrays of words.'
790
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
791
+ Enabled: true
792
+
793
+ ##########################################################
794
+ Metrics/AbcSize:
795
+ Description: >-
796
+ A calculated magnitude based on number of assignments,
797
+ branches, and conditions.
798
+ Reference: 'http://c2.com/cgi/wiki?AbcMetric'
799
+ Enabled: true
800
+ Max: 20
801
+
802
+ Metrics/BlockNesting:
803
+ Description: 'Avoid excessive block nesting'
804
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
805
+ Enabled: true
806
+ Max: 4
807
+
808
+ Metrics/ClassLength:
809
+ Description: 'Avoid classes longer than 100 lines of code.'
810
+ Enabled: true
811
+ Max: 150
812
+
813
+ Metrics/ModuleLength:
814
+ Description: 'Avoid modules longer than 100 lines of code.'
815
+ Enabled: true
816
+ Max: 150
817
+
818
+ Metrics/CyclomaticComplexity:
819
+ Description: >-
820
+ A complexity metric that is strongly correlated to the number
821
+ of test cases needed to validate a method.
6
822
  Enabled: false
7
823
 
8
824
  Metrics/LineLength:
825
+ Description: 'Limit lines to 80 characters.'
826
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
9
827
  Enabled: false
10
828
 
11
829
  Metrics/MethodLength:
830
+ Description: 'Avoid methods longer than 10 lines of code.'
831
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
832
+ Enabled: false
833
+
834
+ Metrics/ParameterLists:
835
+ Description: 'Avoid parameter lists longer than three or four parameters.'
836
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
837
+ Enabled: true
838
+
839
+ Metrics/PerceivedComplexity:
840
+ Description: >-
841
+ A complexity metric geared towards measuring complexity for a
842
+ human reader.
843
+ Enabled: false
844
+
845
+ #################### Lint ################################
846
+ ### Warnings
847
+
848
+ Lint/AmbiguousOperator:
849
+ Description: >-
850
+ Checks for ambiguous operators in the first argument of a
851
+ method invocation without parentheses.
852
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
853
+ Enabled: true
854
+
855
+ Lint/AmbiguousRegexpLiteral:
856
+ Description: >-
857
+ Checks for ambiguous regexp literals in the first argument of
858
+ a method invocation without parenthesis.
859
+ Enabled: true
860
+
861
+ Lint/AssignmentInCondition:
862
+ Description: "Don't use assignment in conditions."
863
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
864
+ Enabled: true
865
+
866
+ Lint/BlockAlignment:
867
+ Description: 'Align block ends correctly.'
868
+ Enabled: true
869
+
870
+ Lint/CircularArgumentReference:
871
+ Description: "Don't refer to the keyword argument in the default value."
872
+ Enabled: true
873
+
874
+ Lint/ConditionPosition:
875
+ Description: >-
876
+ Checks for condition placed in a confusing position relative to
877
+ the keyword.
878
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
879
+ Enabled: true
880
+
881
+ Lint/Debugger:
882
+ Description: 'Check for debugger calls.'
883
+ Enabled: true
884
+
885
+ Lint/DefEndAlignment:
886
+ Description: 'Align ends corresponding to defs correctly.'
887
+ Enabled: true
888
+
889
+ Lint/DeprecatedClassMethods:
890
+ Description: 'Check for deprecated class method calls.'
891
+ Enabled: true
892
+
893
+ Lint/DuplicateMethods:
894
+ Description: 'Check for duplicate methods calls.'
895
+ Enabled: true
896
+
897
+ Lint/EachWithObjectArgument:
898
+ Description: 'Check for immutable argument given to each_with_object.'
899
+ Enabled: true
900
+
901
+ Lint/ElseLayout:
902
+ Description: 'Check for odd code arrangement in an else block.'
903
+ Enabled: true
904
+
905
+ Lint/EmptyEnsure:
906
+ Description: 'Checks for empty ensure block.'
907
+ Enabled: true
908
+
909
+ Lint/EmptyInterpolation:
910
+ Description: 'Checks for empty string interpolation.'
911
+ Enabled: true
912
+
913
+ Lint/EndAlignment:
914
+ Description: 'Align ends correctly.'
915
+ Enabled: true
916
+
917
+ Lint/EndInMethod:
918
+ Description: 'END blocks should not be placed inside method definitions.'
919
+ Enabled: true
920
+
921
+ Lint/EnsureReturn:
922
+ Description: 'Do not use return in an ensure block.'
923
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
924
+ Enabled: true
925
+
926
+ Lint/Eval:
927
+ Description: 'The use of eval represents a serious security risk.'
928
+ Enabled: true
929
+
930
+ Lint/FormatParameterMismatch:
931
+ Description: 'The number of parameters to format/sprint must match the fields.'
932
+ Enabled: true
933
+
934
+ Lint/HandleExceptions:
935
+ Description: "Don't suppress exception."
936
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
937
+ Enabled: true
938
+
939
+ Lint/InvalidCharacterLiteral:
940
+ Description: >-
941
+ Checks for invalid character literals with a non-escaped
942
+ whitespace character.
943
+ Enabled: true
944
+
945
+ Lint/LiteralInCondition:
946
+ Description: 'Checks of literals used in conditions.'
947
+ Enabled: true
948
+
949
+ Lint/LiteralInInterpolation:
950
+ Description: 'Checks for literals used in interpolation.'
951
+ Enabled: true
952
+
953
+ Lint/Loop:
954
+ Description: >-
955
+ Use Kernel#loop with break rather than begin/end/until or
956
+ begin/end/while for post-loop tests.
957
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
958
+ Enabled: true
959
+
960
+ Lint/NestedMethodDefinition:
961
+ Description: 'Do not use nested method definitions.'
962
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
963
+ Enabled: true
964
+
965
+ Lint/NonLocalExitFromIterator:
966
+ Description: 'Do not use return in iterator to cause non-local exit.'
967
+ Enabled: true
968
+
969
+ Lint/ParenthesesAsGroupedExpression:
970
+ Description: >-
971
+ Checks for method calls with a space before the opening
972
+ parenthesis.
973
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
974
+ Enabled: true
975
+
976
+ Lint/RequireParentheses:
977
+ Description: >-
978
+ Use parentheses in the method call to avoid confusion
979
+ about precedence.
980
+ Enabled: true
981
+
982
+ Lint/RescueException:
983
+ Description: 'Avoid rescuing the Exception class.'
984
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
985
+ Enabled: true
986
+
987
+ Lint/ShadowingOuterLocalVariable:
988
+ Description: >-
989
+ Do not use the same name as outer local variable
990
+ for block arguments or block local variables.
991
+ Enabled: true
992
+
993
+ Lint/SpaceBeforeFirstArg:
994
+ Description: >-
995
+ Put a space between a method name and the first argument
996
+ in a method call without parentheses.
997
+ Enabled: true
998
+
999
+ Lint/StringConversionInInterpolation:
1000
+ Description: 'Checks for Object#to_s usage in string interpolation.'
1001
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
1002
+ Enabled: true
1003
+
1004
+ Lint/UnderscorePrefixedVariableName:
1005
+ Description: 'Do not use prefix `_` for a variable that is used.'
1006
+ Enabled: true
1007
+
1008
+ Lint/UnneededDisable:
1009
+ Description: >-
1010
+ Checks for rubocop:disable comments that can be removed.
1011
+ Note: this cop is not disabled when disabling all cops.
1012
+ It must be explicitly disabled.
1013
+ Enabled: true
1014
+
1015
+ Lint/UnusedBlockArgument:
1016
+ Description: 'Checks for unused block arguments.'
1017
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1018
+ Enabled: true
1019
+
1020
+ Lint/UnusedMethodArgument:
1021
+ Description: 'Checks for unused method arguments.'
1022
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1023
+ Enabled: true
1024
+
1025
+ Lint/UnreachableCode:
1026
+ Description: 'Unreachable code.'
1027
+ Enabled: true
1028
+
1029
+ Lint/UselessAccessModifier:
1030
+ Description: 'Checks for useless access modifiers.'
1031
+ Enabled: true
1032
+
1033
+ Lint/UselessAssignment:
1034
+ Description: 'Checks for useless assignment to a local variable.'
1035
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1036
+ Enabled: true
1037
+
1038
+ Lint/UselessComparison:
1039
+ Description: 'Checks for comparison of something with itself.'
1040
+ Enabled: true
1041
+
1042
+ Lint/UselessElseWithoutRescue:
1043
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
1044
+ Enabled: true
1045
+
1046
+ Lint/UselessSetterCall:
1047
+ Description: 'Checks for useless setter call to a local variable.'
1048
+ Enabled: true
1049
+
1050
+ Lint/Void:
1051
+ Description: 'Possible use of operator/literal/variable in void context.'
1052
+ Enabled: true
1053
+
1054
+ ##################### Performance #############################
1055
+
1056
+ Performance/Count:
1057
+ Description: >-
1058
+ Use `count` instead of `select...size`, `reject...size`,
1059
+ `select...count`, `reject...count`, `select...length`,
1060
+ and `reject...length`.
1061
+ Enabled: true
1062
+
1063
+ Performance/Detect:
1064
+ Description: >-
1065
+ Use `detect` instead of `select.first`, `find_all.first`,
1066
+ `select.last`, and `find_all.last`.
1067
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
1068
+ Enabled: true
1069
+
1070
+ Performance/FlatMap:
1071
+ Description: >-
1072
+ Use `Enumerable#flat_map`
1073
+ instead of `Enumerable#map...Array#flatten(1)`
1074
+ or `Enumberable#collect..Array#flatten(1)`
1075
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
1076
+ Enabled: true
1077
+ EnabledForFlattenWithoutParams: false
1078
+ # If enabled, this cop will warn about usages of
1079
+ # `flatten` being called without any parameters.
1080
+ # This can be dangerous since `flat_map` will only flatten 1 level, and
1081
+ # `flatten` without any parameters can flatten multiple levels.
1082
+
1083
+ Performance/ReverseEach:
1084
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
1085
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
1086
+ Enabled: true
1087
+
1088
+ Performance/Sample:
1089
+ Description: >-
1090
+ Use `sample` instead of `shuffle.first`,
1091
+ `shuffle.last`, and `shuffle[Fixnum]`.
1092
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
1093
+ Enabled: true
1094
+
1095
+ Performance/Size:
1096
+ Description: >-
1097
+ Use `size` instead of `count` for counting
1098
+ the number of elements in `Array` and `Hash`.
1099
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
1100
+ Enabled: true
1101
+
1102
+ Performance/StringReplacement:
1103
+ Description: >-
1104
+ Use `tr` instead of `gsub` when you are replacing the same
1105
+ number of characters. Use `delete` instead of `gsub` when
1106
+ you are deleting characters.
1107
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
1108
+ Enabled: true
1109
+
1110
+ ##################### Rails ##################################
1111
+ #
1112
+ # Consider enabling some/all of these if you use Rails.
1113
+ #
1114
+ Rails/ActionFilter:
1115
+ Description: 'Enforces consistent use of action filter methods.'
1116
+ Enabled: false
1117
+
1118
+ Rails/Date:
1119
+ Description: >-
1120
+ Checks the correct usage of date aware methods,
1121
+ such as Date.today, Date.current etc.
1122
+ Enabled: false
1123
+
1124
+ Rails/DefaultScope:
1125
+ Description: 'Checks if the argument passed to default_scope is a block.'
1126
+ Enabled: false
1127
+
1128
+ Rails/Delegate:
1129
+ Description: 'Prefer delegate method for delegations.'
1130
+ Enabled: false
1131
+
1132
+ Rails/FindBy:
1133
+ Description: 'Prefer find_by over where.first.'
1134
+ Enabled: false
1135
+
1136
+ Rails/FindEach:
1137
+ Description: 'Prefer all.find_each over all.find.'
1138
+ Enabled: true
1139
+
1140
+ Rails/HasAndBelongsToMany:
1141
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
1142
+ Enabled: false
1143
+
1144
+ Rails/Output:
1145
+ Description: 'Checks for calls to puts, print, etc.'
1146
+ Enabled: true
1147
+
1148
+ Rails/ReadWriteAttribute:
1149
+ Description: >-
1150
+ Checks for read_attribute(:attr) and
1151
+ write_attribute(:attr, val).
1152
+ Enabled: false
1153
+
1154
+ Rails/ScopeArgs:
1155
+ Description: 'Checks the arguments of ActiveRecord scopes.'
1156
+ Enabled: false
1157
+
1158
+ Rails/TimeZone:
1159
+ Description: 'Checks the correct usage of time zone aware methods.'
1160
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
1161
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
1162
+ Enabled: false
1163
+
1164
+ Rails/Validation:
1165
+ Description: 'Use validates :attribute, hash of validations.'
12
1166
  Enabled: false