lunchmoney 1.4.0 → 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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/build_and_publish_yard_docs.yml +4 -4
- data/.github/workflows/ci.yml +9 -10
- data/.github/workflows/rbi-updater.yml +1 -1
- data/.github/workflows/release_pipeline.yml +1 -1
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/.simplecov +1 -0
- data/.toys/.toys.rb +8 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +102 -78
- data/README.md +0 -2
- data/SECURITY.md +151 -0
- data/bin/check_vcr_version +94 -0
- data/lib/lunchmoney/api.rb +26 -38
- data/lib/lunchmoney/calls/assets.rb +10 -13
- data/lib/lunchmoney/calls/base.rb +59 -7
- data/lib/lunchmoney/calls/budgets.rb +22 -25
- data/lib/lunchmoney/calls/categories.rb +28 -38
- data/lib/lunchmoney/calls/crypto.rb +7 -9
- data/lib/lunchmoney/calls/plaid_accounts.rb +7 -9
- data/lib/lunchmoney/calls/recurring_expenses.rb +4 -5
- data/lib/lunchmoney/calls/tags.rb +3 -4
- data/lib/lunchmoney/calls/transactions.rb +28 -37
- data/lib/lunchmoney/calls/users.rb +3 -4
- data/lib/lunchmoney/configuration.rb +20 -0
- data/lib/lunchmoney/deprecate.rb +35 -0
- data/lib/lunchmoney/objects/asset.rb +6 -1
- data/lib/lunchmoney/objects/object.rb +4 -9
- data/lib/lunchmoney/objects/plaid_account.rb +6 -1
- data/lib/lunchmoney/validators.rb +8 -6
- data/lib/lunchmoney/version.rb +1 -1
- data/lib/lunchmoney.rb +3 -3
- data/lunchmoney.gemspec +1 -1
- data/sorbet/rbi/annotations/activesupport.rbi +40 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -2
- data/sorbet/rbi/gems/{activesupport@7.2.1.rbi → activesupport@8.0.2.1.rbi} +1431 -1028
- data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +4 -3
- data/sorbet/rbi/gems/{base64@0.2.0.rbi → base64@0.3.0.rbi} +76 -39
- data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
- data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +275 -0
- data/sorbet/rbi/gems/{concurrent-ruby@1.3.4.rbi → concurrent-ruby@1.3.5.rbi} +44 -32
- data/sorbet/rbi/gems/{connection_pool@2.4.1.rbi → connection_pool@2.5.3.rbi} +1 -0
- data/sorbet/rbi/gems/{dotenv@3.1.2.rbi → dotenv@3.1.8.rbi} +21 -29
- data/sorbet/rbi/gems/{drb@2.2.1.rbi → drb@2.2.3.rbi} +503 -188
- data/sorbet/rbi/gems/{erubi@1.13.0.rbi → erubi@1.13.1.rbi} +14 -9
- data/sorbet/rbi/gems/{faraday-net_http@3.1.1.rbi → faraday-net_http@3.4.1.rbi} +34 -34
- data/sorbet/rbi/gems/{faraday@2.10.1.rbi → faraday@2.13.4.rbi} +507 -171
- data/sorbet/rbi/gems/{hashdiff@1.1.1.rbi → hashdiff@1.2.0.rbi} +5 -3
- data/sorbet/rbi/gems/{i18n@1.14.5.rbi → i18n@1.14.7.rbi} +80 -80
- data/sorbet/rbi/gems/{json@2.7.2.rbi → json@2.13.2.rbi} +988 -226
- data/sorbet/rbi/gems/{kramdown@2.4.0.rbi → kramdown@2.5.1.rbi} +316 -234
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
- data/sorbet/rbi/gems/{logger@1.6.0.rbi → logger@1.7.0.rbi} +136 -76
- data/sorbet/rbi/gems/{minitest@5.25.1.rbi → minitest@5.25.5.rbi} +227 -220
- data/sorbet/rbi/gems/{mocha@2.4.5.rbi → mocha@2.7.1.rbi} +154 -118
- data/sorbet/rbi/gems/{net-http@0.4.1.rbi → net-http@0.6.0.rbi} +360 -181
- data/sorbet/rbi/gems/{parser@3.3.4.2.rbi → parser@3.3.9.0.rbi} +326 -308
- data/sorbet/rbi/gems/{prism@0.30.0.rbi → prism@1.4.0.rbi} +12440 -9920
- data/sorbet/rbi/gems/{rack@3.1.7.rbi → rack@3.2.1.rbi} +752 -579
- data/sorbet/rbi/gems/{rake@13.2.1.rbi → rake@13.3.0.rbi} +238 -227
- data/sorbet/rbi/gems/rbi@0.3.6.rbi +5162 -0
- data/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi +7895 -0
- data/sorbet/rbi/gems/{regexp_parser@2.9.2.rbi → regexp_parser@2.11.2.rbi} +1124 -1013
- data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
- data/sorbet/rbi/gems/{rexml@3.3.6.rbi → rexml@3.4.2.rbi} +755 -318
- data/sorbet/rbi/gems/{rubocop-ast@1.32.1.rbi → rubocop-ast@1.46.0.rbi} +1287 -899
- data/sorbet/rbi/gems/{rubocop-minitest@0.35.1.rbi → rubocop-minitest@0.38.2.rbi} +133 -97
- data/sorbet/rbi/gems/{rubocop-rails@2.26.0.rbi → rubocop-rails@2.33.3.rbi} +9874 -6597
- data/sorbet/rbi/gems/{rubocop-shopify@2.15.1.rbi → rubocop-shopify@2.17.1.rbi} +1 -0
- data/sorbet/rbi/gems/{rubocop-sorbet@0.8.5.rbi → rubocop-sorbet@0.10.5.rbi} +804 -83
- data/sorbet/rbi/gems/{rubocop@1.65.1.rbi → rubocop@1.80.1.rbi} +10688 -5103
- data/sorbet/rbi/gems/{securerandom@0.3.1.rbi → securerandom@0.4.1.rbi} +7 -5
- data/sorbet/rbi/gems/{spoom@1.4.2.rbi → spoom@1.7.6.rbi} +1939 -1039
- data/sorbet/rbi/gems/{tapioca@0.16.1.rbi → tapioca@0.17.7.rbi} +765 -821
- data/sorbet/rbi/gems/{thor@1.3.1.rbi → thor@1.4.0.rbi} +139 -91
- data/sorbet/rbi/gems/unicode-display_width@3.1.5.rbi +132 -0
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
- data/sorbet/rbi/gems/{uri@0.13.0.rbi → uri@1.0.3.rbi} +278 -256
- data/sorbet/rbi/gems/{vcr@6.3.1.rbi → vcr@6.3.1-ce35c236fe48899f02ddf780973b44cdb756c0ee.rbi} +140 -123
- data/sorbet/rbi/gems/{webmock@3.23.1.rbi → webmock@3.25.1.rbi} +101 -78
- data/sorbet/rbi/gems/{yard@0.9.36.rbi → yard@0.9.37.rbi} +394 -235
- metadata +55 -53
- data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +0 -78
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14237
- data/sorbet/rbi/gems/rbi@0.1.14.rbi +0 -3305
- data/sorbet/rbi/gems/strscan@3.1.0.rbi +0 -9
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -65
- /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#
|
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#
|
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#
|
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#
|
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#
|
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#
|
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,7 +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#
|
435
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#47
|
436
|
+
def on_csend(node); end
|
437
|
+
|
438
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#47
|
280
439
|
def on_send(node); end
|
281
440
|
end
|
282
441
|
|
@@ -304,7 +463,7 @@ class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base
|
|
304
463
|
include ::RuboCop::Cop::Sorbet::SignatureHelp
|
305
464
|
extend ::RuboCop::Cop::AutoCorrector
|
306
465
|
|
307
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#
|
466
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#33
|
308
467
|
def on_signature(sig); end
|
309
468
|
|
310
469
|
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#25
|
@@ -312,10 +471,15 @@ class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base
|
|
312
471
|
|
313
472
|
private
|
314
473
|
|
315
|
-
#
|
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
|
316
480
|
def lines_between(node1, node2, buffer: T.unsafe(nil)); end
|
317
481
|
|
318
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#
|
482
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#58
|
319
483
|
def next_sibling(node); end
|
320
484
|
end
|
321
485
|
|
@@ -400,93 +564,233 @@ RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil),
|
|
400
564
|
#
|
401
565
|
# * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped')
|
402
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')
|
403
568
|
#
|
404
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
569
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#26
|
405
570
|
class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Base
|
406
571
|
include ::RuboCop::Cop::Sorbet::SignatureHelp
|
407
572
|
extend ::RuboCop::Cop::AutoCorrector
|
408
573
|
|
409
|
-
#
|
410
|
-
#
|
411
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#31
|
412
|
-
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
|
413
|
-
|
414
|
-
# 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
|
415
575
|
def accessor?(param0 = T.unsafe(nil)); end
|
416
576
|
|
417
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
577
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#37
|
418
578
|
def on_def(node); end
|
419
579
|
|
420
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
580
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#41
|
421
581
|
def on_defs(node); end
|
422
582
|
|
423
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
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
|
424
587
|
def on_send(node); end
|
425
588
|
|
426
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
589
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#49
|
427
590
|
def on_signature(node); end
|
428
591
|
|
429
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
592
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#59
|
430
593
|
def scope(node); end
|
431
594
|
|
432
595
|
private
|
433
596
|
|
434
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
435
|
-
def
|
597
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#154
|
598
|
+
def add_accessor_parameter_if_needed(suggest, symbol, method); end
|
436
599
|
|
437
|
-
#
|
600
|
+
# @return [Boolean]
|
601
|
+
#
|
602
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#176
|
603
|
+
def allow_rbs?; end
|
604
|
+
|
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
|
438
609
|
def check_node(node); end
|
439
610
|
|
440
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
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
|
441
615
|
def param_type_placeholder; end
|
442
616
|
|
443
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
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
|
444
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
|
445
656
|
end
|
446
657
|
|
447
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
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
|
711
|
+
end
|
712
|
+
|
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
|
448
731
|
class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion
|
449
732
|
# @return [SigSuggestion] a new instance of SigSuggestion
|
450
733
|
#
|
451
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
734
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#253
|
452
735
|
def initialize(indent, param_placeholder, return_placeholder); end
|
453
736
|
|
454
737
|
# Returns the value of attribute params.
|
455
738
|
#
|
456
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
739
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#251
|
457
740
|
def params; end
|
458
741
|
|
459
742
|
# Sets the attribute params
|
460
743
|
#
|
461
744
|
# @param value the value to set the attribute params to.
|
462
745
|
#
|
463
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
746
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#251
|
464
747
|
def params=(_arg0); end
|
465
748
|
|
466
749
|
# Returns the value of attribute returns.
|
467
750
|
#
|
468
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
751
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#251
|
469
752
|
def returns; end
|
470
753
|
|
471
754
|
# Sets the attribute returns
|
472
755
|
#
|
473
756
|
# @param value the value to set the attribute returns to.
|
474
757
|
#
|
475
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
758
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#251
|
476
759
|
def returns=(_arg0); end
|
477
760
|
|
478
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
761
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#261
|
479
762
|
def to_autocorrect; end
|
480
763
|
|
481
764
|
private
|
482
765
|
|
483
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
766
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#267
|
484
767
|
def generate_params; end
|
485
768
|
|
486
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#
|
769
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#274
|
487
770
|
def generate_return; end
|
488
771
|
end
|
489
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
|
+
|
490
794
|
# Checks that there is only one Sorbet sigil in a given file
|
491
795
|
#
|
492
796
|
# For example, the following class with two sigils
|
@@ -653,6 +957,52 @@ RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), Stri
|
|
653
957
|
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#33
|
654
958
|
RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
655
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
|
+
|
656
1006
|
# Makes sure that RBI files are always located under the defined allowed paths.
|
657
1007
|
#
|
658
1008
|
# Options:
|
@@ -678,10 +1028,92 @@ class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Bas
|
|
678
1028
|
|
679
1029
|
private
|
680
1030
|
|
681
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#
|
1031
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#48
|
682
1032
|
def allowed_paths; end
|
683
1033
|
end
|
684
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
|
+
|
685
1117
|
# Correct superclass `send` expressions by constant literals.
|
686
1118
|
#
|
687
1119
|
# Sorbet, the static checker, is not (yet) able to support constructs on the
|
@@ -713,6 +1145,177 @@ end
|
|
713
1145
|
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#29
|
714
1146
|
RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String)
|
715
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
|
+
|
716
1319
|
# Disallow using `T::Struct` and `T::Props`.
|
717
1320
|
#
|
718
1321
|
# @example
|
@@ -872,6 +1475,31 @@ class RuboCop::Cop::Sorbet::ForbidTStruct::TStructWalker
|
|
872
1475
|
def t_struct_prop?(param0 = T.unsafe(nil)); end
|
873
1476
|
end
|
874
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
|
+
|
875
1503
|
# Disallows using `T.unsafe` anywhere.
|
876
1504
|
#
|
877
1505
|
# @example
|
@@ -884,6 +1512,9 @@ end
|
|
884
1512
|
#
|
885
1513
|
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#17
|
886
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
|
+
|
887
1518
|
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#24
|
888
1519
|
def on_send(node); end
|
889
1520
|
|
@@ -1025,13 +1656,14 @@ RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsaf
|
|
1025
1656
|
# * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false')
|
1026
1657
|
# * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one
|
1027
1658
|
#
|
1659
|
+
# If a `SuggestedStrictness` level is specified, it will be used in autocorrect.
|
1028
1660
|
# If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect.
|
1029
1661
|
#
|
1030
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#
|
1662
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#18
|
1031
1663
|
class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil
|
1032
1664
|
# @return [Boolean]
|
1033
1665
|
#
|
1034
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#
|
1666
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#19
|
1035
1667
|
def require_sigil_on_all_files?; end
|
1036
1668
|
end
|
1037
1669
|
|
@@ -1254,6 +1886,78 @@ RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String)
|
|
1254
1886
|
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#33
|
1255
1887
|
RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
1256
1888
|
|
1889
|
+
# Checks for the use of Ruby Refinements library. Refinements add
|
1890
|
+
# complexity and incur a performance penalty that can be significant
|
1891
|
+
# for large code bases. Good examples are cases of unrelated
|
1892
|
+
# methods that happen to have the same name as these module methods.
|
1893
|
+
#
|
1894
|
+
# @example
|
1895
|
+
# # bad
|
1896
|
+
# module Foo
|
1897
|
+
# refine(Date) do
|
1898
|
+
# end
|
1899
|
+
# end
|
1900
|
+
#
|
1901
|
+
# # bad
|
1902
|
+
# module Foo
|
1903
|
+
# using(Date) do
|
1904
|
+
# end
|
1905
|
+
# end
|
1906
|
+
#
|
1907
|
+
# # good
|
1908
|
+
# module Foo
|
1909
|
+
# bar.refine(Date)
|
1910
|
+
# end
|
1911
|
+
#
|
1912
|
+
# # good
|
1913
|
+
# module Foo
|
1914
|
+
# bar.using(Date)
|
1915
|
+
# end
|
1916
|
+
#
|
1917
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#34
|
1918
|
+
class RuboCop::Cop::Sorbet::Refinement < ::RuboCop::Cop::Base
|
1919
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#38
|
1920
|
+
def on_send(node); end
|
1921
|
+
end
|
1922
|
+
|
1923
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#35
|
1924
|
+
RuboCop::Cop::Sorbet::Refinement::MSG = T.let(T.unsafe(nil), String)
|
1925
|
+
|
1926
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#36
|
1927
|
+
RuboCop::Cop::Sorbet::Refinement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
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
|
+
|
1257
1961
|
# Checks for the correct order of `sig` builder methods.
|
1258
1962
|
#
|
1259
1963
|
# Options:
|
@@ -1304,23 +2008,26 @@ end
|
|
1304
2008
|
module RuboCop::Cop::Sorbet::SignatureHelp
|
1305
2009
|
extend ::RuboCop::AST::NodePattern::Macros
|
1306
2010
|
|
1307
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#
|
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
|
1308
2015
|
def on_block(node); end
|
1309
2016
|
|
1310
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#
|
2017
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#42
|
1311
2018
|
def on_numblock(node); end
|
1312
2019
|
|
1313
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#
|
2020
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#48
|
1314
2021
|
def on_signature(_node); end
|
1315
2022
|
|
1316
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#
|
1317
|
-
def
|
2023
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#25
|
2024
|
+
def sig_with_runtime?(param0 = T.unsafe(nil)); end
|
1318
2025
|
|
1319
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#
|
1320
|
-
def
|
2026
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#34
|
2027
|
+
def sig_without_runtime?(param0 = T.unsafe(nil)); end
|
1321
2028
|
|
1322
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#
|
1323
|
-
def
|
2029
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#11
|
2030
|
+
def signature?(param0 = T.unsafe(nil)); end
|
1324
2031
|
end
|
1325
2032
|
|
1326
2033
|
# Ensures empty class/module definitions in RBI files are
|
@@ -1356,9 +2063,20 @@ RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(
|
|
1356
2063
|
|
1357
2064
|
# Makes the Sorbet `strict` sigil mandatory in all files.
|
1358
2065
|
#
|
1359
|
-
#
|
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
|
1360
2078
|
class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil
|
1361
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#
|
2079
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#26
|
1362
2080
|
def minimum_strictness; end
|
1363
2081
|
end
|
1364
2082
|
|
@@ -1514,72 +2232,79 @@ RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsa
|
|
1514
2232
|
# * `ExactStrictness`: If set, make offense if the strictness level in the file is different than this one
|
1515
2233
|
#
|
1516
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.
|
1517
2236
|
# Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect.
|
1518
2237
|
#
|
1519
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2238
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#21
|
1520
2239
|
class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base
|
1521
2240
|
extend ::RuboCop::Cop::AutoCorrector
|
1522
2241
|
|
1523
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2242
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#24
|
1524
2243
|
def on_new_investigation; end
|
1525
2244
|
|
1526
2245
|
protected
|
1527
2246
|
|
1528
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2247
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#169
|
1529
2248
|
def autocorrect(corrector); end
|
1530
2249
|
|
2250
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#110
|
2251
|
+
def check_double_commented_sigil(sigil, strictness); end
|
2252
|
+
|
1531
2253
|
# checks
|
1532
2254
|
#
|
1533
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2255
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#59
|
1534
2256
|
def check_sigil_present(sigil); end
|
1535
2257
|
|
1536
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2258
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#137
|
1537
2259
|
def check_strictness_level(sigil, strictness); end
|
1538
2260
|
|
1539
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2261
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#98
|
1540
2262
|
def check_strictness_not_empty(sigil, strictness); end
|
1541
2263
|
|
1542
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2264
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#125
|
1543
2265
|
def check_strictness_valid(sigil, strictness); end
|
1544
2266
|
|
1545
2267
|
# Default is `nil`
|
1546
2268
|
#
|
1547
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2269
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#203
|
1548
2270
|
def exact_strictness; end
|
1549
2271
|
|
1550
2272
|
# extraction
|
1551
2273
|
#
|
1552
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2274
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#47
|
1553
2275
|
def extract_sigil(processed_source); end
|
1554
2276
|
|
1555
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2277
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#53
|
1556
2278
|
def extract_strictness(sigil); end
|
1557
2279
|
|
1558
2280
|
# Default is `nil`
|
1559
2281
|
#
|
1560
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2282
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#197
|
1561
2283
|
def minimum_strictness; end
|
1562
2284
|
|
1563
2285
|
# Default is `false`
|
1564
2286
|
#
|
1565
2287
|
# @return [Boolean]
|
1566
2288
|
#
|
1567
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2289
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#186
|
1568
2290
|
def require_sigil_on_all_files?; end
|
1569
2291
|
|
1570
2292
|
# Default is `'false'`
|
1571
2293
|
#
|
1572
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2294
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#191
|
1573
2295
|
def suggested_strictness; end
|
1574
2296
|
|
1575
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2297
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#76
|
1576
2298
|
def suggested_strictness_level; end
|
1577
2299
|
end
|
1578
2300
|
|
1579
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
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
|
1580
2305
|
RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp)
|
1581
2306
|
|
1582
|
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#
|
2307
|
+
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#41
|
1583
2308
|
RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array)
|
1584
2309
|
|
1585
2310
|
# Disallows the usage of `.void.checked(:tests)`.
|
@@ -1638,28 +2363,24 @@ end
|
|
1638
2363
|
# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#4
|
1639
2364
|
module RuboCop::Sorbet; end
|
1640
2365
|
|
1641
|
-
# source://rubocop-sorbet//lib/rubocop/sorbet.rb#12
|
1642
|
-
RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash)
|
1643
|
-
|
1644
2366
|
# source://rubocop-sorbet//lib/rubocop/sorbet.rb#11
|
1645
|
-
RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname)
|
1646
|
-
|
1647
|
-
# source://rubocop-sorbet//lib/rubocop/sorbet.rb#8
|
1648
2367
|
class RuboCop::Sorbet::Error < ::StandardError; end
|
1649
2368
|
|
1650
|
-
#
|
1651
|
-
# bit of our configuration.
|
2369
|
+
# A plugin that integrates RuboCop Sorbet with RuboCop's plugin system.
|
1652
2370
|
#
|
1653
|
-
# source://rubocop-sorbet//lib/rubocop/sorbet/
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
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
|
1660
2378
|
|
1661
|
-
#
|
1662
|
-
|
2379
|
+
# @return [Boolean]
|
2380
|
+
#
|
2381
|
+
# source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#25
|
2382
|
+
def supported?(context); end
|
2383
|
+
end
|
1663
2384
|
|
1664
2385
|
# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#5
|
1665
2386
|
RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String)
|