erb-view 0.1.0

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