rspec_api_blueprint_matchers 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +33 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +26 -0
  5. data/.ruby-version +1 -0
  6. data/Rakefile +2 -1
  7. data/config/rubocop/.lint_rubocop.yml +749 -0
  8. data/config/rubocop/.metrics_rubocop.yml +94 -0
  9. data/config/rubocop/.performance_rubocop.yml +323 -0
  10. data/config/rubocop/.rails_rubocop.yml +256 -0
  11. data/config/rubocop/.style_rubocop.yml +2299 -0
  12. data/docker-compose.yml +17 -0
  13. data/lib/rspec_api_blueprint_matchers.rb +1 -0
  14. data/lib/rspec_apib/config.rb +1 -0
  15. data/lib/rspec_apib/elements/annotation.rb +1 -0
  16. data/lib/rspec_apib/elements/array.rb +1 -0
  17. data/lib/rspec_apib/elements/asset.rb +1 -0
  18. data/lib/rspec_apib/elements/base.rb +11 -10
  19. data/lib/rspec_apib/elements/category.rb +2 -1
  20. data/lib/rspec_apib/elements/copy.rb +2 -1
  21. data/lib/rspec_apib/elements/data_structure.rb +2 -0
  22. data/lib/rspec_apib/elements/href_variables.rb +3 -2
  23. data/lib/rspec_apib/elements/http_headers.rb +5 -4
  24. data/lib/rspec_apib/elements/http_message_payload.rb +3 -2
  25. data/lib/rspec_apib/elements/http_request.rb +16 -10
  26. data/lib/rspec_apib/elements/http_response.rb +3 -1
  27. data/lib/rspec_apib/elements/http_transaction.rb +4 -3
  28. data/lib/rspec_apib/elements/member.rb +3 -2
  29. data/lib/rspec_apib/elements/object.rb +2 -1
  30. data/lib/rspec_apib/elements/parse_result.rb +1 -0
  31. data/lib/rspec_apib/elements/resource.rb +1 -0
  32. data/lib/rspec_apib/elements/source_map.rb +1 -0
  33. data/lib/rspec_apib/elements/string.rb +1 -0
  34. data/lib/rspec_apib/elements/templated_href.rb +1 -0
  35. data/lib/rspec_apib/elements/transition.rb +1 -0
  36. data/lib/rspec_apib/elements.rb +1 -0
  37. data/lib/rspec_apib/extractors/http_transaction.rb +1 -0
  38. data/lib/rspec_apib/extractors/resource.rb +1 -0
  39. data/lib/rspec_apib/extractors.rb +1 -0
  40. data/lib/rspec_apib/parser.rb +2 -1
  41. data/lib/rspec_apib/request.rb +7 -10
  42. data/lib/rspec_apib/response.rb +2 -2
  43. data/lib/rspec_apib/rspec.rb +4 -3
  44. data/lib/rspec_apib/transaction_coverage_report.rb +4 -3
  45. data/lib/rspec_apib/transaction_coverage_validator.rb +4 -3
  46. data/lib/rspec_apib/transaction_validator.rb +1 -0
  47. data/lib/rspec_apib/transcluder.rb +2 -2
  48. data/lib/rspec_apib/version.rb +2 -1
  49. data/lib/rspec_apib.rb +2 -1
  50. data/lib/transcluder.rb +1 -0
  51. data/rspec_api_blueprint_matchers.gemspec +6 -4
  52. metadata +25 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3beafbdb89aaed312b890081521e50c6973475eb
4
- data.tar.gz: 512c3f1a07442117d84aadd3cd6e25ba03f12e81
3
+ metadata.gz: 00bbd623fac3c63470843d99199dec55cb21933d
4
+ data.tar.gz: a685889ecb9d20e98bdd4259edb41ad839a8fcc1
5
5
  SHA512:
6
- metadata.gz: dd113aa0f4dcdf19a1760bd9ed0d5f48db11f993ae56c53b6e8e06e3427df2900ed9f03003eeb23979f4c2870a11ffc621bbd8e5ad59fc395ddd9f4ca8629c90
7
- data.tar.gz: 8c496cef8d847dd9e7e3155ea53da91735556c6d99ff2a8d74d4327297894e042531236c03d0cc9b806cd2fe3b48869d73232117621953125b9b5342e7ef481f
6
+ metadata.gz: c8c62e6ea5459d29d6cac59df4a6f087d59c3f601d1c4e054c72bb7c858237a02072d7be62a61b10dce3f0b8271b17ff54e98888ad851902d76c46fdce097cf0
7
+ data.tar.gz: 6941c13aa25247839e24588320b01d6c7f499f2fd555eeee7318094d13928f0f277669359f29c464683e4f8aaed93d748defd8c362ae00c4bd08e06367548967
data/.codeclimate.yml ADDED
@@ -0,0 +1,33 @@
1
+ # To find more info about this,
2
+ # please read the following line
3
+ # https://docs.codeclimate.com/docs/getting-started-configuration
4
+
5
+ engines:
6
+ brakeman:
7
+ enabled: true
8
+ bundler-audit:
9
+ enabled: true
10
+ duplication:
11
+ enabled: true
12
+ config:
13
+ languages:
14
+ ruby:
15
+ count_threshold: 3
16
+ fixme:
17
+ enabled: true
18
+ rubocop:
19
+ enabled: true
20
+ reek:
21
+ enabled: true
22
+ eslint:
23
+ enabled: true
24
+ ratings:
25
+ paths:
26
+ - Gemfile.lock
27
+ - "**.erb"
28
+ - "**.rb"
29
+ - "**.js"
30
+ exclude_paths:
31
+ - spec/
32
+ - bin/
33
+ - config/
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ *.gem
data/.rubocop.yml ADDED
@@ -0,0 +1,26 @@
1
+ # To find more info about this,
2
+ # please read the following line
3
+ # http://www.rubydoc.info/github/bbatsov/rubocop/Rubocop
4
+
5
+ inherit_from:
6
+ - config/rubocop/.lint_rubocop.yml
7
+ - config/rubocop/.metrics_rubocop.yml
8
+ - config/rubocop/.performance_rubocop.yml
9
+ - config/rubocop/.rails_rubocop.yml
10
+ - config/rubocop/.style_rubocop.yml
11
+
12
+ AllCops:
13
+ Exclude:
14
+ - "db"
15
+ - "tmp"
16
+ - "coverage"
17
+ - "public"
18
+ - "Gemfile"
19
+ - "Gemfile.lock"
20
+ - "Guardfile"
21
+ - "config/*"
22
+ - "bin/*"
23
+ - "config.ru"
24
+ - "spec"
25
+ - "vendor/gems/**/spec/**"
26
+ TargetRubyVersion: 2.4
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.4.1
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/gem_tasks"
2
3
  require "rspec/core/rake_task"
3
4
 
4
5
  RSpec::Core::RakeTask.new(:spec)
5
6
 
6
- task :default => :spec
7
+ task default: :spec
@@ -0,0 +1,749 @@
1
+ # Lint::AmbiguousOperator
2
+ #
3
+ # Checks for ambiguous operators in the first argument of a method invocation without parentheses.
4
+ #
5
+ # bad: do_something *some_array
6
+ #
7
+ # The '*' is interpreted as a splat operator but it could possibly be
8
+ # a '*' method invocation (i.e. 'do_something.*(some_array)')
9
+ #
10
+ # good: do_something(*some_array)
11
+ #
12
+ Lint/AmbiguousOperator:
13
+ Enabled: true
14
+
15
+ # Lint::AmbiguousRegexpLiteral
16
+ #
17
+ # Checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.
18
+ #
19
+ # bad: do_something /pattern/i
20
+ #
21
+ # This is interpreted as a method invocation with a regexp literal,
22
+ # but it could possibly be `/` method invocations. (i.e. `do_something./(pattern)./(i)`)
23
+ #
24
+ # good: do_something(/pattern/i)
25
+
26
+ Lint/AmbiguousRegexpLiteral:
27
+ Enabled: true
28
+
29
+ # Lint::AssignmentInCondition
30
+ #
31
+ # Checks for assignments in the conditions of if/while/until
32
+ # (This also helps in accidentally using an assignment operator instead of a comparison)
33
+ #
34
+ # bad:
35
+ #
36
+ # if some_var = true
37
+ # do_something
38
+ # end
39
+ #
40
+ # good:
41
+ #
42
+ # if some_var == true
43
+ # do_something
44
+ # end
45
+ #
46
+ Lint/AssignmentInCondition:
47
+ AllowSafeAssignment: true
48
+
49
+ # Lint::BlockAlignment
50
+ #
51
+ # Checks whether the end keywords are aligned properly for do end blocks.
52
+ #
53
+ # The value `start_of_block` means that the `end` should be aligned with line
54
+ # where the `do` keyword appears.
55
+ #
56
+ # The value `start_of_line` means it should be aligned with the whole
57
+ # expression's starting line.
58
+ #
59
+ # The value `either` means both are allowed.
60
+
61
+ Lint/BlockAlignment:
62
+ AlignWith: either
63
+
64
+ # Lint::CircularArgumentReference
65
+ #
66
+ # Checks for circular argument reference in optional keyword arguments and optional
67
+ # ordinal arguments
68
+ #
69
+ # bad:
70
+ #
71
+ # def bake(pie: pie)
72
+ # pie.heat_up
73
+ # end
74
+ #
75
+ # good:
76
+ #
77
+ # def bake(pie:)
78
+ # pie.heat_up
79
+ # end
80
+
81
+ Lint/CircularArgumentReference:
82
+ Enabled: true
83
+
84
+ # Lint::ConditionPosition
85
+ #
86
+ # Checks for conditions that are not on the same line as if/while/until.
87
+ #
88
+ # bad:
89
+ #
90
+ # if
91
+ # some_condition
92
+ # do_something
93
+ # end
94
+ #
95
+ # good:
96
+ #
97
+ # if some_condition
98
+ # do_something
99
+ # end
100
+ #
101
+ Lint/ConditionPosition:
102
+ Enabled: false
103
+
104
+ # Lint::Debugger
105
+ #
106
+ # Checks for calls to debugger or pry.
107
+
108
+ Lint/Debugger:
109
+ Enabled: true
110
+
111
+ # Lint::DefEndAlignment
112
+ #
113
+ # Checks whether the end keywords of method definitions are aligned properly
114
+
115
+ Lint/DefEndAlignment:
116
+ AlignWith: start_of_line
117
+ AutoCorrect: true
118
+
119
+ # Lint::DeprecatedClassMethods
120
+ #
121
+ # Checks for used of the deprecated class method usages.
122
+ #
123
+ # bad:
124
+ #
125
+ # file.exists?(some_path)
126
+ #
127
+ # good:
128
+ #
129
+ # file.exist?(some_path)
130
+ #
131
+ Lint/DeprecatedClassMethods:
132
+ Enabled: true
133
+
134
+ # Lint::DuplicateCaseCondition
135
+ #
136
+ # Checks that there are no repeated conditions used in case 'when' expressions
137
+ #
138
+ # bad:
139
+ # case x
140
+ # when 'first'
141
+ # do_something
142
+ # when 'first'
143
+ # do_something_else
144
+ # end
145
+
146
+ Lint/DuplicateCaseCondition:
147
+ Enabled: true
148
+
149
+ # Lint::DuplicateMethods
150
+ #
151
+ # Checks for duplicated instance (or singleton) method definitions.
152
+ #
153
+ # bad:
154
+ #
155
+ # def duplicated
156
+ # 1
157
+ # end
158
+ #
159
+ # def duplicated
160
+ # 2
161
+ # end
162
+
163
+ Lint/DuplicateMethods:
164
+ Enabled: true
165
+
166
+ # Lint::DuplicateKey
167
+ #
168
+ # Checks for duplicated keys in hash literals
169
+ #
170
+ # bad: hash = { food: 'apple', food: 'orange' }
171
+
172
+ Lint/DuplicateKey:
173
+ Enabled: true
174
+
175
+ # Lint::EachWithObjectArgument
176
+ #
177
+ # Checks if each_with_object is called with an immutable argument.
178
+ #
179
+ # Example:
180
+ # sum = numbers.each_with_object(0) { |e, a| a += e }
181
+
182
+ Lint/EachWithObjectArgument:
183
+ Enabled: true
184
+
185
+ # Lint::ElseLayout
186
+ #
187
+ # Checks for odd else block layout (usually a mistake in coding).
188
+ #
189
+ # bad:
190
+ #
191
+ # if something
192
+ # ... do something...
193
+ # else do_this
194
+ # do_that
195
+ # end
196
+ #
197
+ # good:
198
+ #
199
+ # if something
200
+ # ... do something...
201
+ # else
202
+ # do_this
203
+ # do_that
204
+ # end
205
+ #
206
+ Lint/ElseLayout:
207
+ Enabled: true
208
+
209
+ # Lint::EmptyEnsure
210
+ #
211
+ # Checks for empty ensure blocks.
212
+ #
213
+ # bad:
214
+ #
215
+ # def some_method
216
+ # do_something
217
+ # ensure
218
+ # end
219
+ #
220
+ # good:
221
+ #
222
+ # def some_method
223
+ # do_something
224
+ # ensure
225
+ # do_something_else
226
+ # end
227
+ #
228
+ Lint/EmptyEnsure:
229
+ Enabled: true
230
+
231
+ # Lint::EmptyExpression
232
+ #
233
+ # Checks for the presence of empty expressions
234
+ #
235
+ # bad:
236
+ #
237
+ # foo = ()
238
+ # if ()
239
+ # bar
240
+ # end
241
+
242
+ Lint/EmptyExpression:
243
+ Enabled: true
244
+
245
+ # Lint::EmptyInterpolation
246
+ #
247
+ # Checks for empty interpolation
248
+
249
+ Lint/EmptyInterpolation:
250
+ Enabled: true
251
+
252
+ # Lint::EmptyWhen
253
+ #
254
+ # Checks for the presence of 'when' branches without a body
255
+ #
256
+ # bad:
257
+ #
258
+ # case foo
259
+ # when bar then 1
260
+ # when baz then #nothing
261
+ # end
262
+ #
263
+ Lint/EmptyWhen:
264
+ Enabled: true
265
+
266
+ # Lint::EndAlignment
267
+ #
268
+ # Checks whether the end keywords are aligned properly
269
+
270
+ Lint/EndAlignment:
271
+ AlignWith: keyword
272
+ AutoCorrect: true
273
+
274
+ # Lint::EndInMethod
275
+ #
276
+ # Checks for END blocks in method definitions
277
+ # ( Use `at_exit` instead )
278
+
279
+ Lint/EndInMethod:
280
+ Enabled: true
281
+
282
+ # Lint::EnsureReturn
283
+ #
284
+ # Checks for `return` from an `ensure` block.
285
+ # ( Do not return from an `ensure` block. )
286
+
287
+ Lint/EnsureReturn:
288
+ Enabled: true
289
+
290
+ # Lint::Eval
291
+ #
292
+ # Checks for the use of *Kernel#eval*.
293
+ # ( Using eval is serious security risk )
294
+
295
+ Lint/Eval:
296
+ Enabled: false
297
+
298
+ # Lint::FloatOutOfRange
299
+ #
300
+ # Identifies Float literal which are, like, too big.
301
+
302
+ Lint/FloatOutOfRange:
303
+ Enabled: true
304
+
305
+ # Lint::FormatParameterMismatch
306
+ #
307
+ # Sees if there is a mismatch between the number of expected fields for format/sprintf/#% and
308
+ # what is actually passed as arguments
309
+ #
310
+ # Example:
311
+ # format('A value: %s and another: %i', a_value)
312
+
313
+ Lint/FormatParameterMismatch:
314
+ Enabled: true
315
+
316
+ # Style::HandleExceptions
317
+ #
318
+ # Checks for rescue blocks with no body.
319
+ #
320
+ # bad:
321
+ #
322
+ # def some_method
323
+ # do_something
324
+ # rescue
325
+ # #do_nothing
326
+ # end
327
+ #
328
+ # good:
329
+ #
330
+ # def some_method
331
+ # do_something
332
+ # rescue
333
+ # handle_exception
334
+ # end
335
+ #
336
+ Lint/HandleExceptions:
337
+ Enabled: true
338
+
339
+ # Lint::ImplicitStringConcatenation
340
+ #
341
+ # Checks for implicit string concatenation of string literals which are on the same line
342
+ #
343
+ # bad:
344
+ #
345
+ # array = ['Item 1' 'Item 2']
346
+ #
347
+ # good:
348
+ #
349
+ # array = ['Item 1Item 2']
350
+
351
+ Lint/ImplicitStringConcatenation:
352
+ Enabled: true
353
+
354
+ # Lint::IneffectiveAccessModifier
355
+ #
356
+ # Checks for 'private' or 'protected' access modifiers which are applied to a singleton method.
357
+ # These access modifiers do not make singleton methods private/protected.
358
+ #'private_class_method' can be used for that.
359
+ #
360
+ # bad:
361
+ #
362
+ # class C
363
+ # private
364
+ #
365
+ # def self.method
366
+ # puts 'hi'
367
+ # end
368
+ # end
369
+ #
370
+ # good:
371
+ #
372
+ # class C
373
+ # def self.method
374
+ # puts 'hi'
375
+ # end
376
+ #
377
+ # private_class_method :method
378
+ # end
379
+ #
380
+
381
+ Lint/IneffectiveAccessModifier:
382
+ Enabled: false
383
+
384
+ # Lint::InheritException
385
+ #
386
+ # Looks for error classes inheriting from 'Exception' and its standard library subclasses,
387
+ # excluding subclasses of 'StandardError'.
388
+
389
+ Lint/InheritException:
390
+ EnforcedStyle: runtime_error
391
+
392
+ # Lint::InvalidCharacterLiteral
393
+ #
394
+ # Checks for invalid character literals with a non-escaped whitespace character (e.g. `?`).
395
+ # Generally this results in syntax errors.
396
+ #
397
+ # bad: p(? )
398
+ Lint/InvalidCharacterLiteral:
399
+ Enabled: false
400
+
401
+ # Lint::LiteralInCondition
402
+ #
403
+ # Checks for literals used as the conditions or as operands in and/or
404
+ # expressions serving as the conditions of if/while/until.
405
+ #
406
+ # bad:
407
+ #
408
+ # if some_var && true
409
+ # do_something
410
+ # end
411
+ #
412
+ # good:
413
+ #
414
+ # if some_var && some_condition
415
+ # do_something
416
+ # end
417
+ #
418
+ Lint/LiteralInCondition:
419
+ Enabled: true
420
+
421
+ # Lint::LiteralInInterpolation
422
+ #
423
+ # Checks for interpolated literals.
424
+ #
425
+ # bad: "result is #{10}"
426
+ #
427
+ # good: "result is 10"
428
+
429
+ Lint/LiteralInInterpolation:
430
+ Enabled: true
431
+
432
+ # Lint::Loop
433
+ #
434
+ # Checks for uses of *begin...end while/until something*.
435
+ #
436
+ # using while:
437
+ #
438
+ # bad:
439
+ #
440
+ # begin
441
+ # do_something
442
+ # end while some_condition
443
+ #
444
+ # good:
445
+ #
446
+ # while some_condition
447
+ # do_something
448
+ # end
449
+ #
450
+
451
+ Lint/Loop:
452
+ Enabled: true
453
+
454
+ # Lint::NestedMethodDefinition
455
+ #
456
+ # Checks for nested method definitions.
457
+
458
+ Lint/NestedMethodDefinition:
459
+ Enabled: true
460
+
461
+ # Lint::NextWithoutAccumulator
462
+ #
463
+ # Don't omit the accumulator when calling `next` in a `reduce` block
464
+ #
465
+ # bad:
466
+ #
467
+ # result = (1..4).reduce(0) do |acc,i|
468
+ # next if i.odd?
469
+ # acc + i
470
+ # end
471
+ #
472
+ # good:
473
+ #
474
+ # result = (1..4).reduce(0) do |acc,i|
475
+ # next if i.odd?
476
+ # acc + i
477
+ # end
478
+ #
479
+
480
+ Lint/NextWithoutAccumulator:
481
+ Enabled: true
482
+
483
+ # Lint::NonLocalExitFromIterator
484
+ #
485
+ # Checks for non-local exit from iterator.
486
+
487
+ Lint/NonLocalExitFromIterator:
488
+ Enabled: true
489
+
490
+ # Lint::ParenthesesAsGroupedExpression
491
+ #
492
+ # Checks for space between the name of a called method and left parenthesis.
493
+ #
494
+ # bad: puts (x + y)
495
+ #
496
+ # good: puts(x + y)
497
+ #
498
+ Lint/ParenthesesAsGroupedExpression:
499
+ Enabled: true
500
+
501
+ # Lint::PercentStringArray
502
+ #
503
+ # Checks for quotes and commas in %w, e.g.
504
+ #
505
+ # Example: `%w('foo', "bar")`
506
+
507
+ Lint/PercentStringArray:
508
+ Enabled: true
509
+
510
+ # Lint::PercentSymbolArray
511
+ #
512
+ # Checks for colons and commas in %i, e.g.
513
+ #
514
+ # Example: `%i(:foo, :bar)`
515
+
516
+ Lint/PercentSymbolArray:
517
+ Enabled: true
518
+
519
+ # Lint::RandOne
520
+ #
521
+ # Checks for `rand(1)` calls. Such calls always return `0`
522
+
523
+ Lint/RandOne:
524
+ Enabled: true
525
+
526
+ # Lint::RequireParentheses
527
+ #
528
+ # Checks for expressions where there is a call to a predicate method with at least one argument,
529
+ # where no paranthesis are used around the parameter list, and a boolean operator, && or ||,
530
+ # is used in the last argument.
531
+ # The idea behing this warning for these constructs is that the user might be under the impression
532
+ # that the return value from the method call is an operand of &&/||.
533
+ #
534
+ # bad:
535
+ #
536
+ # if day.is? :tuesday && month == :jan
537
+ #
538
+ # good:
539
+ #
540
+ # if day.is?(:tuesday) && month == :jan
541
+ #
542
+ Lint/RequireParentheses:
543
+ Enabled: true
544
+
545
+ # Lint::RescueException
546
+ #
547
+ # Checks for `rescue` blocks targeting the Exception class.
548
+ # ( Avoid rescuing the Exception class. )
549
+
550
+ Lint/RescueException:
551
+ Enabled: true
552
+
553
+ # Lint::ShadowedException
554
+ #
555
+ # Checks for a rescued exception that get shadowed by a less specific exception being
556
+ # rescued before a more specific exception is rescued
557
+ #
558
+ # bad:
559
+ #
560
+ # begin
561
+ # something
562
+ # rescue Exception
563
+ # handle_exception
564
+ # rescue StandardError
565
+ # handle_standard_error
566
+ # end
567
+ #
568
+ # good:
569
+ #
570
+ # begin
571
+ # something
572
+ # rescue StandardError
573
+ # handle_standard_error
574
+ # rescue Exception
575
+ # handle_exception
576
+ # end
577
+
578
+ Lint/ShadowedException:
579
+ Enabled: true
580
+
581
+ # Lint::ShadowingOuterLocalVariable
582
+ #
583
+ # Looks for use of the same name as outer local variables for block arguments or block
584
+ # local variables.
585
+
586
+ Lint/ShadowingOuterLocalVariable:
587
+ Enabled: true
588
+
589
+ # Lint::StringConversionInInterpolation
590
+ #
591
+ # Checks for string conversion in string interpolation, which is redundant.
592
+ #
593
+ # Example: "result is #{something.to_s}"
594
+
595
+ Lint/StringConversionInInterpolation:
596
+ Enabled: true
597
+
598
+ # Lint::UnderscorePrefixedVariableName
599
+ #
600
+ # Checks for underscore-prefixed variables that are actually used.
601
+ #
602
+ # bad:
603
+ #
604
+ # [1,2,3].each do |_num|
605
+ # do_something(_num)
606
+ # end
607
+ #
608
+ # good:
609
+ #
610
+ # [1,2,3].each do |_num|
611
+ # do_something # not using `_num`
612
+ # end
613
+ #
614
+ Lint/UnderscorePrefixedVariableName:
615
+ Enabled: true
616
+
617
+ # Lint::UnifiedInteger
618
+ #
619
+ # Checks for using Fixnum or BigNum constant
620
+ #
621
+ # bad:
622
+ #
623
+ # 1.is_a?(Fixnum)
624
+ # 1.is_a?(Bignum)
625
+ #
626
+ # good:
627
+ #
628
+ # 1.is_a?(Integer)
629
+
630
+ Lint/UnifiedInteger:
631
+ Enabled: true
632
+
633
+ # Lint::UnneededDisable
634
+ #
635
+ # Detects the instances of rubocop:disableComments that can be removed without causing any
636
+ # offenses to be reported.
637
+
638
+ Lint/UnneededDisable:
639
+ Enabled: true
640
+
641
+ # Lint::UnneededSplatExpansion
642
+ #
643
+ # Checks for unneeded usages of splat expansion
644
+ #
645
+ # bad: a = *[1, 2, 3]
646
+ #
647
+ # good: a = [1, 2, 3]
648
+
649
+ Lint/UnneededSplatExpansion:
650
+ Enabled: true
651
+
652
+ # Lint::UnreachableCode
653
+ #
654
+ # Checks for unreachable code.
655
+
656
+ Lint/UnreachableCode:
657
+ Enabled: true
658
+
659
+ # Lint::UnusedBlockArgument
660
+ #
661
+ # Checks for unused block arguments
662
+ #
663
+ # bad:
664
+ #
665
+ # do_something do |used, _unused|
666
+ # puts used
667
+ # end
668
+ #
669
+ # good:
670
+ #
671
+ # do_something do |used|
672
+ # puts used
673
+ # end
674
+
675
+ Lint/UnusedBlockArgument:
676
+ Enabled: true
677
+
678
+ # Lint::UnusedMethodArgument
679
+ #
680
+ # Checks for unused method argument
681
+
682
+ Lint/UnusedMethodArgument:
683
+ Enabled: true
684
+
685
+ # Lint::UselessAccessModifier
686
+ #
687
+ # Checks for redundant access modifiers, including those with no code,
688
+ # those which are repeated, and leading `public` modifiers in a class or module body.
689
+
690
+ Lint/UselessAccessModifier:
691
+ Enabled: true
692
+
693
+ # Lint::UselessAssignment
694
+ #
695
+ # Checks for every useless assignment to local variable in every scope.
696
+
697
+ Lint/UselessAssignment:
698
+ Enabled: true
699
+
700
+ # Lint::UselessComparison
701
+ #
702
+ # Checks for comparison of something with itself.
703
+
704
+ Lint/UselessComparison:
705
+ Enabled: true
706
+
707
+ # Lint::UselessElseWithoutRescue
708
+ #
709
+ # Checks for useless `else` in `begin..end` without `rescue`
710
+ #
711
+ # Example:
712
+ #
713
+ # begin
714
+ # do_something
715
+ # else
716
+ # handle_errors #this will never be run.
717
+ # end
718
+
719
+ Lint/UselessElseWithoutRescue:
720
+ Enabled: true
721
+
722
+ # Lint::UselessSetterCall
723
+ #
724
+ # Checks for a setter call to local variable as the final expression of a function definition
725
+
726
+ Lint/UselessSetterCall:
727
+ Enabled: true
728
+
729
+
730
+ # Lint::Void
731
+ #
732
+ # Checks for operators, variables and literals used in void context.
733
+ #
734
+ # bad:
735
+ #
736
+ # def some_method
737
+ # some_num * 10
738
+ # do_something
739
+ # end
740
+ #
741
+ # good:
742
+ #
743
+ # def some_method
744
+ # do_something
745
+ # some_num * 10
746
+ # end
747
+ #
748
+ Lint/Void:
749
+ Enabled: false