lunchmoney 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build_and_publish_yard_docs.yml +2 -2
  3. data/.github/workflows/ci.yml +9 -10
  4. data/.github/workflows/rbi-updater.yml +1 -1
  5. data/.github/workflows/release_pipeline.yml +1 -1
  6. data/.rubocop.yml +1 -1
  7. data/.ruby-version +1 -1
  8. data/.toys/.toys.rb +8 -0
  9. data/Gemfile +1 -1
  10. data/Gemfile.lock +76 -60
  11. data/README.md +0 -2
  12. data/SECURITY.md +151 -0
  13. data/bin/check_vcr_version +94 -0
  14. data/lib/lunchmoney/api.rb +25 -38
  15. data/lib/lunchmoney/calls/assets.rb +10 -13
  16. data/lib/lunchmoney/calls/base.rb +59 -7
  17. data/lib/lunchmoney/calls/budgets.rb +22 -25
  18. data/lib/lunchmoney/calls/categories.rb +28 -36
  19. data/lib/lunchmoney/calls/crypto.rb +7 -9
  20. data/lib/lunchmoney/calls/plaid_accounts.rb +7 -9
  21. data/lib/lunchmoney/calls/recurring_expenses.rb +4 -5
  22. data/lib/lunchmoney/calls/tags.rb +3 -4
  23. data/lib/lunchmoney/calls/transactions.rb +28 -36
  24. data/lib/lunchmoney/calls/users.rb +3 -4
  25. data/lib/lunchmoney/configuration.rb +20 -0
  26. data/lib/lunchmoney/objects/object.rb +4 -9
  27. data/lib/lunchmoney/validators.rb +8 -6
  28. data/lib/lunchmoney/version.rb +1 -1
  29. data/lib/lunchmoney.rb +3 -3
  30. data/lunchmoney.gemspec +1 -1
  31. data/sorbet/rbi/annotations/activesupport.rbi +35 -0
  32. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -2
  33. data/sorbet/rbi/gems/{activesupport@7.2.2.1.rbi → activesupport@8.0.2.1.rbi} +1369 -989
  34. data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +4 -3
  35. data/sorbet/rbi/gems/{base64@0.2.0.rbi → base64@0.3.0.rbi} +76 -39
  36. data/sorbet/rbi/gems/{benchmark@0.4.0.rbi → benchmark@0.4.1.rbi} +50 -49
  37. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +275 -0
  38. data/sorbet/rbi/gems/{dotenv@3.1.7.rbi → dotenv@3.1.8.rbi} +9 -9
  39. data/sorbet/rbi/gems/{drb@2.2.1.rbi → drb@2.2.3.rbi} +503 -188
  40. data/sorbet/rbi/gems/{faraday-net_http@3.4.0.rbi → faraday-net_http@3.4.1.rbi} +23 -23
  41. data/sorbet/rbi/gems/{faraday@2.12.2.rbi → faraday@2.13.4.rbi} +468 -141
  42. data/sorbet/rbi/gems/{hashdiff@1.1.2.rbi → hashdiff@1.2.0.rbi} +5 -3
  43. data/sorbet/rbi/gems/{json@2.10.2.rbi → json@2.13.2.rbi} +386 -175
  44. data/sorbet/rbi/gems/{kramdown@2.4.0.rbi → kramdown@2.5.1.rbi} +316 -234
  45. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
  46. data/sorbet/rbi/gems/{logger@1.6.6.rbi → logger@1.7.0.rbi} +63 -40
  47. data/sorbet/rbi/gems/{parser@3.3.7.1.rbi → parser@3.3.9.0.rbi} +303 -291
  48. data/sorbet/rbi/gems/{rack@3.1.9.rbi → rack@3.2.1.rbi} +712 -547
  49. data/sorbet/rbi/gems/{rake@13.2.1.rbi → rake@13.3.0.rbi} +238 -227
  50. data/sorbet/rbi/gems/{rbi@0.3.1.rbi → rbi@0.3.6.rbi} +1084 -2521
  51. data/sorbet/rbi/gems/{rbs@3.9.0.rbi → rbs@4.0.0.dev.4.rbi} +1336 -419
  52. data/sorbet/rbi/gems/{regexp_parser@2.10.0.rbi → regexp_parser@2.11.2.rbi} +1044 -956
  53. data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
  54. data/sorbet/rbi/gems/{rexml@3.4.1.rbi → rexml@3.4.2.rbi} +302 -292
  55. data/sorbet/rbi/gems/{rubocop-ast@1.38.0.rbi → rubocop-ast@1.46.0.rbi} +802 -1016
  56. data/sorbet/rbi/gems/{rubocop-minitest@0.36.0.rbi → rubocop-minitest@0.38.2.rbi} +129 -93
  57. data/sorbet/rbi/gems/{rubocop-rails@2.29.1.rbi → rubocop-rails@2.33.3.rbi} +575 -230
  58. data/sorbet/rbi/gems/{rubocop-shopify@2.15.1.rbi → rubocop-shopify@2.17.1.rbi} +1 -0
  59. data/sorbet/rbi/gems/{rubocop-sorbet@0.8.7.rbi → rubocop-sorbet@0.10.5.rbi} +761 -83
  60. data/sorbet/rbi/gems/{rubocop@1.71.2.rbi → rubocop@1.80.1.rbi} +6543 -3097
  61. data/sorbet/rbi/gems/{spoom@1.6.1.rbi → spoom@1.7.6.rbi} +1179 -2621
  62. data/sorbet/rbi/gems/{tapioca@0.16.11.rbi → tapioca@0.17.7.rbi} +623 -745
  63. data/sorbet/rbi/gems/{thor@1.3.2.rbi → thor@1.4.0.rbi} +88 -67
  64. data/sorbet/rbi/gems/{unicode-display_width@3.1.4.rbi → unicode-display_width@3.1.5.rbi} +5 -5
  65. data/sorbet/rbi/gems/{vcr@6.3.1.rbi → vcr@6.3.1-ce35c236fe48899f02ddf780973b44cdb756c0ee.rbi} +140 -123
  66. metadata +42 -38
  67. data/sorbet/rbi/gems/bigdecimal@3.1.9.rbi +0 -78
  68. /data/sorbet/rbi/gems/{connection_pool@2.5.0.rbi → connection_pool@2.5.3.rbi} +0 -0
  69. /data/sorbet/rbi/gems/{language_server-protocol@3.17.0.4.rbi → language_server-protocol@3.17.0.5.rbi} +0 -0
  70. /data/sorbet/rbi/gems/{parallel@1.26.3.rbi → parallel@1.27.0.rbi} +0 -0
@@ -106,6 +106,118 @@ RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::MSG = T.let(T.unsafe(nil)
106
106
  # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#23
107
107
  RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::WITHOUT_BLOCK_MSG = T.let(T.unsafe(nil), String)
108
108
 
109
+ # Disallow defining methods in blocks, to prevent running into issues
110
+ # caused by https://github.com/sorbet/sorbet/issues/3609.
111
+ #
112
+ # As a workaround, use `define_method` instead.
113
+ #
114
+ # The one exception is for `Class.new` blocks, as long as the result is
115
+ # assigned to a constant (i.e. as long as it is not an anonymous class).
116
+ # Another exception is for ActiveSupport::Concern `class_methods` blocks.
117
+ #
118
+ # @example
119
+ # # bad
120
+ # yielding_method do
121
+ # def bad(args)
122
+ # # ...
123
+ # end
124
+ # end
125
+ #
126
+ # # bad
127
+ # Class.new do
128
+ # def bad(args)
129
+ # # ...
130
+ # end
131
+ # end
132
+ #
133
+ # # good
134
+ # yielding_method do
135
+ # define_method(:good) do |args|
136
+ # # ...
137
+ # end
138
+ # end
139
+ #
140
+ # # good
141
+ # MyClass = Class.new do
142
+ # def good(args)
143
+ # # ...
144
+ # end
145
+ # end
146
+ #
147
+ # # good
148
+ # module SomeConcern
149
+ # extend ActiveSupport::Concern
150
+ #
151
+ # class_methods do
152
+ # def good(args)
153
+ # # ...
154
+ # end
155
+ # end
156
+ # end
157
+ #
158
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#55
159
+ class RuboCop::Cop::Sorbet::BlockMethodDefinition < ::RuboCop::Cop::Base
160
+ include ::RuboCop::Cop::Alignment
161
+ extend ::RuboCop::Cop::AutoCorrector
162
+
163
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#62
164
+ def activesupport_concern_class_methods_block?(param0 = T.unsafe(nil)); end
165
+
166
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#71
167
+ def module_extends_activesupport_concern?(param0 = T.unsafe(nil)); end
168
+
169
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#80
170
+ def on_block(node); end
171
+
172
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#80
173
+ def on_numblock(node); end
174
+
175
+ private
176
+
177
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#186
178
+ def adjust_for_closing_parenthesis(end_pos); end
179
+
180
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#106
181
+ def autocorrect_method_in_block(corrector, node); end
182
+
183
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#198
184
+ def closing_parenthesis_follows(source); end
185
+
186
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#175
187
+ def find_end_position_with_arguments(node); end
188
+
189
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#182
190
+ def find_end_position_without_arguments(node); end
191
+
192
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#167
193
+ def find_method_signature_end_position(node); end
194
+
195
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#143
196
+ def handle_method_without_body(node, indent); end
197
+
198
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#161
199
+ def handle_multiline_method_without_body(node); end
200
+
201
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#155
202
+ def handle_single_line_method(node, indent); end
203
+
204
+ # @return [Boolean]
205
+ #
206
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#98
207
+ def in_activesupport_concern_class_methods_block?(node); end
208
+
209
+ # @return [Boolean]
210
+ #
211
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#151
212
+ def single_line_method?(node); end
213
+
214
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#132
215
+ def transform_args_to_block_args(node); end
216
+ end
217
+
218
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/block_method_definition.rb#59
219
+ RuboCop::Cop::Sorbet::BlockMethodDefinition::MSG = T.let(T.unsafe(nil), String)
220
+
109
221
  # Checks for the a mistaken variant of the "obsolete memoization pattern" that used to be required
110
222
  # on every call, causing the memoized value to be discarded and recomputed on every call.
111
223
  #
@@ -190,15 +302,15 @@ RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil),
190
302
  # end
191
303
  # end
192
304
  #
193
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#35
305
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#36
194
306
  class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base
195
307
  include ::RuboCop::Cop::Alignment
196
308
  extend ::RuboCop::Cop::AutoCorrector
197
309
 
198
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#81
310
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#82
199
311
  def argumentless_unbound_callable_callback_conditional?(param0 = T.unsafe(nil)); end
200
312
 
201
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#91
313
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#92
202
314
  def on_send(node); end
203
315
 
204
316
  private
@@ -206,16 +318,60 @@ class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base
206
318
  # Find the immediately enclosing class or module name.
207
319
  # Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module.
208
320
  #
209
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#128
321
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#129
210
322
  def immediately_enclosing_module_name(node); end
211
323
  end
212
324
 
213
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#39
325
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#40
214
326
  RuboCop::Cop::Sorbet::CallbackConditionalsBinding::MSG = T.let(T.unsafe(nil), String)
215
327
 
216
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#41
328
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#42
217
329
  RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
218
330
 
331
+ # Ensure type parameters used in generic methods are always capitalized.
332
+ #
333
+ # @example
334
+ #
335
+ # # bad
336
+ # sig { type_parameters(:x).params(a: T.type_parameter(:x)).void }
337
+ # def foo(a); end
338
+ #
339
+ # # good
340
+ # sig { type_parameters(:X).params(a: T.type_parameter(:X)).void }
341
+ # def foo(a: 1); end
342
+ #
343
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#17
344
+ class RuboCop::Cop::Sorbet::CapitalizedTypeParameters < ::RuboCop::Cop::Base
345
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
346
+ extend ::RuboCop::Cop::AutoCorrector
347
+
348
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#51
349
+ def on_csend(node); end
350
+
351
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#47
352
+ def on_send(node); end
353
+
354
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#35
355
+ def on_signature(node); end
356
+
357
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#31
358
+ def t_type_parameter?(param0 = T.unsafe(nil)); end
359
+
360
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#26
361
+ def type_parameters?(param0 = T.unsafe(nil)); end
362
+
363
+ private
364
+
365
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#57
366
+ def check_type_parameters_case(node); end
367
+ end
368
+
369
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#21
370
+ RuboCop::Cop::Sorbet::CapitalizedTypeParameters::MSG = T.let(T.unsafe(nil), String)
371
+
372
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb#23
373
+ RuboCop::Cop::Sorbet::CapitalizedTypeParameters::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
374
+
219
375
  # Disallows the usage of `checked(true)`. This usage could cause
220
376
  # confusion; it could lead some people to believe that a method would be checked
221
377
  # even if runtime checks have not been enabled on the class or globally.
@@ -276,10 +432,10 @@ RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), Str
276
432
  #
277
433
  # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#36
278
434
  class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Base
279
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#46
435
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#47
280
436
  def on_csend(node); end
281
437
 
282
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#46
438
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#47
283
439
  def on_send(node); end
284
440
  end
285
441
 
@@ -307,7 +463,7 @@ class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base
307
463
  include ::RuboCop::Cop::Sorbet::SignatureHelp
308
464
  extend ::RuboCop::Cop::AutoCorrector
309
465
 
310
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#34
466
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#33
311
467
  def on_signature(sig); end
312
468
 
313
469
  # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#25
@@ -315,10 +471,15 @@ class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base
315
471
 
316
472
  private
317
473
 
318
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#57
474
+ # @return [Boolean]
475
+ #
476
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#62
477
+ def contains_only_rubocop_directives?(range); end
478
+
479
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#66
319
480
  def lines_between(node1, node2, buffer: T.unsafe(nil)); end
320
481
 
321
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#53
482
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#58
322
483
  def next_sibling(node); end
323
484
  end
324
485
 
@@ -403,93 +564,233 @@ RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil),
403
564
  #
404
565
  # * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped')
405
566
  # * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped')
567
+ # * `Style`: signature style to enforce - 'sig' for sig blocks, 'rbs' for RBS comments, 'both' to allow either (default: 'sig')
406
568
  #
407
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#27
569
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#26
408
570
  class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Base
409
571
  include ::RuboCop::Cop::Sorbet::SignatureHelp
410
572
  extend ::RuboCop::Cop::AutoCorrector
411
573
 
412
- # @return [EnforceSignatures] a new instance of EnforceSignatures
413
- #
414
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#31
415
- def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
416
-
417
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#37
574
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#33
418
575
  def accessor?(param0 = T.unsafe(nil)); end
419
576
 
420
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#41
577
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#37
421
578
  def on_def(node); end
422
579
 
423
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#45
580
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#41
424
581
  def on_defs(node); end
425
582
 
426
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#49
583
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#53
584
+ def on_new_investigation; end
585
+
586
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#45
427
587
  def on_send(node); end
428
588
 
429
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#53
589
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#49
430
590
  def on_signature(node); end
431
591
 
432
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#57
592
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#59
433
593
  def scope(node); end
434
594
 
435
595
  private
436
596
 
437
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#79
438
- def autocorrect(corrector, node); end
597
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#154
598
+ def add_accessor_parameter_if_needed(suggest, symbol, method); end
599
+
600
+ # @return [Boolean]
601
+ #
602
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#176
603
+ def allow_rbs?; end
439
604
 
440
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#66
605
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#113
606
+ def autocorrect_with_signature_type(corrector, node, type); end
607
+
608
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#68
441
609
  def check_node(node); end
442
610
 
443
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#96
611
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#119
612
+ def create_signature_suggestion(node, type); end
613
+
614
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#168
444
615
  def param_type_placeholder; end
445
616
 
446
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#100
617
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#146
618
+ def populate_accessor_suggestion(suggest, node); end
619
+
620
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#136
621
+ def populate_method_definition_suggestion(suggest, node); end
622
+
623
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#128
624
+ def populate_signature_suggestion(suggest, node); end
625
+
626
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#109
627
+ def rbs_checker; end
628
+
629
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#172
447
630
  def return_type_placeholder; end
631
+
632
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#160
633
+ def set_void_return_for_writer(suggest, method); end
634
+
635
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
636
+ def sig_checker; end
637
+
638
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#180
639
+ def signature_style; end
640
+
641
+ # @return [Boolean]
642
+ #
643
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#164
644
+ def writer_or_accessor?(method); end
645
+ end
646
+
647
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#209
648
+ class RuboCop::Cop::Sorbet::EnforceSignatures::RBSSignatureChecker < ::RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker
649
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#212
650
+ def signature_node(node); end
651
+
652
+ private
653
+
654
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#225
655
+ def find_non_send_ancestor(node); end
656
+ end
657
+
658
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#210
659
+ RuboCop::Cop::Sorbet::EnforceSignatures::RBSSignatureChecker::RBS_COMMENT_REGEX = T.let(T.unsafe(nil), Regexp)
660
+
661
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#285
662
+ class RuboCop::Cop::Sorbet::EnforceSignatures::RBSSuggestion
663
+ # @return [RBSSuggestion] a new instance of RBSSuggestion
664
+ #
665
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#288
666
+ def initialize(indent); end
667
+
668
+ # Returns the value of attribute has_block.
669
+ #
670
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#286
671
+ def has_block; end
672
+
673
+ # Sets the attribute has_block
674
+ #
675
+ # @param value the value to set the attribute has_block to.
676
+ #
677
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#286
678
+ def has_block=(_arg0); end
679
+
680
+ # Returns the value of attribute params.
681
+ #
682
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#286
683
+ def params; end
684
+
685
+ # Sets the attribute params
686
+ #
687
+ # @param value the value to set the attribute params to.
688
+ #
689
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#286
690
+ def params=(_arg0); end
691
+
692
+ # Returns the value of attribute returns.
693
+ #
694
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#286
695
+ def returns; end
696
+
697
+ # Sets the attribute returns
698
+ #
699
+ # @param value the value to set the attribute returns to.
700
+ #
701
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#286
702
+ def returns=(_arg0); end
703
+
704
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#295
705
+ def to_autocorrect; end
706
+
707
+ private
708
+
709
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#301
710
+ def generate_signature; end
448
711
  end
449
712
 
450
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104
713
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#231
714
+ class RuboCop::Cop::Sorbet::EnforceSignatures::SigSignatureChecker < ::RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker
715
+ # @return [SigSignatureChecker] a new instance of SigSignatureChecker
716
+ #
717
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#232
718
+ def initialize(processed_source); end
719
+
720
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#245
721
+ def clear_signature(scope); end
722
+
723
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#241
724
+ def on_signature(node, scope); end
725
+
726
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#237
727
+ def signature_node(scope); end
728
+ end
729
+
730
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#250
451
731
  class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion
452
732
  # @return [SigSuggestion] a new instance of SigSuggestion
453
733
  #
454
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#107
734
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#253
455
735
  def initialize(indent, param_placeholder, return_placeholder); end
456
736
 
457
737
  # Returns the value of attribute params.
458
738
  #
459
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
739
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#251
460
740
  def params; end
461
741
 
462
742
  # Sets the attribute params
463
743
  #
464
744
  # @param value the value to set the attribute params to.
465
745
  #
466
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
746
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#251
467
747
  def params=(_arg0); end
468
748
 
469
749
  # Returns the value of attribute returns.
470
750
  #
471
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
751
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#251
472
752
  def returns; end
473
753
 
474
754
  # Sets the attribute returns
475
755
  #
476
756
  # @param value the value to set the attribute returns to.
477
757
  #
478
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
758
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#251
479
759
  def returns=(_arg0); end
480
760
 
481
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#115
761
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#261
482
762
  def to_autocorrect; end
483
763
 
484
764
  private
485
765
 
486
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#127
766
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#267
487
767
  def generate_params; end
488
768
 
489
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#139
769
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#274
490
770
  def generate_return; end
491
771
  end
492
772
 
773
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#195
774
+ class RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker
775
+ # @return [SignatureChecker] a new instance of SignatureChecker
776
+ #
777
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#196
778
+ def initialize(processed_source); end
779
+
780
+ protected
781
+
782
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#204
783
+ def preceding_comments(node); end
784
+
785
+ # Returns the value of attribute processed_source.
786
+ #
787
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#202
788
+ def processed_source; end
789
+ end
790
+
791
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#30
792
+ RuboCop::Cop::Sorbet::EnforceSignatures::VALID_STYLES = T.let(T.unsafe(nil), Array)
793
+
493
794
  # Checks that there is only one Sorbet sigil in a given file
494
795
  #
495
796
  # For example, the following class with two sigils
@@ -656,6 +957,52 @@ RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), Stri
656
957
  # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#33
657
958
  RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
658
959
 
960
+ # Check that code does not call `mixes_in_class_methods` from Sorbet `T::Helpers`.
961
+ #
962
+ # Good:
963
+ #
964
+ # ```
965
+ # module M
966
+ # extend ActiveSupport::Concern
967
+ #
968
+ # class_methods do
969
+ # ...
970
+ # end
971
+ # end
972
+ # ```
973
+ #
974
+ # Bad:
975
+ #
976
+ # ```
977
+ # module M
978
+ # extend T::Helpers
979
+ #
980
+ # module ClassMethods
981
+ # ...
982
+ # end
983
+ #
984
+ # mixes_in_class_methods(ClassMethods)
985
+ # end
986
+ # ```
987
+ #
988
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb#33
989
+ class RuboCop::Cop::Sorbet::ForbidMixesInClassMethods < ::RuboCop::Cop::Base
990
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb#38
991
+ def mixes_in_class_methods?(param0 = T.unsafe(nil)); end
992
+
993
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb#42
994
+ def on_csend(node); end
995
+
996
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb#42
997
+ def on_send(node); end
998
+ end
999
+
1000
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb#34
1001
+ RuboCop::Cop::Sorbet::ForbidMixesInClassMethods::MSG = T.let(T.unsafe(nil), String)
1002
+
1003
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb#35
1004
+ RuboCop::Cop::Sorbet::ForbidMixesInClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1005
+
659
1006
  # Makes sure that RBI files are always located under the defined allowed paths.
660
1007
  #
661
1008
  # Options:
@@ -685,6 +1032,88 @@ class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Bas
685
1032
  def allowed_paths; end
686
1033
  end
687
1034
 
1035
+ # Check that definitions do not use a `sig` block.
1036
+ #
1037
+ # Good:
1038
+ #
1039
+ # ```
1040
+ # #: -> void
1041
+ # def foo; end
1042
+ # ```
1043
+ #
1044
+ # Bad:
1045
+ #
1046
+ # ```
1047
+ # sig { void }
1048
+ # def foo; end
1049
+ # ```
1050
+ #
1051
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig.rb#23
1052
+ class RuboCop::Cop::Sorbet::ForbidSig < ::RuboCop::Cop::Base
1053
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
1054
+
1055
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig.rb#28
1056
+ def on_signature(node); end
1057
+ end
1058
+
1059
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig.rb#26
1060
+ RuboCop::Cop::Sorbet::ForbidSig::MSG = T.let(T.unsafe(nil), String)
1061
+
1062
+ # Check that definitions do not use a `sig` block.
1063
+ #
1064
+ # Good:
1065
+ #
1066
+ # ```
1067
+ # #: -> void
1068
+ # def foo; end
1069
+ # ```
1070
+ #
1071
+ # Bad:
1072
+ #
1073
+ # ```
1074
+ # T::Sig.sig { void }
1075
+ # def foo; end
1076
+ # ```
1077
+ #
1078
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb#23
1079
+ class RuboCop::Cop::Sorbet::ForbidSigWithRuntime < ::RuboCop::Cop::Base
1080
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
1081
+
1082
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb#28
1083
+ def on_signature(node); end
1084
+ end
1085
+
1086
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb#26
1087
+ RuboCop::Cop::Sorbet::ForbidSigWithRuntime::MSG = T.let(T.unsafe(nil), String)
1088
+
1089
+ # Check that `sig` is used instead of `T::Sig::WithoutRuntime.sig`.
1090
+ #
1091
+ # Good:
1092
+ #
1093
+ # ```
1094
+ # sig { void }
1095
+ # def foo; end
1096
+ # ```
1097
+ #
1098
+ # Bad:
1099
+ #
1100
+ # ```
1101
+ # T::Sig::WithoutRuntime.sig { void }
1102
+ # def foo; end
1103
+ # ```
1104
+ #
1105
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb#23
1106
+ class RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime < ::RuboCop::Cop::Base
1107
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
1108
+ extend ::RuboCop::Cop::AutoCorrector
1109
+
1110
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb#29
1111
+ def on_signature(node); end
1112
+ end
1113
+
1114
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb#27
1115
+ RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime::MSG = T.let(T.unsafe(nil), String)
1116
+
688
1117
  # Correct superclass `send` expressions by constant literals.
689
1118
  #
690
1119
  # Sorbet, the static checker, is not (yet) able to support constructs on the
@@ -716,6 +1145,177 @@ end
716
1145
  # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#29
717
1146
  RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String)
718
1147
 
1148
+ # Disallows using `T.absurd` anywhere.
1149
+ #
1150
+ # @example
1151
+ #
1152
+ # # bad
1153
+ # T.absurd(foo)
1154
+ #
1155
+ # # good
1156
+ # x #: absurd
1157
+ #
1158
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_absurd.rb#17
1159
+ class RuboCop::Cop::Sorbet::ForbidTAbsurd < ::RuboCop::Cop::Base
1160
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_absurd.rb#24
1161
+ def on_csend(node); end
1162
+
1163
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_absurd.rb#24
1164
+ def on_send(node); end
1165
+
1166
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_absurd.rb#22
1167
+ def t_absurd?(param0 = T.unsafe(nil)); end
1168
+ end
1169
+
1170
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_absurd.rb#18
1171
+ RuboCop::Cop::Sorbet::ForbidTAbsurd::MSG = T.let(T.unsafe(nil), String)
1172
+
1173
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_absurd.rb#19
1174
+ RuboCop::Cop::Sorbet::ForbidTAbsurd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1175
+
1176
+ # Disallows using `T.bind` anywhere.
1177
+ #
1178
+ # @example
1179
+ #
1180
+ # # bad
1181
+ # T.bind(self, Integer)
1182
+ #
1183
+ # # good
1184
+ # #: self as Integer
1185
+ #
1186
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_bind.rb#17
1187
+ class RuboCop::Cop::Sorbet::ForbidTBind < ::RuboCop::Cop::Base
1188
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_bind.rb#24
1189
+ def on_csend(node); end
1190
+
1191
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_bind.rb#24
1192
+ def on_send(node); end
1193
+
1194
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_bind.rb#22
1195
+ def t_bind?(param0 = T.unsafe(nil)); end
1196
+ end
1197
+
1198
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_bind.rb#18
1199
+ RuboCop::Cop::Sorbet::ForbidTBind::MSG = T.let(T.unsafe(nil), String)
1200
+
1201
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_bind.rb#19
1202
+ RuboCop::Cop::Sorbet::ForbidTBind::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1203
+
1204
+ # Disallows using `T.cast` anywhere.
1205
+ #
1206
+ # @example
1207
+ #
1208
+ # # bad
1209
+ # T.cast(foo, Integer)
1210
+ #
1211
+ # # good
1212
+ # foo #: as Integer
1213
+ #
1214
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_cast.rb#17
1215
+ class RuboCop::Cop::Sorbet::ForbidTCast < ::RuboCop::Cop::Base
1216
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_cast.rb#24
1217
+ def on_csend(node); end
1218
+
1219
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_cast.rb#24
1220
+ def on_send(node); end
1221
+
1222
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_cast.rb#22
1223
+ def t_cast?(param0 = T.unsafe(nil)); end
1224
+ end
1225
+
1226
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_cast.rb#18
1227
+ RuboCop::Cop::Sorbet::ForbidTCast::MSG = T.let(T.unsafe(nil), String)
1228
+
1229
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_cast.rb#19
1230
+ RuboCop::Cop::Sorbet::ForbidTCast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1231
+
1232
+ # Disallow using `T::Enum`.
1233
+ #
1234
+ # @example
1235
+ #
1236
+ # # bad
1237
+ # class MyEnum < T::Enum
1238
+ # enums do
1239
+ # A = new
1240
+ # B = new
1241
+ # end
1242
+ # end
1243
+ #
1244
+ # # good
1245
+ # class MyEnum
1246
+ # A = "a"
1247
+ # B = "b"
1248
+ # C = "c"
1249
+ # end
1250
+ #
1251
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#26
1252
+ class RuboCop::Cop::Sorbet::ForbidTEnum < ::RuboCop::Cop::Base
1253
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#34
1254
+ def on_class(node); end
1255
+
1256
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#30
1257
+ def t_enum?(param0 = T.unsafe(nil)); end
1258
+ end
1259
+
1260
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#27
1261
+ RuboCop::Cop::Sorbet::ForbidTEnum::MSG = T.let(T.unsafe(nil), String)
1262
+
1263
+ # Disallows using `T.let` anywhere.
1264
+ #
1265
+ # @example
1266
+ #
1267
+ # # bad
1268
+ # T.let(foo, Integer)
1269
+ #
1270
+ # # good
1271
+ # foo #: Integer
1272
+ #
1273
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_let.rb#17
1274
+ class RuboCop::Cop::Sorbet::ForbidTLet < ::RuboCop::Cop::Base
1275
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_let.rb#24
1276
+ def on_csend(node); end
1277
+
1278
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_let.rb#24
1279
+ def on_send(node); end
1280
+
1281
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_let.rb#22
1282
+ def t_let?(param0 = T.unsafe(nil)); end
1283
+ end
1284
+
1285
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_let.rb#18
1286
+ RuboCop::Cop::Sorbet::ForbidTLet::MSG = T.let(T.unsafe(nil), String)
1287
+
1288
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_let.rb#19
1289
+ RuboCop::Cop::Sorbet::ForbidTLet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1290
+
1291
+ # Disallows using `T.must` anywhere.
1292
+ #
1293
+ # @example
1294
+ #
1295
+ # # bad
1296
+ # T.must(foo)
1297
+ #
1298
+ # # good
1299
+ # foo #: as !nil
1300
+ #
1301
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_must.rb#17
1302
+ class RuboCop::Cop::Sorbet::ForbidTMust < ::RuboCop::Cop::Base
1303
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_must.rb#24
1304
+ def on_csend(node); end
1305
+
1306
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_must.rb#24
1307
+ def on_send(node); end
1308
+
1309
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_must.rb#22
1310
+ def t_must?(param0 = T.unsafe(nil)); end
1311
+ end
1312
+
1313
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_must.rb#18
1314
+ RuboCop::Cop::Sorbet::ForbidTMust::MSG = T.let(T.unsafe(nil), String)
1315
+
1316
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_must.rb#19
1317
+ RuboCop::Cop::Sorbet::ForbidTMust::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1318
+
719
1319
  # Disallow using `T::Struct` and `T::Props`.
720
1320
  #
721
1321
  # @example
@@ -875,6 +1475,31 @@ class RuboCop::Cop::Sorbet::ForbidTStruct::TStructWalker
875
1475
  def t_struct_prop?(param0 = T.unsafe(nil)); end
876
1476
  end
877
1477
 
1478
+ # Disallows using `T.type_alias` anywhere.
1479
+ #
1480
+ # @example
1481
+ #
1482
+ # # bad
1483
+ # STRING_OR_INTEGER = T.type_alias { T.any(Integer, String) }
1484
+ #
1485
+ # # good
1486
+ # #: type string_or_integer = Integer | String
1487
+ #
1488
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_type_alias.rb#17
1489
+ class RuboCop::Cop::Sorbet::ForbidTTypeAlias < ::RuboCop::Cop::Base
1490
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_type_alias.rb#23
1491
+ def on_block(node); end
1492
+
1493
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_type_alias.rb#23
1494
+ def on_numblock(node); end
1495
+
1496
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_type_alias.rb#21
1497
+ def t_type_alias?(param0 = T.unsafe(nil)); end
1498
+ end
1499
+
1500
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_type_alias.rb#18
1501
+ RuboCop::Cop::Sorbet::ForbidTTypeAlias::MSG = T.let(T.unsafe(nil), String)
1502
+
878
1503
  # Disallows using `T.unsafe` anywhere.
879
1504
  #
880
1505
  # @example
@@ -887,6 +1512,9 @@ end
887
1512
  #
888
1513
  # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#17
889
1514
  class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Base
1515
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#24
1516
+ def on_csend(node); end
1517
+
890
1518
  # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#24
891
1519
  def on_send(node); end
892
1520
 
@@ -1028,13 +1656,14 @@ RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsaf
1028
1656
  # * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false')
1029
1657
  # * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one
1030
1658
  #
1659
+ # If a `SuggestedStrictness` level is specified, it will be used in autocorrect.
1031
1660
  # If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect.
1032
1661
  #
1033
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#17
1662
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#18
1034
1663
  class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil
1035
1664
  # @return [Boolean]
1036
1665
  #
1037
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#18
1666
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#19
1038
1667
  def require_sigil_on_all_files?; end
1039
1668
  end
1040
1669
 
@@ -1297,6 +1926,38 @@ RuboCop::Cop::Sorbet::Refinement::MSG = T.let(T.unsafe(nil), String)
1297
1926
  # source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#36
1298
1927
  RuboCop::Cop::Sorbet::Refinement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1299
1928
 
1929
+ # Suggests using `grep` over `select` when using it only for type narrowing.
1930
+ #
1931
+ # @example
1932
+ #
1933
+ # # bad
1934
+ # strings_or_integers.select { |e| e.is_a?(String) }
1935
+ # strings_or_integers.filter { |e| e.is_a?(String) }
1936
+ # strings_or_integers.select { |e| e.kind_of?(String) }
1937
+ #
1938
+ # # good
1939
+ # strings_or_integers.grep(String)
1940
+ #
1941
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/select_by_is_a.rb#19
1942
+ class RuboCop::Cop::Sorbet::SelectByIsA < ::RuboCop::Cop::Base
1943
+ extend ::RuboCop::Cop::AutoCorrector
1944
+
1945
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/select_by_is_a.rb#43
1946
+ def on_csend(node); end
1947
+
1948
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/select_by_is_a.rb#43
1949
+ def on_send(node); end
1950
+
1951
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/select_by_is_a.rb#26
1952
+ def type_narrowing_select?(param0 = T.unsafe(nil)); end
1953
+ end
1954
+
1955
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/select_by_is_a.rb#22
1956
+ RuboCop::Cop::Sorbet::SelectByIsA::MSG = T.let(T.unsafe(nil), String)
1957
+
1958
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/select_by_is_a.rb#23
1959
+ RuboCop::Cop::Sorbet::SelectByIsA::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1960
+
1300
1961
  # Checks for the correct order of `sig` builder methods.
1301
1962
  #
1302
1963
  # Options:
@@ -1347,23 +2008,26 @@ end
1347
2008
  module RuboCop::Cop::Sorbet::SignatureHelp
1348
2009
  extend ::RuboCop::AST::NodePattern::Macros
1349
2010
 
1350
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#29
2011
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#16
2012
+ def bare_sig?(param0 = T.unsafe(nil)); end
2013
+
2014
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#42
1351
2015
  def on_block(node); end
1352
2016
 
1353
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#29
2017
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#42
1354
2018
  def on_numblock(node); end
1355
2019
 
1356
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#35
2020
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#48
1357
2021
  def on_signature(_node); end
1358
2022
 
1359
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#11
1360
- def signature?(param0 = T.unsafe(nil)); end
2023
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#25
2024
+ def sig_with_runtime?(param0 = T.unsafe(nil)); end
1361
2025
 
1362
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#20
1363
- def with_runtime?(param0 = T.unsafe(nil)); end
2026
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#34
2027
+ def sig_without_runtime?(param0 = T.unsafe(nil)); end
1364
2028
 
1365
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#25
1366
- def without_runtime?(param0 = T.unsafe(nil)); end
2029
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#11
2030
+ def signature?(param0 = T.unsafe(nil)); end
1367
2031
  end
1368
2032
 
1369
2033
  # Ensures empty class/module definitions in RBI files are
@@ -1399,9 +2063,20 @@ RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(
1399
2063
 
1400
2064
  # Makes the Sorbet `strict` sigil mandatory in all files.
1401
2065
  #
1402
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#10
2066
+ # @example
2067
+ #
2068
+ # # bad
2069
+ # # typed: true
2070
+ #
2071
+ # # bad
2072
+ # # typed: false
2073
+ #
2074
+ # # good
2075
+ # # typed: strict
2076
+ #
2077
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#25
1403
2078
  class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil
1404
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#11
2079
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#26
1405
2080
  def minimum_strictness; end
1406
2081
  end
1407
2082
 
@@ -1557,72 +2232,79 @@ RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsa
1557
2232
  # * `ExactStrictness`: If set, make offense if the strictness level in the file is different than this one
1558
2233
  #
1559
2234
  # If an `ExactStrictness` level is specified, it will be used in offense messages and autocorrect.
2235
+ # If a `SuggestedStrictness` level is specified, it will be used in autocorrect.
1560
2236
  # Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect.
1561
2237
  #
1562
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#20
2238
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#21
1563
2239
  class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base
1564
2240
  extend ::RuboCop::Cop::AutoCorrector
1565
2241
 
1566
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#23
2242
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#24
1567
2243
  def on_new_investigation; end
1568
2244
 
1569
2245
  protected
1570
2246
 
1571
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#150
2247
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#169
1572
2248
  def autocorrect(corrector); end
1573
2249
 
2250
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#110
2251
+ def check_double_commented_sigil(sigil, strictness); end
2252
+
1574
2253
  # checks
1575
2254
  #
1576
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#55
2255
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#59
1577
2256
  def check_sigil_present(sigil); end
1578
2257
 
1579
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#118
2258
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#137
1580
2259
  def check_strictness_level(sigil, strictness); end
1581
2260
 
1582
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#94
2261
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#98
1583
2262
  def check_strictness_not_empty(sigil, strictness); end
1584
2263
 
1585
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#106
2264
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#125
1586
2265
  def check_strictness_valid(sigil, strictness); end
1587
2266
 
1588
2267
  # Default is `nil`
1589
2268
  #
1590
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#184
2269
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#203
1591
2270
  def exact_strictness; end
1592
2271
 
1593
2272
  # extraction
1594
2273
  #
1595
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#43
2274
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#47
1596
2275
  def extract_sigil(processed_source); end
1597
2276
 
1598
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#49
2277
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#53
1599
2278
  def extract_strictness(sigil); end
1600
2279
 
1601
2280
  # Default is `nil`
1602
2281
  #
1603
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#178
2282
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#197
1604
2283
  def minimum_strictness; end
1605
2284
 
1606
2285
  # Default is `false`
1607
2286
  #
1608
2287
  # @return [Boolean]
1609
2288
  #
1610
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#167
2289
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#186
1611
2290
  def require_sigil_on_all_files?; end
1612
2291
 
1613
2292
  # Default is `'false'`
1614
2293
  #
1615
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#172
2294
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#191
1616
2295
  def suggested_strictness; end
1617
2296
 
1618
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#72
2297
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#76
1619
2298
  def suggested_strictness_level; end
1620
2299
  end
1621
2300
 
1622
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#39
2301
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#43
2302
+ RuboCop::Cop::Sorbet::ValidSigil::INVALID_SIGIL_MSG = T.let(T.unsafe(nil), String)
2303
+
2304
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#42
1623
2305
  RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp)
1624
2306
 
1625
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#38
2307
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#41
1626
2308
  RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array)
1627
2309
 
1628
2310
  # Disallows the usage of `.void.checked(:tests)`.
@@ -1681,28 +2363,24 @@ end
1681
2363
  # source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#4
1682
2364
  module RuboCop::Sorbet; end
1683
2365
 
1684
- # source://rubocop-sorbet//lib/rubocop/sorbet.rb#12
1685
- RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash)
1686
-
1687
2366
  # source://rubocop-sorbet//lib/rubocop/sorbet.rb#11
1688
- RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname)
1689
-
1690
- # source://rubocop-sorbet//lib/rubocop/sorbet.rb#8
1691
2367
  class RuboCop::Sorbet::Error < ::StandardError; end
1692
2368
 
1693
- # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
1694
- # bit of our configuration.
2369
+ # A plugin that integrates RuboCop Sorbet with RuboCop's plugin system.
1695
2370
  #
1696
- # source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#9
1697
- module RuboCop::Sorbet::Inject
1698
- class << self
1699
- # source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#11
1700
- def defaults!; end
1701
- end
1702
- end
2371
+ # source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#15
2372
+ class RuboCop::Sorbet::Plugin < ::LintRoller::Plugin
2373
+ # source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#16
2374
+ def about; end
2375
+
2376
+ # source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#29
2377
+ def rules(_context); end
1703
2378
 
1704
- # source://rubocop-sorbet//lib/rubocop/sorbet.rb#10
1705
- RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname)
2379
+ # @return [Boolean]
2380
+ #
2381
+ # source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#25
2382
+ def supported?(context); end
2383
+ end
1706
2384
 
1707
2385
  # source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#5
1708
2386
  RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String)