case_register 0.0.1

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