wonder-ruby-style 0.54.0 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da54fcfdd38923889f0fe0b04af98ac97f872056c3f63a0ce6a5ba1848c10e64
4
- data.tar.gz: ce013b148e3dd2027d3f05408f0be96b6893b9b5aa5d03651c72348fc10c5785
3
+ metadata.gz: 1087776ed379c65ae51d5ad4023d3f422090838dcaadfe949111045c0701449e
4
+ data.tar.gz: c25b0cb605706d4f1e3aae19f89d9237b59c8c8f2f262f3810492af4f62f1913
5
5
  SHA512:
6
- metadata.gz: 02001de71db81d10cf4278369c85752172e849a048ceace559e2456ac8dce1d81245469c9d0d334ece06eb78ed11e1da502281655d31912263a7c1a55b817485
7
- data.tar.gz: 67e6a317ccd31beefb3ce468305c889d3ad3dbac13ff11e37ecb780250ed97c893223a748b84ad0ce1a99e95c5098ea2ae4de5f508b6b737b87fe2a70a726536
6
+ metadata.gz: 2f979853ee2d703f89b4396cc924a19bd2c9b05bc29f9b94720a390a05ed5b97c0c39edb359148955712d9236e02fa019c5d9701925304d43ae4c4f0ffdd021c
7
+ data.tar.gz: 73f07ce76b045a7ab4265830752419e98c1098c5b0ed01de59bbbe1e64319db7fc083f2f972ceab2f24724ebdaa4091f0c7977a4be0ef10efed9fae0727ba823
@@ -1,7 +1,7 @@
1
1
  module Wonder
2
2
  module Ruby
3
3
  module Style
4
- VERSION = '0.54.0'.freeze
4
+ VERSION = '0.56.0'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,1182 @@
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ Include:
5
+ - Rakefile
6
+ - lib/**/*.rake
7
+ DisabledByDefault: true
8
+ TargetRubyVersion: 2.5
9
+ Exclude:
10
+ - '*.gemspec'
11
+ - 'coverage/**/*'
12
+ - 'log/**/*'
13
+ - 'spec/fixtures/**/*'
14
+ - 'tmp/**/*'
15
+ - 'vendor/**/*'
16
+ - 'lib/**/*.rb'
17
+
18
+ #################### Lint ################################
19
+
20
+ Lint/AmbiguousOperator:
21
+ Description: >-
22
+ Checks for ambiguous operators in the first argument of a
23
+ method invocation without parentheses.
24
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
25
+ Enabled: true
26
+
27
+ Lint/AmbiguousRegexpLiteral:
28
+ Description: >-
29
+ Checks for ambiguous regexp literals in the first argument of
30
+ a method invocation without parenthesis.
31
+ Enabled: true
32
+
33
+ Lint/AssignmentInCondition:
34
+ Description: "Don't use assignment in conditions."
35
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
36
+ Enabled: true
37
+
38
+ Layout/BlockAlignment:
39
+ Description: 'Align block ends correctly.'
40
+ Enabled: true
41
+
42
+ Lint/CircularArgumentReference:
43
+ Description: "Don't refer to the keyword argument in the default value."
44
+ Enabled: true
45
+
46
+ Layout/ConditionPosition:
47
+ Description: >-
48
+ Checks for condition placed in a confusing position relative to
49
+ the keyword.
50
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
51
+ Enabled: true
52
+
53
+ Lint/Debugger:
54
+ Description: 'Check for debugger calls.'
55
+ Enabled: true
56
+
57
+ Layout/DefEndAlignment:
58
+ Description: 'Align ends corresponding to defs correctly.'
59
+ Enabled: true
60
+
61
+ Lint/DeprecatedClassMethods:
62
+ Description: 'Check for deprecated class method calls.'
63
+ Enabled: true
64
+
65
+ Lint/DuplicateMethods:
66
+ Description: 'Check for duplicate methods calls.'
67
+ Enabled: true
68
+
69
+ Lint/EachWithObjectArgument:
70
+ Description: 'Check for immutable argument given to each_with_object.'
71
+ Enabled: true
72
+
73
+ Lint/ElseLayout:
74
+ Description: 'Check for odd code arrangement in an else block.'
75
+ Enabled: true
76
+
77
+ Lint/EmptyEnsure:
78
+ Description: 'Checks for empty ensure block.'
79
+ Enabled: true
80
+
81
+ Lint/EmptyInterpolation:
82
+ Description: 'Checks for empty string interpolation.'
83
+ Enabled: true
84
+
85
+ Layout/EndAlignment:
86
+ Description: 'Align ends correctly.'
87
+ Enabled: true
88
+
89
+ Lint/EndInMethod:
90
+ Description: 'END blocks should not be placed inside method definitions.'
91
+ Enabled: true
92
+
93
+ Lint/EnsureReturn:
94
+ Description: 'Do not use return in an ensure block.'
95
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
96
+ Enabled: true
97
+
98
+ Security/Eval:
99
+ Description: 'The use of eval represents a serious security risk.'
100
+ Enabled: true
101
+
102
+ Lint/FormatParameterMismatch:
103
+ Description: 'The number of parameters to format/sprint must match the fields.'
104
+ Enabled: true
105
+
106
+ Lint/HandleExceptions:
107
+ Description: "Don't suppress exception."
108
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
109
+ Enabled: true
110
+
111
+ Lint/LiteralAsCondition:
112
+ Description: 'Checks of literals used in conditions.'
113
+ Enabled: true
114
+
115
+ Lint/LiteralInInterpolation:
116
+ Description: 'Checks for literals used in interpolation.'
117
+ Enabled: true
118
+
119
+ Lint/Loop:
120
+ Description: >-
121
+ Use Kernel#loop with break rather than begin/end/until or
122
+ begin/end/while for post-loop tests.
123
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
124
+ Enabled: true
125
+
126
+ Lint/NestedMethodDefinition:
127
+ Description: 'Do not use nested method definitions.'
128
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
129
+ Enabled: true
130
+
131
+ Lint/NonLocalExitFromIterator:
132
+ Description: 'Do not use return in iterator to cause non-local exit.'
133
+ Enabled: true
134
+
135
+ Lint/ParenthesesAsGroupedExpression:
136
+ Description: >-
137
+ Checks for method calls with a space before the opening
138
+ parenthesis.
139
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
140
+ Enabled: true
141
+
142
+ Lint/RequireParentheses:
143
+ Description: >-
144
+ Use parentheses in the method call to avoid confusion
145
+ about precedence.
146
+ Enabled: true
147
+
148
+ Lint/RescueException:
149
+ Description: 'Avoid rescuing the Exception class.'
150
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
151
+ Enabled: true
152
+
153
+ Lint/ShadowingOuterLocalVariable:
154
+ Description: >-
155
+ Do not use the same name as outer local variable
156
+ for block arguments or block local variables.
157
+ Enabled: true
158
+
159
+ Lint/StringConversionInInterpolation:
160
+ Description: 'Checks for Object#to_s usage in string interpolation.'
161
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
162
+ Enabled: true
163
+
164
+ Lint/UnderscorePrefixedVariableName:
165
+ Description: 'Do not use prefix `_` for a variable that is used.'
166
+ Enabled: true
167
+
168
+ Lint/UnusedBlockArgument:
169
+ Description: 'Checks for unused block arguments.'
170
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
171
+ Enabled: true
172
+
173
+ Lint/UnusedMethodArgument:
174
+ Description: 'Checks for unused method arguments.'
175
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
176
+ Enabled: true
177
+
178
+ Lint/UnreachableCode:
179
+ Description: 'Unreachable code.'
180
+ Enabled: true
181
+
182
+ Lint/UselessAccessModifier:
183
+ Description: 'Checks for useless access modifiers.'
184
+ Enabled: true
185
+
186
+ Lint/UselessAssignment:
187
+ Description: 'Checks for useless assignment to a local variable.'
188
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
189
+ Enabled: true
190
+
191
+ Lint/UselessComparison:
192
+ Description: 'Checks for comparison of something with itself.'
193
+ Enabled: true
194
+
195
+ Lint/UselessElseWithoutRescue:
196
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
197
+ Enabled: true
198
+
199
+ Lint/UselessSetterCall:
200
+ Description: 'Checks for useless setter call to a local variable.'
201
+ Enabled: true
202
+
203
+ Lint/Void:
204
+ Description: 'Possible use of operator/literal/variable in void context.'
205
+ Enabled: true
206
+
207
+ ###################### Metrics ####################################
208
+
209
+ Metrics/BlockNesting:
210
+ Description: 'Avoid excessive block nesting'
211
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
212
+ Enabled: true
213
+ Max: 4
214
+ Exclude:
215
+ - 'Rakefile'
216
+ - '**/*.rake'
217
+ - 'spec/**/*.rb'
218
+
219
+ Metrics/ClassLength:
220
+ Description: 'Avoid classes longer than 250 lines of code.'
221
+ Enabled: true
222
+ Max: 250
223
+
224
+ Metrics/CyclomaticComplexity:
225
+ Description: >-
226
+ A complexity metric that is strongly correlated to the number
227
+ of test cases needed to validate a method.
228
+ Enabled: true
229
+
230
+ Metrics/LineLength:
231
+ Description: 'Limit lines to 80 characters.'
232
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
233
+ Enabled: false
234
+
235
+ Metrics/MethodLength:
236
+ Description: 'Avoid methods longer than 30 lines of code.'
237
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
238
+ Enabled: true
239
+ Max: 30
240
+
241
+ Metrics/ModuleLength:
242
+ Description: 'Avoid modules longer than 250 lines of code.'
243
+ Enabled: true
244
+ Max: 250
245
+ Exclude:
246
+ - 'spec/**/*.rb'
247
+
248
+ Metrics/ParameterLists:
249
+ Description: 'Avoid parameter lists longer than three or four parameters.'
250
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
251
+ Enabled: true
252
+
253
+ Metrics/PerceivedComplexity:
254
+ Description: >-
255
+ A complexity metric geared towards measuring complexity for a
256
+ human reader.
257
+ Enabled: false
258
+
259
+ ##################### Performance #############################
260
+
261
+ Performance/Count:
262
+ Description: >-
263
+ Use `count` instead of `select...size`, `reject...size`,
264
+ `select...count`, `reject...count`, `select...length`,
265
+ and `reject...length`.
266
+ Enabled: true
267
+
268
+ Performance/Detect:
269
+ Description: >-
270
+ Use `detect` instead of `select.first`, `find_all.first`,
271
+ `select.last`, and `find_all.last`.
272
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
273
+ Enabled: true
274
+
275
+ Performance/FlatMap:
276
+ Description: >-
277
+ Use `Enumerable#flat_map`
278
+ instead of `Enumerable#map...Array#flatten(1)`
279
+ or `Enumberable#collect..Array#flatten(1)`
280
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
281
+ Enabled: true
282
+ EnabledForFlattenWithoutParams: true
283
+ # If enabled, this cop will warn about usages of
284
+ # `flatten` being called without any parameters.
285
+ # This can be dangerous since `flat_map` will only flatten 1 level, and
286
+ # `flatten` without any parameters can flatten multiple levels.
287
+
288
+ Performance/ReverseEach:
289
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
290
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
291
+ Enabled: true
292
+
293
+ Performance/Sample:
294
+ Description: >-
295
+ Use `sample` instead of `shuffle.first`,
296
+ `shuffle.last`, and `shuffle[Fixnum]`.
297
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
298
+ Enabled: true
299
+
300
+ Performance/Size:
301
+ Description: >-
302
+ Use `size` instead of `count` for counting
303
+ the number of elements in `Array` and `Hash`.
304
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
305
+ Enabled: true
306
+
307
+ Performance/StringReplacement:
308
+ Description: >-
309
+ Use `tr` instead of `gsub` when you are replacing the same
310
+ number of characters. Use `delete` instead of `gsub` when
311
+ you are deleting characters.
312
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
313
+ Enabled: true
314
+
315
+ ##################### Rails ##################################
316
+
317
+ Rails/ActionFilter:
318
+ Description: 'Enforces consistent use of action filter methods.'
319
+ Enabled: true
320
+
321
+ Rails/Date:
322
+ Description: >-
323
+ Checks the correct usage of date aware methods,
324
+ such as Date.today, Date.current etc.
325
+ Enabled: true
326
+
327
+ Rails/Delegate:
328
+ Description: 'Prefer delegate method for delegations.'
329
+ Enabled: true
330
+
331
+ Rails/FindBy:
332
+ Description: 'Prefer find_by over where.first.'
333
+ Enabled: true
334
+
335
+ Rails/FindEach:
336
+ Description: 'Prefer all.find_each over all.find.'
337
+ Enabled: true
338
+
339
+ Rails/HasAndBelongsToMany:
340
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
341
+ Enabled: true
342
+
343
+ Rails/Output:
344
+ Description: 'Checks for calls to puts, print, etc.'
345
+ Enabled: true
346
+
347
+ Rails/ReadWriteAttribute:
348
+ Description: >-
349
+ Checks for read_attribute(:attr) and
350
+ write_attribute(:attr, val).
351
+ Enabled: true
352
+
353
+ Rails/ScopeArgs:
354
+ Description: 'Checks the arguments of ActiveRecord scopes.'
355
+ Enabled: true
356
+
357
+ Rails/TimeZone:
358
+ Description: 'Checks the correct usage of time zone aware methods.'
359
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
360
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
361
+ Enabled: true
362
+
363
+ Rails/Validation:
364
+ Description: 'Use validates :attribute, hash of validations.'
365
+ Enabled: true
366
+
367
+ ################## Style #################################
368
+
369
+ Layout/AccessModifierIndentation:
370
+ Description: Check indentation of private/protected visibility modifiers.
371
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
372
+ Enabled: true
373
+
374
+ Naming/AccessorMethodName:
375
+ Description: Check the naming of accessor methods for get_/set_.
376
+ Enabled: true
377
+
378
+ Style/Alias:
379
+ Description: 'Use alias_method instead of alias.'
380
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
381
+ Enabled: true
382
+
383
+ Layout/AlignArray:
384
+ Description: >-
385
+ Align the elements of an array literal if they span more than
386
+ one line.
387
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
388
+ Enabled: true
389
+
390
+ Layout/AlignHash:
391
+ Description: >-
392
+ Align the elements of a hash literal if they span more than
393
+ one line.
394
+ Enabled: true
395
+
396
+ Layout/AlignParameters:
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: true
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: false
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: true
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/FirstParameterIndentation:
625
+ Description: 'Checks the indentation of the first parameter in a method call.'
626
+ Enabled: true
627
+
628
+ Style/FlipFlop:
629
+ Description: 'Checks for flip flops'
630
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
631
+ Enabled: true
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
+ Enabled: true
642
+
643
+ Style/GlobalVars:
644
+ Description: 'Do not introduce global variables.'
645
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
646
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
647
+ Enabled: true
648
+
649
+ Style/HashSyntax:
650
+ Description: >-
651
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
652
+ { :a => 1, :b => 2 }.
653
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
654
+ Enabled: true
655
+
656
+ Style/IfUnlessModifier:
657
+ Description: >-
658
+ Favor modifier if/unless usage when you have a
659
+ single-line body.
660
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
661
+ Enabled: true
662
+
663
+ Style/IfWithSemicolon:
664
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
665
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
666
+ Enabled: true
667
+
668
+ Layout/IndentationConsistency:
669
+ Description: 'Keep indentation straight.'
670
+ Enabled: true
671
+
672
+ Layout/IndentationWidth:
673
+ Description: 'Use 2 spaces for indentation.'
674
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
675
+ Enabled: true
676
+
677
+ Layout/IndentArray:
678
+ Description: >-
679
+ Checks the indentation of the first element in an array
680
+ literal.
681
+ Enabled: true
682
+
683
+ Layout/IndentHash:
684
+ Description: 'Checks the indentation of the first key in a hash literal.'
685
+ Enabled: true
686
+
687
+ Style/InfiniteLoop:
688
+ Description: 'Use Kernel#loop for infinite loops.'
689
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
690
+ Enabled: true
691
+
692
+ Style/Lambda:
693
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
694
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
695
+ Enabled: false
696
+
697
+ Style/LambdaCall:
698
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
699
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
700
+ Enabled: true
701
+
702
+ Layout/LeadingCommentSpace:
703
+ Description: 'Comments should start with a space.'
704
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
705
+ Enabled: true
706
+
707
+ Style/LineEndConcatenation:
708
+ Description: >-
709
+ Use \ instead of + or << to concatenate two string literals at
710
+ line end.
711
+ Enabled: true
712
+
713
+ Style/MethodCallWithoutArgsParentheses:
714
+ Description: 'Do not use parentheses for method calls with no arguments.'
715
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
716
+ Enabled: true
717
+
718
+ Style/MethodDefParentheses:
719
+ Description: >-
720
+ Checks if the method definitions have or don't have
721
+ parentheses.
722
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
723
+ Enabled: true
724
+
725
+ Naming/MethodName:
726
+ Description: 'Use the configured style when naming methods.'
727
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
728
+ Enabled: true
729
+
730
+ Style/ModuleFunction:
731
+ Description: 'Checks for usage of `extend self` in modules.'
732
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
733
+ Enabled: true
734
+
735
+ Style/MultilineBlockChain:
736
+ Description: 'Avoid multi-line chains of blocks.'
737
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
738
+ Enabled: true
739
+
740
+ Layout/MultilineBlockLayout:
741
+ Description: 'Ensures newlines after multiline block do statements.'
742
+ Enabled: true
743
+
744
+ Style/MultilineIfThen:
745
+ Description: 'Do not use then for multi-line if/unless.'
746
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
747
+ Enabled: true
748
+
749
+ Layout/MultilineOperationIndentation:
750
+ Description: >-
751
+ Checks indentation of binary operations that span more than
752
+ one line.
753
+ Enabled: true
754
+
755
+ Style/NegatedIf:
756
+ Description: >-
757
+ Favor unless over if for negative conditions
758
+ (or control flow or).
759
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
760
+ Enabled: true
761
+
762
+ Style/NegatedWhile:
763
+ Description: 'Favor until over while for negative conditions.'
764
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
765
+ Enabled: true
766
+
767
+ Style/NestedTernaryOperator:
768
+ Description: 'Use one expression per branch in a ternary operator.'
769
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
770
+ Enabled: false
771
+
772
+ Style/Next:
773
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
774
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
775
+ Enabled: true
776
+
777
+ Style/NilComparison:
778
+ Description: 'Prefer x.nil? to x == nil.'
779
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
780
+ Enabled: true
781
+
782
+ Style/NonNilCheck:
783
+ Description: 'Checks for redundant nil checks.'
784
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
785
+ Enabled: true
786
+
787
+ Style/Not:
788
+ Description: 'Use ! instead of not.'
789
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
790
+ Enabled: true
791
+
792
+ Style/NumericLiterals:
793
+ Description: >-
794
+ Add underscores to large numeric literals to improve their
795
+ readability.
796
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
797
+ Enabled: true
798
+
799
+ Style/OneLineConditional:
800
+ Description: >-
801
+ Favor the ternary operator(?:) over
802
+ if/then/else/end constructs.
803
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
804
+ Enabled: true
805
+
806
+ Naming/BinaryOperatorParameterName:
807
+ Description: 'When defining binary operators, name the argument other.'
808
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
809
+ Enabled: false
810
+
811
+ Style/OptionalArguments:
812
+ Description: >-
813
+ Checks for optional arguments that do not appear at the end
814
+ of the argument list
815
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
816
+ Enabled: true
817
+
818
+ Style/ParallelAssignment:
819
+ Description: >-
820
+ Check for simple usages of parallel assignment.
821
+ It will only warn when the number of variables
822
+ matches on both sides of the assignment.
823
+ This also provides performance benefits
824
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
825
+ Enabled: true
826
+
827
+ Style/ParenthesesAroundCondition:
828
+ Description: >-
829
+ Don't use parentheses around the condition of an
830
+ if/unless/while.
831
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
832
+ Enabled: true
833
+
834
+ Style/PercentLiteralDelimiters:
835
+ Description: 'Use `%`-literal delimiters consistently'
836
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
837
+ Enabled: true
838
+
839
+ Style/PercentQLiterals:
840
+ Description: 'Checks if uses of %Q/%q match the configured preference.'
841
+ Enabled: true
842
+
843
+ Style/PerlBackrefs:
844
+ Description: 'Avoid Perl-style regex back references.'
845
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
846
+ Enabled: true
847
+
848
+ Naming/PredicateName:
849
+ Description: 'Check the names of predicate methods.'
850
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
851
+ Enabled: true
852
+
853
+ Style/Proc:
854
+ Description: 'Use proc instead of Proc.new.'
855
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
856
+ Enabled: true
857
+
858
+ Style/RaiseArgs:
859
+ Description: 'Checks the arguments passed to raise/fail.'
860
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
861
+ Enabled: true
862
+
863
+ Style/RedundantBegin:
864
+ Description: "Don't use begin blocks when they are not needed."
865
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
866
+ Enabled: true
867
+
868
+ Style/RedundantException:
869
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
870
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
871
+ Enabled: true
872
+
873
+ Style/RedundantReturn:
874
+ Description: "Don't use return where it's not required."
875
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
876
+ Enabled: true
877
+
878
+ Style/RedundantSelf:
879
+ Description: "Don't use self where it's not needed."
880
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
881
+ Enabled: true
882
+
883
+ Style/RegexpLiteral:
884
+ Description: 'Use / or %r around regular expressions.'
885
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
886
+ Enabled: true
887
+
888
+ Layout/RescueEnsureAlignment:
889
+ Description: 'Align rescues and ensures correctly.'
890
+ Enabled: true
891
+
892
+ Style/RescueModifier:
893
+ Description: 'Avoid using rescue in its modifier form.'
894
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
895
+ Enabled: true
896
+
897
+ Style/SelfAssignment:
898
+ Description: >-
899
+ Checks for places where self-assignment shorthand should have
900
+ been used.
901
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
902
+ Enabled: true
903
+
904
+ Style/Semicolon:
905
+ Description: "Don't use semicolons to terminate expressions."
906
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
907
+ Enabled: true
908
+
909
+ Style/SignalException:
910
+ Description: 'Checks for proper usage of fail and raise.'
911
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
912
+ Enabled: true
913
+
914
+ Style/SingleLineBlockParams:
915
+ Description: 'Enforces the names of some block params.'
916
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
917
+ Enabled: true
918
+
919
+ Style/SingleLineMethods:
920
+ Description: 'Avoid single-line methods.'
921
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
922
+ Enabled: true
923
+
924
+ Layout/SpaceBeforeFirstArg:
925
+ Description: >-
926
+ Checks that exactly one space is used between a method name
927
+ and the first argument for method calls without parentheses.
928
+ Enabled: true
929
+
930
+ Layout/SpaceAfterColon:
931
+ Description: 'Use spaces after colons.'
932
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
933
+ Enabled: true
934
+
935
+ Layout/SpaceAfterComma:
936
+ Description: 'Use spaces after commas.'
937
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
938
+ Enabled: true
939
+
940
+ Layout/SpaceAroundKeyword:
941
+ Description: 'Use spaces around keywords.'
942
+ Enabled: true
943
+
944
+ Layout/SpaceAfterMethodName:
945
+ Description: >-
946
+ Do not put a space between a method name and the opening
947
+ parenthesis in a method definition.
948
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
949
+ Enabled: true
950
+
951
+ Layout/SpaceAfterNot:
952
+ Description: Tracks redundant space after the ! operator.
953
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
954
+ Enabled: true
955
+
956
+ Layout/SpaceAfterSemicolon:
957
+ Description: 'Use spaces after semicolons.'
958
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
959
+ Enabled: true
960
+
961
+ Layout/SpaceBeforeBlockBraces:
962
+ Description: >-
963
+ Checks that the left block brace has or doesn't have space
964
+ before it.
965
+ Enabled: true
966
+
967
+ Layout/SpaceBeforeComma:
968
+ Description: 'No spaces before commas.'
969
+ Enabled: true
970
+
971
+ Layout/SpaceBeforeComment:
972
+ Description: >-
973
+ Checks for missing space between code and a comment on the
974
+ same line.
975
+ Enabled: true
976
+
977
+ Layout/SpaceBeforeSemicolon:
978
+ Description: 'No spaces before semicolons.'
979
+ Enabled: true
980
+
981
+ Layout/SpaceInsideBlockBraces:
982
+ Description: >-
983
+ Checks that block braces have or don't have surrounding space.
984
+ For blocks taking parameters, checks that the left brace has
985
+ or doesn't have trailing space.
986
+ Enabled: true
987
+
988
+ Layout/SpaceAroundBlockParameters:
989
+ Description: 'Checks the spacing inside and after block parameters pipes.'
990
+ Enabled: true
991
+
992
+ Layout/SpaceAroundEqualsInParameterDefault:
993
+ Description: >-
994
+ Checks that the equals signs in parameter default assignments
995
+ have or don't have surrounding space depending on
996
+ configuration.
997
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
998
+ Enabled: true
999
+
1000
+ Layout/SpaceAroundOperators:
1001
+ Description: 'Use a single space around operators.'
1002
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1003
+ Enabled: true
1004
+
1005
+ Layout/SpaceInsideReferenceBrackets:
1006
+ Description: 'No spaces after array [ or before ].'
1007
+ Enabled: true
1008
+
1009
+ Layout/SpaceInsideArrayLiteralBrackets:
1010
+ Description: No spaces after array = [ or before ].
1011
+ Enabled: true
1012
+
1013
+ Layout/SpaceInsideHashLiteralBraces:
1014
+ Description: "Use spaces inside hash literal braces - or don't."
1015
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1016
+ Enabled: true
1017
+
1018
+ Layout/SpaceInsideParens:
1019
+ Description: 'No spaces after ( or before ).'
1020
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1021
+ Enabled: true
1022
+
1023
+ Layout/SpaceInsideRangeLiteral:
1024
+ Description: 'No spaces inside range literals.'
1025
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
1026
+ Enabled: true
1027
+
1028
+ Layout/SpaceInsideStringInterpolation:
1029
+ Description: 'Checks for padding/surrounding spaces inside string interpolation.'
1030
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
1031
+ Enabled: true
1032
+
1033
+ Style/SpecialGlobalVars:
1034
+ Description: 'Avoid Perl-style global variables.'
1035
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
1036
+ Enabled: true
1037
+
1038
+ Style/StringLiterals:
1039
+ Description: 'Checks if uses of quotes match the configured preference.'
1040
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
1041
+ Enabled: true
1042
+
1043
+ Style/StringLiteralsInInterpolation:
1044
+ Description: >-
1045
+ Checks if uses of quotes inside expressions in interpolated
1046
+ strings match the configured preference.
1047
+ Enabled: true
1048
+
1049
+ Style/StructInheritance:
1050
+ Description: 'Checks for inheritance from Struct.new.'
1051
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
1052
+ Enabled: true
1053
+
1054
+ Style/SymbolLiteral:
1055
+ Description: 'Use plain symbols instead of string symbols when possible.'
1056
+ Enabled: true
1057
+
1058
+ Style/SymbolProc:
1059
+ Description: 'Use symbols as procs instead of blocks when possible.'
1060
+ Enabled: true
1061
+
1062
+ Layout/Tab:
1063
+ Description: 'No hard tabs.'
1064
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1065
+ Enabled: true
1066
+
1067
+ Layout/TrailingBlankLines:
1068
+ Description: 'Checks trailing blank lines and final newline.'
1069
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
1070
+ Enabled: true
1071
+
1072
+ Style/TrailingCommaInArguments:
1073
+ Description: 'Checks for trailing comma in parameter lists.'
1074
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
1075
+ Enabled: true
1076
+
1077
+ Style/TrailingCommaInArrayLiteral:
1078
+ Description: 'Checks for trailing comma in array literals.'
1079
+ Enabled: true
1080
+
1081
+ Style/TrailingCommaInHashLiteral:
1082
+ Description: 'Checks for trailing comma in hash literals.'
1083
+ Enabled: true
1084
+
1085
+ Layout/TrailingWhitespace:
1086
+ Description: 'Avoid trailing whitespace.'
1087
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
1088
+ Enabled: true
1089
+
1090
+ Style/TrivialAccessors:
1091
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
1092
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
1093
+ Enabled: true
1094
+
1095
+ Style/UnlessElse:
1096
+ Description: >-
1097
+ Do not use unless with else. Rewrite these with the positive
1098
+ case first.
1099
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
1100
+ Enabled: true
1101
+
1102
+ Style/UnneededCapitalW:
1103
+ Description: 'Checks for %W when interpolation is not needed.'
1104
+ Enabled: true
1105
+
1106
+ Style/UnneededPercentQ:
1107
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
1108
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
1109
+ Enabled: true
1110
+
1111
+ Style/TrailingUnderscoreVariable:
1112
+ Description: >-
1113
+ Checks for the usage of unneeded trailing underscores at the
1114
+ end of parallel variable assignment.
1115
+ Enabled: true
1116
+
1117
+ Style/VariableInterpolation:
1118
+ Description: >-
1119
+ Don't interpolate global, instance and class variables
1120
+ directly in strings.
1121
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
1122
+ Enabled: false
1123
+
1124
+ Naming/VariableName:
1125
+ Description: 'Use the configured style when naming variables.'
1126
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
1127
+ Enabled: true
1128
+
1129
+ Style/WhenThen:
1130
+ Description: 'Use when x then ... for one-line cases.'
1131
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
1132
+ Enabled: true
1133
+
1134
+ Style/WhileUntilDo:
1135
+ Description: 'Checks for redundant do after while or until.'
1136
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
1137
+ Enabled: true
1138
+
1139
+ Style/WhileUntilModifier:
1140
+ Description: >-
1141
+ Favor modifier while/until usage when you have a
1142
+ single-line body.
1143
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
1144
+ Enabled: true
1145
+
1146
+ Style/WordArray:
1147
+ Description: 'Use %w or %W for arrays of words.'
1148
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
1149
+ Enabled: true
1150
+
1151
+ Bundler/OrderedGems:
1152
+ Enabled: true
1153
+
1154
+ RSpec/AnyInstance:
1155
+ Enabled: false
1156
+
1157
+ RSpec/DescribedClass:
1158
+ EnforcedStyle: explicit
1159
+
1160
+ RSpec/ExampleLength:
1161
+ Enabled: false
1162
+
1163
+ RSpec/HookArgument:
1164
+ EnforcedStyle: each
1165
+
1166
+ RSpec/MultipleExpectations:
1167
+ Enabled: false
1168
+
1169
+ RSpec/ImplicitExpect:
1170
+ EnforcedStyle: should
1171
+
1172
+ RSpec/MessageSpies:
1173
+ EnforcedStyle: receive
1174
+
1175
+ RSpec/NestedGroups:
1176
+ Enabled: false
1177
+
1178
+ RSpec/NotToNot:
1179
+ EnforcedStyle: to_not
1180
+
1181
+ RSpec/VerifiedDoubles:
1182
+ Enabled: false
data/presets/latest.yml CHANGED
@@ -5,7 +5,7 @@ AllCops:
5
5
  - Rakefile
6
6
  - lib/**/*.rake
7
7
  DisabledByDefault: true
8
- TargetRubyVersion: 2.4
8
+ TargetRubyVersion: 2.5
9
9
  Exclude:
10
10
  - '*.gemspec'
11
11
  - 'coverage/**/*'
@@ -165,13 +165,6 @@ Lint/UnderscorePrefixedVariableName:
165
165
  Description: 'Do not use prefix `_` for a variable that is used.'
166
166
  Enabled: true
167
167
 
168
- Lint/UnneededDisable:
169
- Description: >-
170
- Checks for rubocop:disable comments that can be removed.
171
- Note: this cop is not disabled when disabling all cops.
172
- It must be explicitly disabled.
173
- Enabled: true
174
-
175
168
  Lint/UnusedBlockArgument:
176
169
  Description: 'Checks for unused block arguments.'
177
170
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
@@ -28,8 +28,8 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ['lib']
30
30
 
31
- spec.add_dependency 'rubocop', '~> 0.49'
31
+ spec.add_dependency 'rubocop', Wonder::Ruby::Style::VERSION
32
32
  spec.add_dependency 'rubocop-rspec', '~> 1.15'
33
- spec.add_development_dependency 'bundler', '~> 1.15'
34
- spec.add_development_dependency 'rake', '~> 10.0'
33
+ spec.add_development_dependency 'bundler'
34
+ spec.add_development_dependency 'rake'
35
35
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wonder-ruby-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.54.0
4
+ version: 0.56.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wonder Sistemas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-28 00:00:00.000000000 Z
11
+ date: 2018-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '0.49'
19
+ version: 0.56.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: '0.49'
26
+ version: 0.56.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,30 +42,30 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.15'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.15'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '0'
69
69
  description:
70
70
  email:
71
71
  - wonder@wonder.com.br
@@ -91,6 +91,7 @@ files:
91
91
  - presets/0.52.0.yml
92
92
  - presets/0.52.1.yml
93
93
  - presets/0.54.0.yml
94
+ - presets/0.56.0.yml
94
95
  - presets/latest.yml
95
96
  - wonder-ruby-style.gemspec
96
97
  homepage: https://github.com/wondersistemas/wonder-ruby-style
@@ -114,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
115
  version: '0'
115
116
  requirements: []
116
117
  rubyforge_project:
117
- rubygems_version: 2.7.5
118
+ rubygems_version: 2.7.7
118
119
  signing_key:
119
120
  specification_version: 4
120
121
  summary: Compartilhamento de configurações do Rubocop entre os projetos de Ruby.