rubocop_config 0.47.1 → 0.47.1.1

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