introspective_grape 0.4.1 → 0.5.2

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