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