From fa44ea0c6e289703c8fb28c76f3ae00ca9ac9b50 Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Fri, 12 Jul 2024 12:15:26 -0700 Subject: [PATCH] Bump dependencies --- Gemfile.lock | 38 +- grape_sorbet.gemspec | 6 +- sorbet/rbi/gems/activesupport@7.1.3.4.rbi | 10 +- sorbet/rbi/gems/base64@0.2.0.rbi | 28 +- sorbet/rbi/gems/grape@2.1.2.rbi | 2 +- sorbet/rbi/gems/mutex_m@0.2.0.rbi | 28 +- ...{parser@3.3.3.0.rbi => parser@3.3.4.0.rbi} | 0 sorbet/rbi/gems/psych@5.1.2.rbi | 497 ++- .../gems/{rack@3.1.6.rbi => rack@3.1.7.rbi} | 222 +- sorbet/rbi/gems/rbi@0.1.13.rbi | 30 +- sorbet/rbi/gems/rubocop-ast@1.31.3.rbi | 3 + ...0.35.0.rbi => rubocop-minitest@0.35.1.rbi} | 18 +- .../rbi/gems/rubocop-performance@1.21.1.rbi | 12 +- ...{rubocop@1.64.1.rbi => rubocop@1.65.0.rbi} | 746 ++-- .../gems/{spoom@1.3.2.rbi => spoom@1.3.3.rbi} | 3871 ++++++++++------- ...{tapioca@0.15.0.rbi => tapioca@0.15.1.rbi} | 50 +- sorbet/rbi/gems/yard-sorbet@0.9.0.rbi | 2 +- 17 files changed, 3118 insertions(+), 2445 deletions(-) rename sorbet/rbi/gems/{parser@3.3.3.0.rbi => parser@3.3.4.0.rbi} (100%) rename sorbet/rbi/gems/{rack@3.1.6.rbi => rack@3.1.7.rbi} (97%) rename sorbet/rbi/gems/{rubocop-minitest@0.35.0.rbi => rubocop-minitest@0.35.1.rbi} (99%) rename sorbet/rbi/gems/{rubocop@1.64.1.rbi => rubocop@1.65.0.rbi} (99%) rename sorbet/rbi/gems/{spoom@1.3.2.rbi => spoom@1.3.3.rbi} (77%) rename sorbet/rbi/gems/{tapioca@0.15.0.rbi => tapioca@0.15.1.rbi} (99%) diff --git a/Gemfile.lock b/Gemfile.lock index 7e62cde..8128ecc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,7 +56,7 @@ GEM i18n (1.14.5) concurrent-ruby (~> 1.0) io-console (0.7.2) - irb (1.13.2) + irb (1.14.0) rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.7.2) @@ -74,14 +74,14 @@ GEM mutex_m (0.2.0) netrc (0.11.0) parallel (1.25.1) - parser (3.3.3.0) + parser (3.3.4.0) ast (~> 2.4.1) racc prism (0.30.0) psych (5.1.2) stringio racc (1.8.0) - rack (3.1.6) + rack (3.1.7) rainbow (3.1.1) rake (13.2.1) rbi (0.1.13) @@ -94,20 +94,20 @@ GEM io-console (~> 0.5) rexml (3.3.1) strscan - rubocop (1.64.1) + rubocop (1.65.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) + regexp_parser (>= 2.4, < 3.0) rexml (>= 3.2.5, < 4.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.31.3) parser (>= 3.3.1.0) - rubocop-minitest (0.35.0) + rubocop-minitest (0.35.1) rubocop (>= 1.61, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-performance (1.21.1) @@ -127,23 +127,23 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11466) - sorbet-static (= 0.5.11466) - sorbet-runtime (0.5.11466) - sorbet-static (0.5.11466-aarch64-linux) - sorbet-static (0.5.11466-universal-darwin) - sorbet-static (0.5.11466-x86_64-linux) - sorbet-static-and-runtime (0.5.11466) - sorbet (= 0.5.11466) - sorbet-runtime (= 0.5.11466) - spoom (1.3.2) + sorbet (0.5.11481) + sorbet-static (= 0.5.11481) + sorbet-runtime (0.5.11481) + sorbet-static (0.5.11481-aarch64-linux) + sorbet-static (0.5.11481-universal-darwin) + sorbet-static (0.5.11481-x86_64-linux) + sorbet-static-and-runtime (0.5.11481) + sorbet (= 0.5.11481) + sorbet-runtime (= 0.5.11481) + spoom (1.3.3) erubi (>= 1.10.0) - prism (>= 0.19.0) + prism (>= 0.28.0) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) stringio (3.1.1) strscan (3.1.0) - tapioca (0.15.0) + tapioca (0.15.1) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) @@ -185,4 +185,4 @@ DEPENDENCIES tapioca BUNDLED WITH - 2.5.9 + 2.5.15 diff --git a/grape_sorbet.gemspec b/grape_sorbet.gemspec index e3e763c..c21077e 100644 --- a/grape_sorbet.gemspec +++ b/grape_sorbet.gemspec @@ -31,9 +31,9 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] # Uncomment to register a new dependency of your gem - spec.add_runtime_dependency("activesupport") - spec.add_runtime_dependency("grape", "~> 2.0") - spec.add_runtime_dependency("sorbet-runtime", "~> 0.5.10741") + spec.add_dependency("activesupport") + spec.add_dependency("grape", "~> 2.0") + spec.add_dependency("sorbet-runtime", "~> 0.5.10741") # For more information and examples about making a new gem, check out our # guide at: https://bundler.io/guides/creating_gem.html diff --git a/sorbet/rbi/gems/activesupport@7.1.3.4.rbi b/sorbet/rbi/gems/activesupport@7.1.3.4.rbi index cbb9078..01c629a 100644 --- a/sorbet/rbi/gems/activesupport@7.1.3.4.rbi +++ b/sorbet/rbi/gems/activesupport@7.1.3.4.rbi @@ -9249,10 +9249,10 @@ class ActiveSupport::Notifications::Fanout # source://activesupport//lib/active_support/notifications/fanout.rb#314 def listening?(name); end - # source://mutex_m/0.2.0/mutex_m.rb#91 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.2.0/mutex_m.rb#81 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end # source://activesupport//lib/active_support/notifications/fanout.rb#293 @@ -9267,13 +9267,13 @@ class ActiveSupport::Notifications::Fanout # source://activesupport//lib/active_support/notifications/fanout.rb#68 def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - # source://mutex_m/0.2.0/mutex_m.rb#76 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.2.0/mutex_m.rb#86 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.2.0/mutex_m.rb#96 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end # source://activesupport//lib/active_support/notifications/fanout.rb#85 diff --git a/sorbet/rbi/gems/base64@0.2.0.rbi b/sorbet/rbi/gems/base64@0.2.0.rbi index 087b64e..c33e78e 100644 --- a/sorbet/rbi/gems/base64@0.2.0.rbi +++ b/sorbet/rbi/gems/base64@0.2.0.rbi @@ -185,6 +185,8 @@ # # Base64.encode64("\n\n\n") # => "CgoK\n" # s = "This is line 1\nThis is line 2\n" # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" +# +# source://base64//lib/base64.rb#184 module Base64 private @@ -206,7 +208,7 @@ module Base64 # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" # - # source://base64//base64.rb#241 + # source://base64//lib/base64.rb#241 def decode64(str); end # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. @@ -238,7 +240,7 @@ module Base64 # s = "This is line 1\nThis is line 2\n" # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" # - # source://base64//base64.rb#219 + # source://base64//lib/base64.rb#219 def encode64(bin); end # Returns a string containing the decoding of an RFC-2045-compliant @@ -261,7 +263,7 @@ module Base64 # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError # - # source://base64//base64.rb#297 + # source://base64//lib/base64.rb#297 def strict_decode64(str); end # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. @@ -292,7 +294,7 @@ module Base64 # s = "This is line 1\nThis is line 2\n" # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" # - # source://base64//base64.rb#273 + # source://base64//lib/base64.rb#273 def strict_encode64(bin); end # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+: @@ -311,7 +313,7 @@ module Base64 # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. # - # source://base64//base64.rb#351 + # source://base64//lib/base64.rb#351 def urlsafe_decode64(str); end # Returns the RFC-4648-compliant \Base64-encoding of +bin+. @@ -341,7 +343,7 @@ module Base64 # Base64.urlsafe_encode64('*' * 46) # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" # - # source://base64//base64.rb#328 + # source://base64//lib/base64.rb#328 def urlsafe_encode64(bin, padding: T.unsafe(nil)); end class << self @@ -363,7 +365,7 @@ module Base64 # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" # - # source://base64//base64.rb#241 + # source://base64//lib/base64.rb#241 def decode64(str); end # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. @@ -395,7 +397,7 @@ module Base64 # s = "This is line 1\nThis is line 2\n" # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" # - # source://base64//base64.rb#219 + # source://base64//lib/base64.rb#219 def encode64(bin); end # Returns a string containing the decoding of an RFC-2045-compliant @@ -418,7 +420,7 @@ module Base64 # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError # - # source://base64//base64.rb#297 + # source://base64//lib/base64.rb#297 def strict_decode64(str); end # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. @@ -449,7 +451,7 @@ module Base64 # s = "This is line 1\nThis is line 2\n" # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" # - # source://base64//base64.rb#273 + # source://base64//lib/base64.rb#273 def strict_encode64(bin); end # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+: @@ -468,7 +470,7 @@ module Base64 # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. # - # source://base64//base64.rb#351 + # source://base64//lib/base64.rb#351 def urlsafe_decode64(str); end # Returns the RFC-4648-compliant \Base64-encoding of +bin+. @@ -498,10 +500,10 @@ module Base64 # Base64.urlsafe_encode64('*' * 46) # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" # - # source://base64//base64.rb#328 + # source://base64//lib/base64.rb#328 def urlsafe_encode64(bin, padding: T.unsafe(nil)); end end end -# source://base64//base64.rb#186 +# source://base64//lib/base64.rb#186 Base64::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/grape@2.1.2.rbi b/sorbet/rbi/gems/grape@2.1.2.rbi index 451fb0a..5f45a95 100644 --- a/sorbet/rbi/gems/grape@2.1.2.rbi +++ b/sorbet/rbi/gems/grape@2.1.2.rbi @@ -3477,7 +3477,7 @@ class Grape::Request < ::Rack::Request # source://grape//lib/grape/request.rb#14 def params; end - # source://rack/3.1.6/lib/rack/request.rb#67 + # source://rack/3.1.7/lib/rack/request.rb#67 def rack_params; end private diff --git a/sorbet/rbi/gems/mutex_m@0.2.0.rbi b/sorbet/rbi/gems/mutex_m@0.2.0.rbi index 50aa698..cc4b046 100644 --- a/sorbet/rbi/gems/mutex_m@0.2.0.rbi +++ b/sorbet/rbi/gems/mutex_m@0.2.0.rbi @@ -32,61 +32,63 @@ # end # obj = Foo.new # # this obj can be handled like Mutex +# +# source://mutex_m//lib/mutex_m.rb#41 module Mutex_m - # source://mutex_m//mutex_m.rb#111 + # source://mutex_m//lib/mutex_m.rb#111 def initialize(*args, **_arg1); end - # source://mutex_m//mutex_m.rb#64 + # source://mutex_m//lib/mutex_m.rb#64 def mu_extended; end # See Thread::Mutex#lock # - # source://mutex_m//mutex_m.rb#91 + # source://mutex_m//lib/mutex_m.rb#91 def mu_lock; end # See Thread::Mutex#locked? # # @return [Boolean] # - # source://mutex_m//mutex_m.rb#81 + # source://mutex_m//lib/mutex_m.rb#81 def mu_locked?; end # See Thread::Mutex#synchronize # - # source://mutex_m//mutex_m.rb#76 + # source://mutex_m//lib/mutex_m.rb#76 def mu_synchronize(&block); end # See Thread::Mutex#try_lock # - # source://mutex_m//mutex_m.rb#86 + # source://mutex_m//lib/mutex_m.rb#86 def mu_try_lock; end # See Thread::Mutex#unlock # - # source://mutex_m//mutex_m.rb#96 + # source://mutex_m//lib/mutex_m.rb#96 def mu_unlock; end # See Thread::Mutex#sleep # - # source://mutex_m//mutex_m.rb#101 + # source://mutex_m//lib/mutex_m.rb#101 def sleep(timeout = T.unsafe(nil)); end private - # source://mutex_m//mutex_m.rb#107 + # source://mutex_m//lib/mutex_m.rb#107 def mu_initialize; end class << self - # source://mutex_m//mutex_m.rb#54 + # source://mutex_m//lib/mutex_m.rb#54 def append_features(cl); end - # source://mutex_m//mutex_m.rb#46 + # source://mutex_m//lib/mutex_m.rb#46 def define_aliases(cl); end - # source://mutex_m//mutex_m.rb#59 + # source://mutex_m//lib/mutex_m.rb#59 def extend_object(obj); end end end -# source://mutex_m//mutex_m.rb#43 +# source://mutex_m//lib/mutex_m.rb#43 Mutex_m::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/parser@3.3.3.0.rbi b/sorbet/rbi/gems/parser@3.3.4.0.rbi similarity index 100% rename from sorbet/rbi/gems/parser@3.3.3.0.rbi rename to sorbet/rbi/gems/parser@3.3.4.0.rbi diff --git a/sorbet/rbi/gems/psych@5.1.2.rbi b/sorbet/rbi/gems/psych@5.1.2.rbi index f3d4c02..a060b60 100644 --- a/sorbet/rbi/gems/psych@5.1.2.rbi +++ b/sorbet/rbi/gems/psych@5.1.2.rbi @@ -5,6 +5,7 @@ # Please instead update this file by running `bin/tapioca gem psych`. +# source://psych//lib/psych/core_ext.rb#2 class Object < ::BasicObject include ::Kernel include ::PP::ObjectMixin @@ -14,11 +15,11 @@ class Object < ::BasicObject # Convert an object to YAML. See Psych.dump for more information on the # available +options+. # - # source://psych//psych/core_ext.rb#12 + # source://psych//lib/psych/core_ext.rb#12 def to_yaml(options = T.unsafe(nil)); end class << self - # source://psych//psych/core_ext.rb#3 + # source://psych//lib/psych/core_ext.rb#3 def yaml_tag(url); end end end @@ -224,26 +225,28 @@ end # # You can instantiate an Emitter manually # Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) # # => "a" +# +# source://psych//lib/psych/versions.rb#3 module Psych class << self - # source://psych//psych.rb#682 + # source://psych//lib/psych.rb#682 def add_builtin_type(type_tag, &block); end # :stopdoc: # - # source://psych//psych.rb#676 + # source://psych//lib/psych.rb#676 def add_domain_type(domain, type_tag, &block); end - # source://psych//psych.rb#692 + # source://psych//lib/psych.rb#692 def add_tag(tag, klass); end - # source://psych//psych.rb#708 + # source://psych//lib/psych.rb#708 def config; end - # source://psych//psych.rb#720 + # source://psych//lib/psych.rb#720 def domain_types; end - # source://psych//psych.rb#732 + # source://psych//lib/psych.rb#732 def domain_types=(value); end # call-seq: @@ -288,7 +291,7 @@ module Psych # # Dump an array to an IO with indentation set # Psych.dump(['a', ['b']], StringIO.new, indentation: 3) # - # source://psych//psych.rb#505 + # source://psych//lib/psych.rb#505 def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end # Dump a list of objects as separate documents to a document stream. @@ -297,13 +300,13 @@ module Psych # # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n" # - # source://psych//psych.rb#595 + # source://psych//lib/psych.rb#595 def dump_stream(*objects); end - # source://psych//psych.rb#716 + # source://psych//lib/psych.rb#716 def dump_tags; end - # source://psych//psych.rb#728 + # source://psych//lib/psych.rb#728 def dump_tags=(value); end # Load +yaml+ in to a Ruby data structure. If multiple documents are @@ -335,7 +338,7 @@ module Psych # Raises a TypeError when `yaml` parameter is NilClass. This method is # similar to `safe_load` except that `Symbol` objects are allowed by default. # - # source://psych//psych.rb#368 + # source://psych//lib/psych.rb#368 def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end # Loads the document contained in +filename+. Returns the yaml contained in @@ -343,7 +346,7 @@ module Psych # the specified +fallback+ return value, which defaults to +false+. # See load for options. # - # source://psych//psych.rb#669 + # source://psych//lib/psych.rb#669 def load_file(filename, **kwargs); end # Load multiple documents given in +yaml+. Returns the parsed documents @@ -360,13 +363,13 @@ module Psych # end # list # => ['foo', 'bar'] # - # source://psych//psych.rb#626 + # source://psych//lib/psych.rb#626 def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end - # source://psych//psych.rb#712 + # source://psych//lib/psych.rb#712 def load_tags; end - # source://psych//psych.rb#724 + # source://psych//lib/psych.rb#724 def load_tags=(value); end # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. @@ -388,14 +391,14 @@ module Psych # # See Psych::Nodes for more information about YAML AST. # - # source://psych//psych.rb#398 + # source://psych//lib/psych.rb#398 def parse(yaml, filename: T.unsafe(nil)); end # Parse a file at +filename+. Returns the Psych::Nodes::Document. # # Raises a Psych::SyntaxError when a YAML syntax error is detected. # - # source://psych//psych.rb#410 + # source://psych//lib/psych.rb#410 def parse_file(filename, fallback: T.unsafe(nil)); end # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. @@ -427,15 +430,15 @@ module Psych # # See Psych::Nodes for more information about YAML AST. # - # source://psych//psych.rb#452 + # source://psych//lib/psych.rb#452 def parse_stream(yaml, filename: T.unsafe(nil), &block); end # Returns a default parser # - # source://psych//psych.rb#419 + # source://psych//lib/psych.rb#419 def parser; end - # source://psych//psych.rb#688 + # source://psych//lib/psych.rb#688 def remove_type(type_tag); end # call-seq: @@ -500,7 +503,7 @@ module Psych # # Dump an array to an IO with indentation set # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3) # - # source://psych//psych.rb#578 + # source://psych//lib/psych.rb#578 def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end # Safely load the yaml string in +yaml+. By default, only the following @@ -547,7 +550,7 @@ module Psych # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} # - # source://psych//psych.rb#322 + # source://psych//lib/psych.rb#322 def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end # Safely loads the document contained in +filename+. Returns the yaml contained in @@ -555,12 +558,12 @@ module Psych # the specified +fallback+ return value, which defaults to +false+. # See safe_load for options. # - # source://psych//psych.rb#658 + # source://psych//lib/psych.rb#658 def safe_load_file(filename, **kwargs); end # Dump Ruby +object+ to a JSON string. # - # source://psych//psych.rb#605 + # source://psych//lib/psych.rb#605 def to_json(object); end # Load +yaml+ in to a Ruby data structure. If multiple documents are @@ -595,7 +598,7 @@ module Psych # YAML documents that are supplied via user input. Instead, please use the # load method or the safe_load method. # - # source://psych//psych.rb#271 + # source://psych//lib/psych.rb#271 def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end # Load the document contained in +filename+. Returns the yaml contained in @@ -606,99 +609,105 @@ module Psych # YAML documents that are supplied via user input. Instead, please use the # safe_load_file method. # - # source://psych//psych.rb#647 + # source://psych//lib/psych.rb#647 def unsafe_load_file(filename, **kwargs); end end end # Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#10 class Psych::AliasesNotEnabled < ::Psych::BadAlias # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled # - # source://psych//psych/exception.rb#11 + # source://psych//lib/psych/exception.rb#11 def initialize; end end # Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#17 class Psych::AnchorNotDefined < ::Psych::BadAlias # @return [AnchorNotDefined] a new instance of AnchorNotDefined # - # source://psych//psych/exception.rb#18 + # source://psych//lib/psych/exception.rb#18 def initialize(anchor_name); end end +# source://psych//lib/psych/class_loader.rb#6 class Psych::ClassLoader # @return [ClassLoader] a new instance of ClassLoader # - # source://psych//psych/class_loader.rb#21 + # source://psych//lib/psych/class_loader.rb#21 def initialize; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def big_decimal; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def complex; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def date; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def date_time; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def exception; end - # source://psych//psych/class_loader.rb#25 + # source://psych//lib/psych/class_loader.rb#25 def load(klassname); end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def object; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def psych_omap; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def psych_set; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def range; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def rational; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def regexp; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def struct; end - # source://psych//psych/class_loader.rb#39 + # source://psych//lib/psych/class_loader.rb#39 def symbol; end - # source://psych//psych/class_loader.rb#31 + # source://psych//lib/psych/class_loader.rb#31 def symbolize(sym); end private - # source://psych//psych/class_loader.rb#47 + # source://psych//lib/psych/class_loader.rb#47 def find(klassname); end - # source://psych//psych/class_loader.rb#51 + # source://psych//lib/psych/class_loader.rb#51 def resolve(klassname); end end +# source://psych//lib/psych/class_loader.rb#76 class Psych::ClassLoader::Restricted < ::Psych::ClassLoader # @return [Restricted] a new instance of Restricted # - # source://psych//psych/class_loader.rb#77 + # source://psych//lib/psych/class_loader.rb#77 def initialize(classes, symbols); end - # source://psych//psych/class_loader.rb#83 + # source://psych//lib/psych/class_loader.rb#83 def symbolize(sym); end private - # source://psych//psych/class_loader.rb#95 + # source://psych//lib/psych/class_loader.rb#95 def find(klassname); end end @@ -707,31 +716,33 @@ end # automatically assumes a Psych::Nodes::Mapping is being emitted. Other # objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are # called, respectively. +# +# source://psych//lib/psych/coder.rb#9 class Psych::Coder # @return [Coder] a new instance of Coder # - # source://psych//psych/coder.rb#13 + # source://psych//lib/psych/coder.rb#13 def initialize(tag); end - # source://psych//psych/coder.rb#84 + # source://psych//lib/psych/coder.rb#84 def [](k); end - # source://psych//psych/coder.rb#78 + # source://psych//lib/psych/coder.rb#78 def []=(k, v); end - # source://psych//psych/coder.rb#78 + # source://psych//lib/psych/coder.rb#78 def add(k, v); end # Returns the value of attribute implicit. # - # source://psych//psych/coder.rb#10 + # source://psych//lib/psych/coder.rb#10 def implicit; end # Sets the attribute implicit # # @param value the value to set the attribute implicit to. # - # source://psych//psych/coder.rb#10 + # source://psych//lib/psych/coder.rb#10 def implicit=(_arg0); end # Emit a map. The coder will be yielded to the block. @@ -739,98 +750,99 @@ class Psych::Coder # @yield [_self] # @yieldparam _self [Psych::Coder] the object that the method was called on # - # source://psych//psych/coder.rb#34 + # source://psych//lib/psych/coder.rb#34 def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end # Emit a map with +value+ # - # source://psych//psych/coder.rb#73 + # source://psych//lib/psych/coder.rb#73 def map=(map); end # Returns the value of attribute object. # - # source://psych//psych/coder.rb#10 + # source://psych//lib/psych/coder.rb#10 def object; end # Sets the attribute object # # @param value the value to set the attribute object to. # - # source://psych//psych/coder.rb#10 + # source://psych//lib/psych/coder.rb#10 def object=(_arg0); end # Emit a sequence with +map+ and +tag+ # - # source://psych//psych/coder.rb#54 + # source://psych//lib/psych/coder.rb#54 def represent_map(tag, map); end # Emit an arbitrary object +obj+ and +tag+ # - # source://psych//psych/coder.rb#60 + # source://psych//lib/psych/coder.rb#60 def represent_object(tag, obj); end # Emit a scalar with +value+ and +tag+ # - # source://psych//psych/coder.rb#42 + # source://psych//lib/psych/coder.rb#42 def represent_scalar(tag, value); end # Emit a sequence with +list+ and +tag+ # - # source://psych//psych/coder.rb#48 + # source://psych//lib/psych/coder.rb#48 def represent_seq(tag, list); end - # source://psych//psych/coder.rb#24 + # source://psych//lib/psych/coder.rb#24 def scalar(*args); end # Emit a scalar with +value+ # - # source://psych//psych/coder.rb#67 + # source://psych//lib/psych/coder.rb#67 def scalar=(value); end # Returns the value of attribute seq. # - # source://psych//psych/coder.rb#11 + # source://psych//lib/psych/coder.rb#11 def seq; end # Emit a sequence of +list+ # - # source://psych//psych/coder.rb#90 + # source://psych//lib/psych/coder.rb#90 def seq=(list); end # Returns the value of attribute style. # - # source://psych//psych/coder.rb#10 + # source://psych//lib/psych/coder.rb#10 def style; end # Sets the attribute style # # @param value the value to set the attribute style to. # - # source://psych//psych/coder.rb#10 + # source://psych//lib/psych/coder.rb#10 def style=(_arg0); end # Returns the value of attribute tag. # - # source://psych//psych/coder.rb#10 + # source://psych//lib/psych/coder.rb#10 def tag; end # Sets the attribute tag # # @param value the value to set the attribute tag to. # - # source://psych//psych/coder.rb#10 + # source://psych//lib/psych/coder.rb#10 def tag=(_arg0); end # Returns the value of attribute type. # - # source://psych//psych/coder.rb#11 + # source://psych//lib/psych/coder.rb#11 def type; end end +# source://psych//lib/psych/exception.rb#23 class Psych::DisallowedClass < ::Psych::Exception # @return [DisallowedClass] a new instance of DisallowedClass # - # source://psych//psych/exception.rb#24 + # source://psych//lib/psych/exception.rb#24 def initialize(action, klass_name); end end @@ -843,6 +855,8 @@ end # event handlers. # # See Psych::Parser for more details +# +# source://psych//lib/psych/handler.rb#13 class Psych::Handler # Called when an alias is found to +anchor+. +anchor+ will be the name # of the anchor found. @@ -858,13 +872,13 @@ class Psych::Handler # &ponies is the anchor, *ponies is the alias. In this case, alias is # called with "ponies". # - # source://psych//psych/handler.rb#110 + # source://psych//lib/psych/handler.rb#110 def alias(anchor); end # Called when an empty event happens. (Which, as far as I can tell, is # never). # - # source://psych//psych/handler.rb#236 + # source://psych//lib/psych/handler.rb#236 def empty; end # Called with the document ends. +implicit+ is a boolean value indicating @@ -885,27 +899,27 @@ class Psych::Handler # # +implicit+ will be false. # - # source://psych//psych/handler.rb#93 + # source://psych//lib/psych/handler.rb#93 def end_document(implicit); end # Called when a map ends # - # source://psych//psych/handler.rb#230 + # source://psych//lib/psych/handler.rb#230 def end_mapping; end # Called when a sequence ends. # - # source://psych//psych/handler.rb#191 + # source://psych//lib/psych/handler.rb#191 def end_sequence; end # Called when the YAML stream ends # - # source://psych//psych/handler.rb#241 + # source://psych//lib/psych/handler.rb#241 def end_stream; end # Called before each event with line/column information. # - # source://psych//psych/handler.rb#246 + # source://psych//lib/psych/handler.rb#246 def event_location(start_line, start_column, end_line, end_column); end # Called when a scalar +value+ is found. The scalar may have an @@ -944,7 +958,7 @@ class Psych::Handler # ["many lines", nil, nil, true, false, 1 ] # ["many\nnewlines\n", nil, nil, false, true, 4 ] # - # source://psych//psych/handler.rb#150 + # source://psych//lib/psych/handler.rb#150 def scalar(value, anchor, tag, plain, quoted, style); end # Called when the document starts with the declared +version+, @@ -969,7 +983,7 @@ class Psych::Handler # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] # implicit # => false # - # source://psych//psych/handler.rb#72 + # source://psych//lib/psych/handler.rb#72 def start_document(version, tag_directives, implicit); end # Called when a map starts. @@ -1002,7 +1016,7 @@ class Psych::Handler # [nil, "tag:yaml.org,2002:map", false, 2 ] # ["pewpew", nil, true, 1 ] # - # source://psych//psych/handler.rb#225 + # source://psych//lib/psych/handler.rb#225 def start_mapping(anchor, tag, implicit, style); end # Called when a sequence is started. @@ -1037,7 +1051,7 @@ class Psych::Handler # [nil, "tag:yaml.org,2002:seq", false, 2 ] # ["pewpew", nil, true, 1 ] # - # source://psych//psych/handler.rb#186 + # source://psych//lib/psych/handler.rb#186 def start_sequence(anchor, tag, implicit, style); end # Called with +encoding+ when the YAML stream starts. This method is @@ -1045,61 +1059,64 @@ class Psych::Handler # # See the constants in Psych::Parser for the possible values of +encoding+. # - # source://psych//psych/handler.rb#47 + # source://psych//lib/psych/handler.rb#47 def start_stream(encoding); end # Is this handler a streaming handler? # # @return [Boolean] # - # source://psych//psych/handler.rb#251 + # source://psych//lib/psych/handler.rb#251 def streaming?; end end # Configuration options for dumping YAML. +# +# source://psych//lib/psych/handler.rb#16 class Psych::Handler::DumperOptions # @return [DumperOptions] a new instance of DumperOptions # - # source://psych//psych/handler.rb#19 + # source://psych//lib/psych/handler.rb#19 def initialize; end # Returns the value of attribute canonical. # - # source://psych//psych/handler.rb#17 + # source://psych//lib/psych/handler.rb#17 def canonical; end # Sets the attribute canonical # # @param value the value to set the attribute canonical to. # - # source://psych//psych/handler.rb#17 + # source://psych//lib/psych/handler.rb#17 def canonical=(_arg0); end # Returns the value of attribute indentation. # - # source://psych//psych/handler.rb#17 + # source://psych//lib/psych/handler.rb#17 def indentation; end # Sets the attribute indentation # # @param value the value to set the attribute indentation to. # - # source://psych//psych/handler.rb#17 + # source://psych//lib/psych/handler.rb#17 def indentation=(_arg0); end # Returns the value of attribute line_width. # - # source://psych//psych/handler.rb#17 + # source://psych//lib/psych/handler.rb#17 def line_width; end # Sets the attribute line_width # # @param value the value to set the attribute line_width to. # - # source://psych//psych/handler.rb#17 + # source://psych//lib/psych/handler.rb#17 def line_width=(_arg0); end end +# source://psych//lib/psych/json/stream.rb#7 class Psych::JSON::Stream < ::Psych::Visitors::JSONTree include ::Psych::Streaming extend ::Psych::Streaming::ClassMethods @@ -1133,28 +1150,30 @@ end # # Psych uses Psych::Parser in combination with Psych::TreeBuilder to # construct an AST of the parsed YAML document. +# +# source://psych//lib/psych/parser.rb#33 class Psych::Parser # Creates a new Psych::Parser instance with +handler+. YAML events will # be called on +handler+. See Psych::Parser for more details. # # @return [Parser] a new instance of Parser # - # source://psych//psych/parser.rb#47 + # source://psych//lib/psych/parser.rb#47 def initialize(handler = T.unsafe(nil)); end # Set the encoding for this parser to +encoding+ # - # source://psych//psych/parser.rb#41 + # source://psych//lib/psych/parser.rb#41 def external_encoding=(_arg0); end # The handler on which events will be called # - # source://psych//psych/parser.rb#38 + # source://psych//lib/psych/parser.rb#38 def handler; end # The handler on which events will be called # - # source://psych//psych/parser.rb#38 + # source://psych//lib/psych/parser.rb#38 def handler=(_arg0); end # call-seq: @@ -1165,49 +1184,51 @@ class Psych::Parser # # See Psych::Parser and Psych::Parser#handler # - # source://psych//psych/parser.rb#61 + # source://psych//lib/psych/parser.rb#61 def parse(yaml, path = T.unsafe(nil)); end end # Scan scalars for built in types +# +# source://psych//lib/psych/scalar_scanner.rb#6 class Psych::ScalarScanner # Create a new scanner # # @return [ScalarScanner] a new instance of ScalarScanner # - # source://psych//psych/scalar_scanner.rb#30 + # source://psych//lib/psych/scalar_scanner.rb#30 def initialize(class_loader, strict_integer: T.unsafe(nil)); end # Returns the value of attribute class_loader. # - # source://psych//psych/scalar_scanner.rb#27 + # source://psych//lib/psych/scalar_scanner.rb#27 def class_loader; end # Parse and return an int from +string+ # - # source://psych//psych/scalar_scanner.rb#109 + # source://psych//lib/psych/scalar_scanner.rb#109 def parse_int(string); end # Parse and return a Time from +string+ # - # source://psych//psych/scalar_scanner.rb#115 + # source://psych//lib/psych/scalar_scanner.rb#115 def parse_time(string); end # Tokenize +string+ returning the Ruby object # - # source://psych//psych/scalar_scanner.rb#37 + # source://psych//lib/psych/scalar_scanner.rb#37 def tokenize(string); end end # Same as above, but allows commas. # Not to YML spec, but kept for backwards compatibility # -# source://psych//psych/scalar_scanner.rb#22 +# source://psych//lib/psych/scalar_scanner.rb#22 Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp) # Taken from http://yaml.org/type/int.html # -# source://psych//psych/scalar_scanner.rb#15 +# source://psych//lib/psych/scalar_scanner.rb#15 Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) # Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, @@ -1229,75 +1250,81 @@ Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) # stream.start do |em| # em.push(:foo => 'bar') # end +# +# source://psych//lib/psych/stream.rb#24 class Psych::Stream < ::Psych::Visitors::YAMLTree include ::Psych::Streaming extend ::Psych::Streaming::ClassMethods end +# source://psych//lib/psych/stream.rb#25 class Psych::Stream::Emitter < ::Psych::Emitter - # source://psych//psych/stream.rb#26 + # source://psych//lib/psych/stream.rb#26 def end_document(implicit_end = T.unsafe(nil)); end # @return [Boolean] # - # source://psych//psych/stream.rb#30 + # source://psych//lib/psych/stream.rb#30 def streaming?; end end +# source://psych//lib/psych/streaming.rb#3 module Psych::Streaming # Start streaming using +encoding+ # - # source://psych//psych/streaming.rb#18 + # source://psych//lib/psych/streaming.rb#18 def start(encoding = T.unsafe(nil)); end private - # source://psych//psych/streaming.rb#25 + # source://psych//lib/psych/streaming.rb#25 def register(target, obj); end end +# source://psych//lib/psych/streaming.rb#4 module Psych::Streaming::ClassMethods # Create a new streaming emitter. Emitter will print to +io+. See # Psych::Stream for an example. # - # source://psych//psych/streaming.rb#8 + # source://psych//lib/psych/streaming.rb#8 def new(io); end end +# source://psych//lib/psych/syntax_error.rb#5 class Psych::SyntaxError < ::Psych::Exception # @return [SyntaxError] a new instance of SyntaxError # - # source://psych//psych/syntax_error.rb#8 + # source://psych//lib/psych/syntax_error.rb#8 def initialize(file, line, col, offset, problem, context); end # Returns the value of attribute column. # - # source://psych//psych/syntax_error.rb#6 + # source://psych//lib/psych/syntax_error.rb#6 def column; end # Returns the value of attribute context. # - # source://psych//psych/syntax_error.rb#6 + # source://psych//lib/psych/syntax_error.rb#6 def context; end # Returns the value of attribute file. # - # source://psych//psych/syntax_error.rb#6 + # source://psych//lib/psych/syntax_error.rb#6 def file; end # Returns the value of attribute line. # - # source://psych//psych/syntax_error.rb#6 + # source://psych//lib/psych/syntax_error.rb#6 def line; end # Returns the value of attribute offset. # - # source://psych//psych/syntax_error.rb#6 + # source://psych//lib/psych/syntax_error.rb#6 def offset; end # Returns the value of attribute problem. # - # source://psych//psych/syntax_error.rb#6 + # source://psych//lib/psych/syntax_error.rb#6 def problem; end end @@ -1312,15 +1339,17 @@ end # # See Psych::Handler for documentation on the event methods used in this # class. +# +# source://psych//lib/psych/tree_builder.rb#17 class Psych::TreeBuilder < ::Psych::Handler # Create a new TreeBuilder instance # # @return [TreeBuilder] a new instance of TreeBuilder # - # source://psych//psych/tree_builder.rb#22 + # source://psych//lib/psych/tree_builder.rb#22 def initialize; end - # source://psych//psych/tree_builder.rb#103 + # source://psych//lib/psych/tree_builder.rb#103 def alias(anchor); end # Handles end_document events with +version+, +tag_directives+, @@ -1328,27 +1357,27 @@ class Psych::TreeBuilder < ::Psych::Handler # # See Psych::Handler#start_document # - # source://psych//psych/tree_builder.rb#77 + # source://psych//lib/psych/tree_builder.rb#77 def end_document(implicit_end = T.unsafe(nil)); end - # source://psych//psych/tree_builder.rb#52 + # source://psych//lib/psych/tree_builder.rb#52 def end_mapping; end - # source://psych//psych/tree_builder.rb#52 + # source://psych//lib/psych/tree_builder.rb#52 def end_sequence; end - # source://psych//psych/tree_builder.rb#90 + # source://psych//lib/psych/tree_builder.rb#90 def end_stream; end - # source://psych//psych/tree_builder.rb#33 + # source://psych//lib/psych/tree_builder.rb#33 def event_location(start_line, start_column, end_line, end_column); end # Returns the root node for the built tree # - # source://psych//psych/tree_builder.rb#19 + # source://psych//lib/psych/tree_builder.rb#19 def root; end - # source://psych//psych/tree_builder.rb#96 + # source://psych//lib/psych/tree_builder.rb#96 def scalar(value, anchor, tag, plain, quoted, style); end # Handles start_document events with +version+, +tag_directives+, @@ -1356,176 +1385,181 @@ class Psych::TreeBuilder < ::Psych::Handler # # See Psych::Handler#start_document # - # source://psych//psych/tree_builder.rb#65 + # source://psych//lib/psych/tree_builder.rb#65 def start_document(version, tag_directives, implicit); end - # source://psych//psych/tree_builder.rb#45 + # source://psych//lib/psych/tree_builder.rb#45 def start_mapping(anchor, tag, implicit, style); end - # source://psych//psych/tree_builder.rb#45 + # source://psych//lib/psych/tree_builder.rb#45 def start_sequence(anchor, tag, implicit, style); end - # source://psych//psych/tree_builder.rb#84 + # source://psych//lib/psych/tree_builder.rb#84 def start_stream(encoding); end private - # source://psych//psych/tree_builder.rb#116 + # source://psych//lib/psych/tree_builder.rb#116 def pop; end - # source://psych//psych/tree_builder.rb#111 + # source://psych//lib/psych/tree_builder.rb#111 def push(value); end - # source://psych//psych/tree_builder.rb#132 + # source://psych//lib/psych/tree_builder.rb#132 def set_end_location(node); end - # source://psych//psych/tree_builder.rb#122 + # source://psych//lib/psych/tree_builder.rb#122 def set_location(node); end - # source://psych//psych/tree_builder.rb#127 + # source://psych//lib/psych/tree_builder.rb#127 def set_start_location(node); end end # The version of Psych you are using # -# source://psych//psych/versions.rb#5 +# source://psych//lib/psych/versions.rb#5 Psych::VERSION = T.let(T.unsafe(nil), String) +# source://psych//lib/psych/visitors/depth_first.rb#4 class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor # @return [DepthFirst] a new instance of DepthFirst # - # source://psych//psych/visitors/depth_first.rb#5 + # source://psych//lib/psych/visitors/depth_first.rb#5 def initialize(block); end private - # source://psych//psych/visitors/depth_first.rb#11 + # source://psych//lib/psych/visitors/depth_first.rb#11 def nary(o); end - # source://psych//psych/visitors/depth_first.rb#20 + # source://psych//lib/psych/visitors/depth_first.rb#20 def terminal(o); end - # source://psych//psych/visitors/depth_first.rb#20 + # source://psych//lib/psych/visitors/depth_first.rb#20 def visit_Psych_Nodes_Alias(o); end - # source://psych//psych/visitors/depth_first.rb#11 + # source://psych//lib/psych/visitors/depth_first.rb#11 def visit_Psych_Nodes_Document(o); end - # source://psych//psych/visitors/depth_first.rb#11 + # source://psych//lib/psych/visitors/depth_first.rb#11 def visit_Psych_Nodes_Mapping(o); end - # source://psych//psych/visitors/depth_first.rb#20 + # source://psych//lib/psych/visitors/depth_first.rb#20 def visit_Psych_Nodes_Scalar(o); end - # source://psych//psych/visitors/depth_first.rb#11 + # source://psych//lib/psych/visitors/depth_first.rb#11 def visit_Psych_Nodes_Sequence(o); end - # source://psych//psych/visitors/depth_first.rb#11 + # source://psych//lib/psych/visitors/depth_first.rb#11 def visit_Psych_Nodes_Stream(o); end end +# source://psych//lib/psych/visitors/yaml_tree.rb#540 class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree # - # source://psych//psych/visitors/yaml_tree.rb#552 + # source://psych//lib/psych/visitors/yaml_tree.rb#552 def initialize(emitter, ss, options); end - # source://psych//psych/visitors/yaml_tree.rb#565 + # source://psych//lib/psych/visitors/yaml_tree.rb#565 def accept(target); end - # source://psych//psych/visitors/yaml_tree.rb#577 + # source://psych//lib/psych/visitors/yaml_tree.rb#577 def visit_Symbol(sym); end end -# source://psych//psych/visitors/yaml_tree.rb#541 +# source://psych//lib/psych/visitors/yaml_tree.rb#541 Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) # This class walks a YAML AST, converting each node to Ruby +# +# source://psych//lib/psych/visitors/to_ruby.rb#14 class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor # @return [ToRuby] a new instance of ToRuby # - # source://psych//psych/visitors/to_ruby.rb#23 + # source://psych//lib/psych/visitors/to_ruby.rb#23 def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end - # source://psych//psych/visitors/to_ruby.rb#34 + # source://psych//lib/psych/visitors/to_ruby.rb#34 def accept(target); end # Returns the value of attribute class_loader. # - # source://psych//psych/visitors/to_ruby.rb#21 + # source://psych//lib/psych/visitors/to_ruby.rb#21 def class_loader; end - # source://psych//psych/visitors/to_ruby.rb#327 + # source://psych//lib/psych/visitors/to_ruby.rb#327 def visit_Psych_Nodes_Alias(o); end - # source://psych//psych/visitors/to_ruby.rb#319 + # source://psych//lib/psych/visitors/to_ruby.rb#319 def visit_Psych_Nodes_Document(o); end - # source://psych//psych/visitors/to_ruby.rb#165 + # source://psych//lib/psych/visitors/to_ruby.rb#165 def visit_Psych_Nodes_Mapping(o); end - # source://psych//psych/visitors/to_ruby.rb#129 + # source://psych//lib/psych/visitors/to_ruby.rb#129 def visit_Psych_Nodes_Scalar(o); end - # source://psych//psych/visitors/to_ruby.rb#133 + # source://psych//lib/psych/visitors/to_ruby.rb#133 def visit_Psych_Nodes_Sequence(o); end - # source://psych//psych/visitors/to_ruby.rb#323 + # source://psych//lib/psych/visitors/to_ruby.rb#323 def visit_Psych_Nodes_Stream(o); end private - # source://psych//psych/visitors/to_ruby.rb#395 + # source://psych//lib/psych/visitors/to_ruby.rb#395 def deduplicate(key); end - # source://psych//psych/visitors/to_ruby.rb#51 + # source://psych//lib/psych/visitors/to_ruby.rb#51 def deserialize(o); end - # source://psych//psych/visitors/to_ruby.rb#412 + # source://psych//lib/psych/visitors/to_ruby.rb#412 def init_with(o, h, node); end - # source://psych//psych/visitors/to_ruby.rb#404 + # source://psych//lib/psych/visitors/to_ruby.rb#404 def merge_key(hash, key, val); end - # source://psych//psych/visitors/to_ruby.rb#333 + # source://psych//lib/psych/visitors/to_ruby.rb#333 def register(node, object); end - # source://psych//psych/visitors/to_ruby.rb#338 + # source://psych//lib/psych/visitors/to_ruby.rb#338 def register_empty(object); end # Convert +klassname+ to a Class # - # source://psych//psych/visitors/to_ruby.rb#425 + # source://psych//lib/psych/visitors/to_ruby.rb#425 def resolve_class(klassname); end - # source://psych//psych/visitors/to_ruby.rb#407 + # source://psych//lib/psych/visitors/to_ruby.rb#407 def revive(klass, node); end - # source://psych//psych/visitors/to_ruby.rb#344 + # source://psych//lib/psych/visitors/to_ruby.rb#344 def revive_hash(hash, o, tagged = T.unsafe(nil)); end class << self - # source://psych//psych/visitors/to_ruby.rb#15 + # source://psych//lib/psych/visitors/to_ruby.rb#15 def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end end end +# source://psych//lib/psych/visitors/visitor.rb#4 class Psych::Visitors::Visitor - # source://psych//psych/visitors/visitor.rb#5 + # source://psych//lib/psych/visitors/visitor.rb#5 def accept(target); end private - # source://psych//psych/visitors/visitor.rb#19 + # source://psych//lib/psych/visitors/visitor.rb#19 def dispatch; end - # source://psych//psych/visitors/visitor.rb#29 + # source://psych//lib/psych/visitors/visitor.rb#29 def visit(target); end class << self # @api private # - # source://psych//psych/visitors/visitor.rb#12 + # source://psych//lib/psych/visitors/visitor.rb#12 def dispatch_cache; end end end @@ -1535,198 +1569,201 @@ end # builder = Psych::Visitors::YAMLTree.new # builder << { :foo => 'bar' } # builder.tree # => #rack.early_hints # with an object which would be valid as the headers of a Rack response. # - # source://rack//lib/rack/lint.rb#655 + # source://rack//lib/rack/lint.rb#657 def check_early_hints(env); end # == The Environment @@ -1407,15 +1407,15 @@ class Rack::Lint::Wrapper # === The Error Stream # - # source://rack//lib/rack/lint.rb#529 + # source://rack//lib/rack/lint.rb#531 def check_error_stream(error); end - # source://rack//lib/rack/lint.rb#729 + # source://rack//lib/rack/lint.rb#731 def check_header_value(key, value); end # === The Headers # - # source://rack//lib/rack/lint.rb#689 + # source://rack//lib/rack/lint.rb#691 def check_headers(headers); end # === Hijacking @@ -1440,7 +1440,7 @@ class Rack::Lint::Wrapper # It is intended to be used when applications need access to raw HTTP/1 # connection. # - # source://rack//lib/rack/lint.rb#589 + # source://rack//lib/rack/lint.rb#591 def check_hijack(env); end # ==== Partial Hijack @@ -1452,7 +1452,7 @@ class Rack::Lint::Wrapper # It is intended to be used when applications need bi-directional # streaming. # - # source://rack//lib/rack/lint.rb#617 + # source://rack//lib/rack/lint.rb#619 def check_hijack_response(headers, env); end # === The Input Stream @@ -1460,19 +1460,19 @@ class Rack::Lint::Wrapper # The input stream is an IO-like object which contains the raw HTTP # POST data. # - # source://rack//lib/rack/lint.rb#425 + # source://rack//lib/rack/lint.rb#427 def check_input_stream(input); end # ==== The +rack.protocol+ Header # - # source://rack//lib/rack/lint.rb#783 + # source://rack//lib/rack/lint.rb#785 def check_rack_protocol_header(status, headers); end # == The Response # # === The Status # - # source://rack//lib/rack/lint.rb#678 + # source://rack//lib/rack/lint.rb#680 def check_status(status); end # Setting this value informs the server that it should perform a @@ -1504,19 +1504,19 @@ class Rack::Lint::Wrapper # cases where the Rack application makes internal/virtual requests and # discards the response. # - # source://rack//lib/rack/lint.rb#829 + # source://rack//lib/rack/lint.rb#831 def close; end # ==== Enumerable Body # # @raise [LintError] # - # source://rack//lib/rack/lint.rb#863 + # source://rack//lib/rack/lint.rb#865 def each; end # @return [Boolean] # - # source://rack//lib/rack/lint.rb#908 + # source://rack//lib/rack/lint.rb#910 def respond_to?(name, *_arg1); end # @raise [LintError] @@ -1532,73 +1532,73 @@ class Rack::Lint::Wrapper # +to_ary+ and +close+, its implementation of +to_ary+ must call # +close+. # - # source://rack//lib/rack/lint.rb#924 + # source://rack//lib/rack/lint.rb#926 def to_ary; end - # source://rack//lib/rack/lint.rb#904 + # source://rack//lib/rack/lint.rb#906 def to_path; end - # source://rack//lib/rack/lint.rb#768 + # source://rack//lib/rack/lint.rb#770 def verify_content_length(size); end - # source://rack//lib/rack/lint.rb#845 + # source://rack//lib/rack/lint.rb#847 def verify_to_path; end end -# source://rack//lib/rack/lint.rb#902 +# source://rack//lib/rack/lint.rb#904 Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash) -# source://rack//lib/rack/lint.rb#538 +# source://rack//lib/rack/lint.rb#540 class Rack::Lint::Wrapper::ErrorWrapper # @return [ErrorWrapper] a new instance of ErrorWrapper # - # source://rack//lib/rack/lint.rb#539 + # source://rack//lib/rack/lint.rb#541 def initialize(error); end # * +close+ must never be called on the error stream. # # @raise [LintError] # - # source://rack//lib/rack/lint.rb#561 + # source://rack//lib/rack/lint.rb#563 def close(*args); end # * +flush+ must be called without arguments and must be called # in order to make the error appear for sure. # - # source://rack//lib/rack/lint.rb#556 + # source://rack//lib/rack/lint.rb#558 def flush; end # * +puts+ must be called with a single argument that responds to +to_s+. # - # source://rack//lib/rack/lint.rb#544 + # source://rack//lib/rack/lint.rb#546 def puts(str); end # * +write+ must be called with a single argument that is a String. # # @raise [LintError] # - # source://rack//lib/rack/lint.rb#549 + # source://rack//lib/rack/lint.rb#551 def write(str); end end -# source://rack//lib/rack/lint.rb#443 +# source://rack//lib/rack/lint.rb#445 class Rack::Lint::Wrapper::InputWrapper # @return [InputWrapper] a new instance of InputWrapper # - # source://rack//lib/rack/lint.rb#444 + # source://rack//lib/rack/lint.rb#446 def initialize(input); end # * +close+ can be called on the input stream to indicate that # any remaining input is not needed. # - # source://rack//lib/rack/lint.rb#521 + # source://rack//lib/rack/lint.rb#523 def close(*args); end # * +each+ must be called without arguments and only yield Strings. # # @raise [LintError] # - # source://rack//lib/rack/lint.rb#509 + # source://rack//lib/rack/lint.rb#511 def each(*args); end # * +gets+ must be called without arguments and return a string, @@ -1606,7 +1606,7 @@ class Rack::Lint::Wrapper::InputWrapper # # @raise [LintError] # - # source://rack//lib/rack/lint.rb#450 + # source://rack//lib/rack/lint.rb#452 def gets(*args); end # * +read+ behaves like IO#read. @@ -1627,17 +1627,17 @@ class Rack::Lint::Wrapper::InputWrapper # If +buffer+ is given, then the read data will be placed # into +buffer+ instead of a newly created String object. # - # source://rack//lib/rack/lint.rb#476 + # source://rack//lib/rack/lint.rb#478 def read(*args); end end -# source://rack//lib/rack/lint.rb#957 +# source://rack//lib/rack/lint.rb#959 class Rack::Lint::Wrapper::StreamWrapper extend ::Forwardable # @return [StreamWrapper] a new instance of StreamWrapper # - # source://rack//lib/rack/lint.rb#972 + # source://rack//lib/rack/lint.rb#974 def initialize(stream); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1671,7 +1671,7 @@ end # pass on real IO objects, although it is recognized that this approach # is not directly compatible with HTTP/2. # -# source://rack//lib/rack/lint.rb#965 +# source://rack//lib/rack/lint.rb#967 Rack::Lint::Wrapper::StreamWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) # Rack::Lock locks every request inside a mutex, so that every request @@ -2170,7 +2170,7 @@ class Rack::Multipart::Parser # end of the boundary. If we don't find the start or end of the # boundary, clear the buffer and return nil. # - # source://rack//lib/rack/multipart/parser.rb#435 + # source://rack//lib/rack/multipart/parser.rb#434 def consume_boundary; end # From WEBrick::HTTPUtils @@ -2182,13 +2182,13 @@ class Rack::Multipart::Parser # enc is submitted by the user, it may be invalid, so # use a binary encoding in that case. # - # source://rack//lib/rack/multipart/parser.rb#490 + # source://rack//lib/rack/multipart/parser.rb#489 def find_encoding(enc); end # source://rack//lib/rack/multipart/parser.rb#294 def handle_consume_token; end - # source://rack//lib/rack/multipart/parser.rb#496 + # source://rack//lib/rack/multipart/parser.rb#495 def handle_empty_content!(content); end # This handles the initial parser state. We read until we find the starting @@ -2202,19 +2202,19 @@ class Rack::Multipart::Parser # source://rack//lib/rack/multipart/parser.rb#271 def handle_fast_forward; end - # source://rack//lib/rack/multipart/parser.rb#412 + # source://rack//lib/rack/multipart/parser.rb#411 def handle_mime_body; end # source://rack//lib/rack/multipart/parser.rb#306 def handle_mime_head; end - # source://rack//lib/rack/multipart/parser.rb#444 + # source://rack//lib/rack/multipart/parser.rb#443 def normalize_filename(filename); end # source://rack//lib/rack/multipart/parser.rb#258 def read_data(io, outbuf); end - # source://rack//lib/rack/multipart/parser.rb#457 + # source://rack//lib/rack/multipart/parser.rb#456 def tag_multipart_encoding(filename, content_type, name, body); end class << self @@ -2240,7 +2240,7 @@ class Rack::Multipart::Parser::BoundedIO def read(size, outbuf = T.unsafe(nil)); end end -# source://rack//lib/rack/multipart/parser.rb#454 +# source://rack//lib/rack/multipart/parser.rb#453 Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) # source://rack//lib/rack/multipart/parser.rb#305 @@ -3412,12 +3412,12 @@ class Rack::Response # @raise [ArgumentError] # - # source://rack//lib/rack/response.rb#160 + # source://rack//lib/rack/response.rb#164 def [](key); end # @raise [ArgumentError] # - # source://rack//lib/rack/response.rb#164 + # source://rack//lib/rack/response.rb#168 def []=(key, value); end # Returns the value of attribute body. @@ -3434,23 +3434,23 @@ class Rack::Response # @return [Boolean] # - # source://rack//lib/rack/response.rb#94 + # source://rack//lib/rack/response.rb#95 def chunked?; end - # source://rack//lib/rack/response.rb#148 + # source://rack//lib/rack/response.rb#152 def close; end # @raise [ArgumentError] # - # source://rack//lib/rack/response.rb#168 + # source://rack//lib/rack/response.rb#172 def delete_header(key); end - # source://rack//lib/rack/response.rb#128 + # source://rack//lib/rack/response.rb#130 def each(&callback); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#152 + # source://rack//lib/rack/response.rb#156 def empty?; end # Generate a response array consistent with the requirements of the SPEC. @@ -3458,18 +3458,18 @@ class Rack::Response # # @return [Array] a 3-tuple suitable of `[status, headers, body]` # - # source://rack//lib/rack/response.rb#106 + # source://rack//lib/rack/response.rb#107 def finish(&block); end # @raise [ArgumentError] # - # source://rack//lib/rack/response.rb#160 + # source://rack//lib/rack/response.rb#164 def get_header(key); end # @raise [ArgumentError] # @return [Boolean] # - # source://rack//lib/rack/response.rb#156 + # source://rack//lib/rack/response.rb#160 def has_header?(key); end # Returns the value of attribute headers. @@ -3491,15 +3491,15 @@ class Rack::Response # @return [Boolean] # - # source://rack//lib/rack/response.rb#98 + # source://rack//lib/rack/response.rb#99 def no_entity_body?; end - # source://rack//lib/rack/response.rb#89 + # source://rack//lib/rack/response.rb#90 def redirect(target, status = T.unsafe(nil)); end # @raise [ArgumentError] # - # source://rack//lib/rack/response.rb#164 + # source://rack//lib/rack/response.rb#168 def set_header(key, value); end # Returns the value of attribute status. @@ -3520,14 +3520,16 @@ class Rack::Response # # @return [Array] a 3-tuple suitable of `[status, headers, body]` # - # source://rack//lib/rack/response.rb#106 + # source://rack//lib/rack/response.rb#107 def to_a(&block); end - # Append to body and update content-length. + # Append a chunk to the response body. + # + # Converts the response into a buffered response if it wasn't already. # # NOTE: Do not mix #write and direct #body access! # - # source://rack//lib/rack/response.rb#142 + # source://rack//lib/rack/response.rb#146 def write(chunk); end class << self @@ -3539,11 +3541,11 @@ end # source://rack//lib/rack/response.rb#28 Rack::Response::CHUNKED = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/response.rb#176 +# source://rack//lib/rack/response.rb#180 module Rack::Response::Helpers # @return [Boolean] # - # source://rack//lib/rack/response.rb#187 + # source://rack//lib/rack/response.rb#191 def accepted?; end # Add a header that may have multiple values. @@ -3558,12 +3560,12 @@ module Rack::Response::Helpers # # @raise [ArgumentError] # - # source://rack//lib/rack/response.rb#215 + # source://rack//lib/rack/response.rb#219 def add_header(key, value); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#190 + # source://rack//lib/rack/response.rb#194 def bad_request?; end # Specify that the content should be cached. @@ -3572,166 +3574,166 @@ module Rack::Response::Helpers # @param duration [Integer] The number of seconds until the cache expires. # @param directive [Hash] a customizable set of options # - # source://rack//lib/rack/response.rb#303 + # source://rack//lib/rack/response.rb#307 def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end - # source://rack//lib/rack/response.rb#286 + # source://rack//lib/rack/response.rb#290 def cache_control; end - # source://rack//lib/rack/response.rb#290 + # source://rack//lib/rack/response.rb#294 def cache_control=(value); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#182 + # source://rack//lib/rack/response.rb#186 def client_error?; end - # source://rack//lib/rack/response.rb#253 + # source://rack//lib/rack/response.rb#257 def content_length; end # Get the content type of the response. # - # source://rack//lib/rack/response.rb#236 + # source://rack//lib/rack/response.rb#240 def content_type; end # Set the content type of the response. # - # source://rack//lib/rack/response.rb#241 + # source://rack//lib/rack/response.rb#245 def content_type=(content_type); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#186 + # source://rack//lib/rack/response.rb#190 def created?; end - # source://rack//lib/rack/response.rb#270 + # source://rack//lib/rack/response.rb#274 def delete_cookie(key, value = T.unsafe(nil)); end # Specifies that the content shouldn't be cached. Overrides `cache!` if already called. # - # source://rack//lib/rack/response.rb#295 + # source://rack//lib/rack/response.rb#299 def do_not_cache!; end - # source://rack//lib/rack/response.rb#310 + # source://rack//lib/rack/response.rb#314 def etag; end - # source://rack//lib/rack/response.rb#314 + # source://rack//lib/rack/response.rb#318 def etag=(value); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#192 + # source://rack//lib/rack/response.rb#196 def forbidden?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#202 + # source://rack//lib/rack/response.rb#206 def include?(header); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#179 + # source://rack//lib/rack/response.rb#183 def informational?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#177 + # source://rack//lib/rack/response.rb#181 def invalid?; end - # source://rack//lib/rack/response.rb#258 + # source://rack//lib/rack/response.rb#262 def location; end - # source://rack//lib/rack/response.rb#262 + # source://rack//lib/rack/response.rb#266 def location=(location); end - # source://rack//lib/rack/response.rb#245 + # source://rack//lib/rack/response.rb#249 def media_type; end - # source://rack//lib/rack/response.rb#249 + # source://rack//lib/rack/response.rb#253 def media_type_params; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#194 + # source://rack//lib/rack/response.rb#198 def method_not_allowed?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#189 + # source://rack//lib/rack/response.rb#193 def moved_permanently?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#188 + # source://rack//lib/rack/response.rb#192 def no_content?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#195 + # source://rack//lib/rack/response.rb#199 def not_acceptable?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#193 + # source://rack//lib/rack/response.rb#197 def not_found?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#185 + # source://rack//lib/rack/response.rb#189 def ok?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#197 + # source://rack//lib/rack/response.rb#201 def precondition_failed?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#200 + # source://rack//lib/rack/response.rb#204 def redirect?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#181 + # source://rack//lib/rack/response.rb#185 def redirection?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#196 + # source://rack//lib/rack/response.rb#200 def request_timeout?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#183 + # source://rack//lib/rack/response.rb#187 def server_error?; end - # source://rack//lib/rack/response.rb#266 + # source://rack//lib/rack/response.rb#270 def set_cookie(key, value); end - # source://rack//lib/rack/response.rb#278 + # source://rack//lib/rack/response.rb#282 def set_cookie_header; end - # source://rack//lib/rack/response.rb#282 + # source://rack//lib/rack/response.rb#286 def set_cookie_header=(value); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#180 + # source://rack//lib/rack/response.rb#184 def successful?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#191 + # source://rack//lib/rack/response.rb#195 def unauthorized?; end # @return [Boolean] # - # source://rack//lib/rack/response.rb#198 + # source://rack//lib/rack/response.rb#202 def unprocessable?; end protected - # source://rack//lib/rack/response.rb#358 + # source://rack//lib/rack/response.rb#359 def append(chunk); end # Convert the body of this response into an internally buffered Array if possible. @@ -3743,48 +3745,48 @@ module Rack::Response::Helpers # # @return [Boolean] whether the body is buffered as an Array instance. # - # source://rack//lib/rack/response.rb#328 + # source://rack//lib/rack/response.rb#332 def buffered_body!; end end -# source://rack//lib/rack/response.rb#370 +# source://rack//lib/rack/response.rb#375 class Rack::Response::Raw include ::Rack::Response::Helpers # @return [Raw] a new instance of Raw # - # source://rack//lib/rack/response.rb#376 + # source://rack//lib/rack/response.rb#381 def initialize(status, headers); end - # source://rack//lib/rack/response.rb#393 + # source://rack//lib/rack/response.rb#398 def delete_header(key); end - # source://rack//lib/rack/response.rb#385 + # source://rack//lib/rack/response.rb#390 def get_header(key); end # @return [Boolean] # - # source://rack//lib/rack/response.rb#381 + # source://rack//lib/rack/response.rb#386 def has_header?(key); end # Returns the value of attribute headers. # - # source://rack//lib/rack/response.rb#373 + # source://rack//lib/rack/response.rb#378 def headers; end - # source://rack//lib/rack/response.rb#389 + # source://rack//lib/rack/response.rb#394 def set_header(key, value); end # Returns the value of attribute status. # - # source://rack//lib/rack/response.rb#374 + # source://rack//lib/rack/response.rb#379 def status; end # Sets the attribute status # # @param value the value to set the attribute status to. # - # source://rack//lib/rack/response.rb#374 + # source://rack//lib/rack/response.rb#379 def status=(_arg0); end end diff --git a/sorbet/rbi/gems/rbi@0.1.13.rbi b/sorbet/rbi/gems/rbi@0.1.13.rbi index bf956a9..9069c35 100644 --- a/sorbet/rbi/gems/rbi@0.1.13.rbi +++ b/sorbet/rbi/gems/rbi@0.1.13.rbi @@ -1945,7 +1945,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end @@ -2162,7 +2162,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end @@ -2799,7 +2799,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2809,19 +2809,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#45 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#55 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#55 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#50 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#50 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#89 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, @@ -2834,7 +2834,7 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#113 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#113 sig do params( name: ::String, @@ -2847,19 +2847,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#60 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#25 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#25 sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_module(name, &block); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#9 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#9 sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#135 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#135 sig do params( parameters: T::Hash[T.any(::String, ::Symbol), ::String], @@ -2869,7 +2869,7 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_sig(parameters:, type_parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2935,11 +2935,11 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#150 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#150 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#145 + # source://tapioca/0.15.1/lib/tapioca/rbi_ext/model.rb#145 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end diff --git a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi index 981abbf..4e38413 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi @@ -5270,6 +5270,9 @@ RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MAP_FILTER_MAP = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH = T.let(T.unsafe(nil), Set) diff --git a/sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi b/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi rename to sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi index 62e6e8e..1b7cca9 100644 --- a/sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi +++ b/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi @@ -1267,33 +1267,35 @@ RuboCop::Cop::Minitest::LiteralAsActualArgument::RESTRICT_ON_SEND = T.let(T.unsa # # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#30 class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableMax include ::RuboCop::Cop::VisibilityHelp include ::RuboCop::Cop::DefNode include ::RuboCop::Cop::MinitestExplorationHelpers - # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#36 + # source://rubocop/1.65.0/lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#37 def on_class(class_node); end private - # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#53 + # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#54 def assertions_count(node); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#61 + # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#62 def assertions_count_based_on_type(node); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#76 + # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#77 def assertions_count_in_assignment(node); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#94 + # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#95 def assertions_count_in_branches(branches); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#98 + # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#99 def max_assertions; end end -# source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#34 +# source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#33 RuboCop::Cop::Minitest::MultipleAssertions::MSG = T.let(T.unsafe(nil), String) # Common functionality for `AssertNil` and `RefuteNil` cops. diff --git a/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi b/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi index cbc01bf..14ae299 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi @@ -14,28 +14,28 @@ module RuboCop::Cop; end module RuboCop::Cop::Lint; end class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - # source://rubocop/1.64.1/lib/rubocop/cop/lint/unused_method_argument.rb#66 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#66 def not_implemented?(param0 = T.unsafe(nil)); end private - # source://rubocop/1.64.1/lib/rubocop/cop/lint/unused_method_argument.rb#81 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#81 def autocorrect(corrector, node); end - # source://rubocop/1.64.1/lib/rubocop/cop/lint/unused_method_argument.rb#85 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#85 def check_argument(variable); end - # source://rubocop/1.64.1/lib/rubocop/cop/lint/unused_method_argument.rb#93 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#93 def ignored_method?(body); end - # source://rubocop/1.64.1/lib/rubocop/cop/lint/unused_method_argument.rb#98 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#98 def message(variable); end class << self # source://rubocop-performance//lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end - # source://rubocop/1.64.1/lib/rubocop/cop/lint/unused_method_argument.rb#75 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#75 def joining_forces; end end end diff --git a/sorbet/rbi/gems/rubocop@1.64.1.rbi b/sorbet/rbi/gems/rubocop@1.65.0.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop@1.64.1.rbi rename to sorbet/rbi/gems/rubocop@1.65.0.rbi index 34925cb..21b7562 100644 --- a/sorbet/rbi/gems/rubocop@1.64.1.rbi +++ b/sorbet/rbi/gems/rubocop@1.65.0.rbi @@ -2412,7 +2412,7 @@ module RuboCop::Cop::Alignment # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#45 def each_bad_alignment(items, base_column); end - # @deprecated Use processed_source.comment_at_line(line) + # @deprecated Use processed_source.line_with_comment?(line) # # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#69 def end_of_line_comment(line); end @@ -2425,7 +2425,7 @@ module RuboCop::Cop::Alignment # @api private # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#74 + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#78 def register_offense(offense_node, message_node); end # @api public @@ -2538,21 +2538,20 @@ module RuboCop::Cop::AllowedMethods # @api public # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#21 + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#27 def allowed_methods; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#29 + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#35 def cop_config_allowed_methods; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#33 + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#39 def cop_config_deprecated_values; end - # @api public # @deprecated Use allowed_method? instead # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 - def ignored_method?(name); end + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#18 + def ignored_method?; end end # This module encapsulates the ability to ignore certain lines when @@ -2567,31 +2566,31 @@ module RuboCop::Cop::AllowedPattern # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 def allowed_line?(line); end - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#30 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#42 def allowed_patterns; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#46 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#58 def cop_config_deprecated_methods_values; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#40 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#52 def cop_config_patterns_values; end # @deprecated Use allowed_line? instead # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 - def ignored_line?(line); end + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#21 + def ignored_line?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#29 def matches_allowed_pattern?(line); end - # @deprecated Use matches_allowed_pattern?? instead + # @deprecated Use matches_allowed_pattern? instead # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 - def matches_ignored_pattern?(line); end + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#34 + def matches_ignored_pattern?; end end # This module encapsulates the ability to allow certain receivers in a cop. @@ -4860,7 +4859,7 @@ end # Handles `Max` configuration parameters, especially setting them to an # appropriate value with --auto-gen-config. # -# @deprecated Use `exclude_limit ParameterName` instead. +# @deprecated Use `exclude_limit ` instead. # # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#8 module RuboCop::Cop::ConfigurableMax @@ -4869,7 +4868,7 @@ module RuboCop::Cop::ConfigurableMax # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#11 def max=(value); end - # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#19 + # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#23 def max_parameter_name; end end @@ -4902,22 +4901,22 @@ RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) # # source://rubocop//lib/rubocop/cop/cop.rb#11 class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/cop.rb#53 + # source://rubocop//lib/rubocop/cop/cop.rb#65 def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/cop.rb#103 + # source://rubocop//lib/rubocop/cop/cop.rb#121 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @deprecated # - # source://rubocop//lib/rubocop/cop/cop.rb#82 + # source://rubocop//lib/rubocop/cop/cop.rb#97 def corrections; end - # source://rubocop//lib/rubocop/cop/cop.rb#70 + # source://rubocop//lib/rubocop/cop/cop.rb#82 def find_location(node, loc); end # Returns the value of attribute offenses. @@ -4927,53 +4926,53 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # Called after all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#96 + # source://rubocop//lib/rubocop/cop/cop.rb#114 def on_investigation_end; end # Called before all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#90 + # source://rubocop//lib/rubocop/cop/cop.rb#108 def on_new_investigation; end # @deprecated Use class method # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/cop.rb#76 + # source://rubocop//lib/rubocop/cop/cop.rb#88 def support_autocorrect?; end private - # source://rubocop//lib/rubocop/cop/cop.rb#121 + # source://rubocop//lib/rubocop/cop/cop.rb#139 def apply_correction(corrector); end # Override Base # - # source://rubocop//lib/rubocop/cop/cop.rb#117 + # source://rubocop//lib/rubocop/cop/cop.rb#135 def callback_argument(_range); end - # source://rubocop//lib/rubocop/cop/cop.rb#138 + # source://rubocop//lib/rubocop/cop/cop.rb#156 def correction_lambda; end - # source://rubocop//lib/rubocop/cop/cop.rb#144 + # source://rubocop//lib/rubocop/cop/cop.rb#162 def dedupe_on_node(node); end # Just for legacy # # @yield [corrector] # - # source://rubocop//lib/rubocop/cop/cop.rb#126 + # source://rubocop//lib/rubocop/cop/cop.rb#144 def emulate_v0_callsequence(corrector); end - # source://rubocop//lib/rubocop/cop/cop.rb#157 + # source://rubocop//lib/rubocop/cop/cop.rb#175 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/cop.rb#151 + # source://rubocop//lib/rubocop/cop/cop.rb#169 def suppress_clobbering; end class << self # @deprecated Use Registry.all # - # source://rubocop//lib/rubocop/cop/cop.rb#44 + # source://rubocop//lib/rubocop/cop/cop.rb#48 def all; end # source://rubocop//lib/rubocop/cop/cop.rb#29 @@ -4981,7 +4980,7 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # @deprecated Use Registry.qualified_cop_name # - # source://rubocop//lib/rubocop/cop/cop.rb#49 + # source://rubocop//lib/rubocop/cop/cop.rb#57 def qualified_cop_name(name, origin); end # @deprecated Use Registry.global @@ -5093,7 +5092,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.3.0/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.4.0/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5643,9 +5642,38 @@ module RuboCop::Cop::GemDeclaration def gem_declaration?(param0 = T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#5 +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#5 module RuboCop::Cop::Gemspec; end +# Prefer `add_dependency` over `add_runtime_dependency` as the latter is +# considered soft-deprecated. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_runtime_dependency('rubocop') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('rubocop') +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#21 +class RuboCop::Cop::Gemspec::AddRuntimeDependency < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#28 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#24 +RuboCop::Cop::Gemspec::AddRuntimeDependency::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#26 +RuboCop::Cop::Gemspec::AddRuntimeDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Enforce that gem dependency version specifications or a commit reference (branch, # ref, or tag) are either required or forbidden. # @@ -5948,8 +5976,8 @@ RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsaf # # # good # Gem::Specification.new do |spec| -# spec.add_runtime_dependency('parallel', '~> 1.10') -# spec.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0') +# spec.add_dependency('parallel', '~> 1.10') +# spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0') # end # # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#37 @@ -6252,15 +6280,15 @@ RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(ni # # bad # Gem::Specification.new do |spec| # if RUBY_VERSION >= '3.0' -# spec.add_runtime_dependency 'gem_a' +# spec.add_dependency 'gem_a' # else -# spec.add_runtime_dependency 'gem_b' +# spec.add_dependency 'gem_b' # end # end # # # good # Gem::Specification.new do |spec| -# spec.add_runtime_dependency 'gem_a' +# spec.add_dependency 'gem_a' # end # # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28 @@ -7064,7 +7092,7 @@ RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), # @deprecated IgnoredMethods class has been replaced with AllowedMethods. # -# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#40 +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#46 RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods # Handles adding and checking ignored nodes. @@ -7092,7 +7120,7 @@ end # @deprecated IgnoredPattern class has been replaced with AllowedPattern. # -# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#54 +# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#66 RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern # Common functionality for checking integer nodes. @@ -10546,8 +10574,8 @@ RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), Strin # second_params # @example EnforcedStyle: special_for_inner_method_call # # The first argument should normally be indented one step more than -# # the preceding line, but if it's a argument for a method call that -# # is itself a argument in a method call, then the inner argument +# # the preceding line, but if it's an argument for a method call that +# # is itself an argument in a method call, then the inner argument # # should be indented relative to the inner method. # # # good @@ -11783,7 +11811,7 @@ RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(ni # Checks the indentation of the here document bodies. The bodies # are indented one step. # -# Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), +# NOTE: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), # this cop does not add any offenses for long here documents to # avoid ``Layout/LineLength``'s offenses. # @@ -12773,29 +12801,29 @@ RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_IN # split across lines. These include arrays, hashes, and # method calls with argument lists. # -# If autocorrection is enabled, the following Layout cops +# If autocorrection is enabled, the following cops # are recommended to further format the broken lines. # (Many of these are enabled by default.) # -# * ArgumentAlignment -# * ArrayAlignment -# * BlockAlignment -# * BlockDelimiters -# * BlockEndNewline -# * ClosingParenthesisIndentation -# * FirstArgumentIndentation -# * FirstArrayElementIndentation -# * FirstHashElementIndentation -# * FirstParameterIndentation -# * HashAlignment -# * IndentationWidth -# * MultilineArrayLineBreaks -# * MultilineBlockLayout -# * MultilineHashBraceLayout -# * MultilineHashKeyLineBreaks -# * MultilineMethodArgumentLineBreaks -# * MultilineMethodParameterLineBreaks -# * ParameterAlignment +# * `Layout/ArgumentAlignment` +# * `Layout/ArrayAlignment` +# * `Layout/BlockAlignment` +# * `Layout/BlockEndNewline` +# * `LayoutClosingParenthesisIndentation` +# * `LayoutFirstArgumentIndentation` +# * `LayoutFirstArrayElementIndentation` +# * `LayoutFirstHashElementIndentation` +# * `LayoutFirstParameterIndentation` +# * `LayoutHashAlignment` +# * `LayoutIndentationWidth` +# * `LayoutMultilineArrayLineBreaks` +# * `LayoutMultilineBlockLayout` +# * `LayoutMultilineHashBraceLayout` +# * `LayoutMultilineHashKeyLineBreaks` +# * `LayoutMultilineMethodArgumentLineBreaks` +# * `LayoutMultilineMethodParameterLineBreaks` +# * `Layout/ParameterAlignment` +# * `Style/BlockDelimiters` # # Together, these cops will pretty print hashes, arrays, # method calls, etc. For example, let's say the max columns @@ -15133,44 +15161,44 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#256 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#259 def align_hash_cop_config; end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#195 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#198 def autocorrect(corrector, range, right_operand); end # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 def check_operator(type, operator, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#209 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#212 def enclose_operator_with_space(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#236 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#239 def excess_leading_space?(type, operator, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#251 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254 def excess_trailing_space?(right_operand, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#274 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#277 def force_equal_sign_alignment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#260 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#263 def hash_table_style?; end # @yield [msg] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#190 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#193 def offense(type, operator, with_space, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#222 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#225 def offense_message(type, operator, with_space, right_operand); end # @return [Boolean] @@ -15185,17 +15213,17 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#278 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#281 def should_not_have_surrounding_space?(operator, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#264 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#267 def space_around_exponent_operator?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#268 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#271 def space_around_slash_operator?(right_operand); end class << self @@ -19671,41 +19699,43 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#25 class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#33 + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#36 def on_dstr(node); end private - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#83 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#90 def display_str(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#50 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#57 def each_bad_cons(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#65 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#72 def ending_delimiter(str); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#91 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#98 def str_content(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#75 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 def string_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#79 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 def string_literals?(node1, node2); end end -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) # Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. @@ -23944,12 +23974,12 @@ class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#83 + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#76 def argument_match?(send_arg, def_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#68 + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#61 def arguments_match?(arguments, def_node); end end @@ -24373,31 +24403,31 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#190 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#191 def acceptable_return?(return_val, element_name); end # Exclude `begin` nodes inside a `dstr` from being collected by `return_values` # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#198 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#199 def allowed_type?(parent_node); end - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#158 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#159 def block_arg_name(node, index); end - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#141 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#142 def check_return_values(block_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#175 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#176 def potential_offense?(return_values, block_body, element_name, accumulator_name); end # Return values in a block are either the value given to next, # the last line of a multiline block, or the only line of the block # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#127 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#128 def return_values(block_body_node); end # Look for an index of the accumulator being returned, except where the index @@ -24405,7 +24435,7 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # This is always an offense, in order to try to catch potential exceptions # due to type mismatches # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#166 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#167 def returned_accumulator_index(return_values, accumulator_name, element_name); end # If the accumulator is used in any return value, the node is acceptable since @@ -24413,7 +24443,7 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#182 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#183 def returns_accumulator_anywhere?(return_values, accumulator_name); end end @@ -25714,13 +25744,13 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/void.rb#217 + # source://rubocop//lib/rubocop/cop/lint/void.rb#222 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#213 + # source://rubocop//lib/rubocop/cop/lint/void.rb#216 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#201 + # source://rubocop//lib/rubocop/cop/lint/void.rb#204 def autocorrect_void_op(corrector, node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#99 @@ -25729,32 +25759,32 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/void.rb#113 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#151 + # source://rubocop//lib/rubocop/cop/lint/void.rb#154 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#175 + # source://rubocop//lib/rubocop/cop/lint/void.rb#178 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#159 + # source://rubocop//lib/rubocop/cop/lint/void.rb#162 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#133 + # source://rubocop//lib/rubocop/cop/lint/void.rb#136 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#167 + # source://rubocop//lib/rubocop/cop/lint/void.rb#170 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#123 + # source://rubocop//lib/rubocop/cop/lint/void.rb#125 def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#226 + # source://rubocop//lib/rubocop/cop/lint/void.rb#231 def entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#193 + # source://rubocop//lib/rubocop/cop/lint/void.rb#196 def in_void_context?(node); end end @@ -26120,12 +26150,12 @@ end # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49 RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) -# Checks for excessive nesting of conditional and looping -# constructs. +# Checks for excessive nesting of conditional and looping constructs. # -# You can configure if blocks are considered using the `CountBlocks` -# option. When set to `false` (the default) blocks are not counted -# towards the nesting level. Set to `true` to count blocks as well. +# You can configure if blocks are considered using the `CountBlocks` and `CountModifierForms` +# options. When both are set to `false` (the default) blocks and modifier forms are not +# counted towards the nesting level. Set them to `true` to include these in the nesting level +# calculation as well. # # The maximum level of nesting allowed is configurable. # @@ -26144,15 +26174,25 @@ class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#52 def consider_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#54 + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#62 def count_blocks?; end - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#50 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 + def count_if_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#66 + def count_modifier_forms?; end + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#58 def message(max); end end @@ -27019,6 +27059,36 @@ module RuboCop::Cop::MinBranchesCount def min_branches_count?(node); end end +module RuboCop::Cop::Minitest; end + +class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#37 + def on_class(class_node); end + + private + + # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#54 + def assertions_count(node); end + + # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#62 + def assertions_count_based_on_type(node); end + + # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#77 + def assertions_count_in_assignment(node); end + + # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#95 + def assertions_count_in_branches(branches); end + + # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#99 + def max_assertions; end +end + # Common code for indenting the first elements in multiline # array literals, hash literals, and method definitions. # @@ -37852,9 +37922,9 @@ RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil) # {foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar } # {foo: 1, bar: 2, baz: 3}.select {|k, v| k != :bar } # {foo: 1, bar: 2, baz: 3}.filter {|k, v| k != :bar } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[foo bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[foo bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[foo bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[bar].include?(k) } # # # good # {foo: 1, bar: 2, baz: 3}.except(:bar) @@ -37881,42 +37951,42 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#94 - def bad_method?(block); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#95 + def bad_method?(method_name, block); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#166 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#169 def decorate_source(value); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#174 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#177 def except_key(node); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#153 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#156 def except_key_source(key); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#147 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#150 def extract_body_if_negated(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#128 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#131 def included?(negated, body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#132 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135 def not_included?(negated, body); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#183 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#186 def offense_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#136 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#139 def safe_to_register_offense?(block, except_key); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#112 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#115 def semantically_except_method?(send, block); end end @@ -39828,6 +39898,7 @@ RuboCop::Cop::Style::MagicCommentFormat::MSG_VALUE = T.let(T.unsafe(nil), String RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), String) # Prefer `select` or `reject` over `map { ... }.compact`. +# This cop also handles `filter_map { ... }`, similar to `map { ... }.compact`. # # @example # @@ -39835,6 +39906,9 @@ RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), # array.map { |e| some_condition? ? e : next }.compact # # # bad +# array.filter_map { |e| some_condition? ? e : next } +# +# # bad # array.map do |e| # if some_condition? # e @@ -39861,48 +39935,60 @@ RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), # # good # array.reject { |e| some_condition? } # -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#40 +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#44 class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#46 - def map_and_compact?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#51 + def conditional_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#126 - def range(node); end + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#148 + def current(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#162 + def filter_map_range(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 + def inspect(node, block_argument_node, condition_node, return_value_node, range); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#158 + def map_with_compact_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#92 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#114 def returns_block_argument?(block_argument_node, return_value_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#118 def truthy_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#116 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#138 def truthy_branch_for_guard?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#106 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#128 def truthy_branch_for_if?(node); end end -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#43 +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#47 RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#48 +RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for usages of `each` with `<<`, `push`, or `append` which # can be replaced by `map`. # @@ -40328,110 +40414,110 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#70 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 def allowed_camel_case_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#170 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 def allowed_string_interpolation_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#220 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#225 def assignment_in_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#32 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#156 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#144 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#149 def call_in_argument_with_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#100 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#105 def call_in_literals?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#111 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#116 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#157 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 def call_in_match_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#120 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#125 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#124 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#129 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#133 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#140 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#145 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#235 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#199 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#163 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168 def hash_literal_in_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#44 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#45 def inside_endless_method_def?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#216 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -40439,20 +40525,25 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#58 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#59 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#87 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#92 def legitimate_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#195 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 def logical_operator?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#67 + def method_call_before_constant_resolution?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#41 def offense_range(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 @@ -40460,42 +40551,42 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 def parentheses_at_the_end_of_multiline_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 def regexp_slash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#49 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 def require_parentheses_for_hash_value_omission?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192 def splat?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#66 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#71 def super_call_without_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#62 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#63 def syntax_like_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 def unary_literal?(node); end end @@ -44337,7 +44428,7 @@ RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) # # String interpolation is always kept in double quotes. # -# Note: `Lint/SymbolConversion` can be used in parallel to ensure that symbols +# NOTE: `Lint/SymbolConversion` can be used in parallel to ensure that symbols # are not quoted that don't need to be. This cop is for configuring the quoting # style to use for symbols that require quotes. # @@ -45537,7 +45628,7 @@ RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of superfluous `.rb` extension in # the filename provided to `require` and `require_relative`. # -# Note: If the extension is omitted, Ruby tries adding '.rb', '.so', +# NOTE: If the extension is omitted, Ruby tries adding '.rb', '.so', # and so on to the name until found. If the file named cannot be found, # a `LoadError` will be raised. # There is an edge case where `foo.so` file is loaded instead of a `LoadError` @@ -48444,6 +48535,20 @@ RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Since the `send` method can be used to call private methods, by default, # only the `public_send` method is detected. # +# NOTE: Writer methods with names ending in `=` are always permitted because their +# behavior differs as follows: +# +# [source,ruby] +# ---- +# def foo=(foo) +# @foo = foo +# 42 +# end +# +# self.foo = 1 # => 1 +# send(:foo=, 1) # => 42 +# ---- +# # @example # # bad # obj.public_send(:method_name) @@ -48467,40 +48572,40 @@ RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # obj.method_name # -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#40 +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#68 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#76 + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#90 def allow_send?; end - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#80 + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#94 def offense_range(node); end - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#84 + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#98 def removal_argument_range(first_argument, second_argument); end end -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#46 +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#60 RuboCop::Cop::Style::SendWithLiteralMethodName::METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#43 +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#57 RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#47 +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#61 RuboCop::Cop::Style::SendWithLiteralMethodName::RESERVED_WORDS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#44 +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#58 RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#45 +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#59 RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array) # Checks for uses of `fail` and `raise`. @@ -49864,8 +49969,25 @@ end # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) -# Checks for redundant argument forwarding when calling super -# with arguments identical to the method definition. +# Checks for redundant argument forwarding when calling super with arguments identical to +# the method definition. +# +# Using zero arity `super` within a `define_method` block results in `RuntimeError`: +# +# [source,ruby] +# ---- +# def m +# define_method(:foo) { super() } # => OK +# end +# +# def m +# define_method(:foo) { super } # => RuntimeError +# end +# ---- +# +# Furthermore, any arguments accompanied by a block may potentially be delegating to +# `define_method`, therefore, `super` used within these blocks will be allowed. +# This approach might result in false negatives, yet ensuring safe detection takes precedence. # # @example # # bad @@ -49896,23 +50018,23 @@ RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) # super(&block) # end # -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#37 +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#54 class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#45 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62 def on_super(super_node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#81 def arguments_identical?(def_node, def_args, super_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#117 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#136 def block_arg_same?(def_node, def_arg, super_arg); end # Reassigning the block argument will still pass along the original block to super @@ -49920,48 +50042,43 @@ class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#128 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#147 def block_reassigned?(def_node, block_arg_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#138 - def define_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#134 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#158 def forward_arg_same?(def_arg, super_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#97 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#116 def keyword_arg_same?(def_arg, super_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#107 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#126 def keyword_rest_arg_same?(def_arg, super_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#80 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#99 def positional_arg_same?(def_arg, super_arg); end - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#87 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#106 def positional_rest_arg_same(def_arg, super_arg); end - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#144 + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#162 def preprocess_super_args(super_args); end end -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#41 +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#58 RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#40 +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#57 RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#43 +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#60 RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) # Enforces the presence of parentheses in `super` containing arguments. @@ -50274,12 +50391,12 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#267 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#274 def allow_comments?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#263 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#270 def allow_if_method_has_argument?(send_node); end # @return [Boolean] @@ -50290,19 +50407,19 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#247 def autocorrect_lambda_block(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#231 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#238 def autocorrect_with_args(corrector, node, args, method_name); end # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225 def autocorrect_without_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#253 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#260 def begin_pos_for_replacement(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#248 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#255 def block_range_with_space(node); end # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 @@ -52100,39 +52217,42 @@ class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base # implement `#size`, but not `#empty`. We ignore those to # reduce false positives. # - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#139 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#143 def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#109 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#110 def nonzero_length_comparison(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 - def other_receiver(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#134 + def other_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#102 def zero_length_comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#96 - def zero_length_predicate(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#126 + def zero_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#122 - def zero_length_receiver(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#97 + def zero_length_predicate?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#80 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#81 def check_nonzero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#65 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#66 def check_zero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#53 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#54 def check_zero_length_predicate(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#115 def replacement(node); end end @@ -52279,12 +52399,12 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#51 def errors; end - # source://rubocop//lib/rubocop/cop/team.rb#114 + # source://rubocop//lib/rubocop/cop/team.rb#122 def external_dependency_checksum; end # @deprecated # - # source://rubocop//lib/rubocop/cop/team.rb#110 + # source://rubocop//lib/rubocop/cop/team.rb#114 def forces; end # source://rubocop//lib/rubocop/cop/team.rb#76 @@ -52292,7 +52412,7 @@ class RuboCop::Cop::Team # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#81 + # source://rubocop//lib/rubocop/cop/team.rb#85 def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # Returns the value of attribute updated_source_file. @@ -52312,57 +52432,57 @@ class RuboCop::Cop::Team private - # source://rubocop//lib/rubocop/cop/team.rb#121 + # source://rubocop//lib/rubocop/cop/team.rb#129 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop//lib/rubocop/cop/team.rb#185 + # source://rubocop//lib/rubocop/cop/team.rb#193 def autocorrect_report(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#140 + # source://rubocop//lib/rubocop/cop/team.rb#148 def be_ready; end - # source://rubocop//lib/rubocop/cop/team.rb#191 + # source://rubocop//lib/rubocop/cop/team.rb#199 def collate_corrections(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#207 + # source://rubocop//lib/rubocop/cop/team.rb#215 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#259 + # source://rubocop//lib/rubocop/cop/team.rb#267 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#251 + # source://rubocop//lib/rubocop/cop/team.rb#259 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#154 + # source://rubocop//lib/rubocop/cop/team.rb#162 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#234 + # source://rubocop//lib/rubocop/cop/team.rb#242 def process_errors(file, errors); end - # source://rubocop//lib/rubocop/cop/team.rb#148 + # source://rubocop//lib/rubocop/cop/team.rb#156 def reset; end # @return [Array] # - # source://rubocop//lib/rubocop/cop/team.rb#160 + # source://rubocop//lib/rubocop/cop/team.rb#168 def roundup_relevant_cops(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#176 + # source://rubocop//lib/rubocop/cop/team.rb#184 def support_target_rails_version?(cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#170 + # source://rubocop//lib/rubocop/cop/team.rb#178 def support_target_ruby_version?(cop); end - # source://rubocop//lib/rubocop/cop/team.rb#222 + # source://rubocop//lib/rubocop/cop/team.rb#230 def suppress_clobbering; end - # source://rubocop//lib/rubocop/cop/team.rb#228 + # source://rubocop//lib/rubocop/cop/team.rb#236 def validate_config; end class << self @@ -52613,19 +52733,19 @@ module RuboCop::Cop::Util private - # source://rubocop//lib/rubocop/cop/util.rb#35 + # source://rubocop//lib/rubocop/cop/util.rb#39 def add_parentheses(node, corrector); end - # source://rubocop//lib/rubocop/cop/util.rb#56 + # source://rubocop//lib/rubocop/cop/util.rb#60 def any_descendant?(node, *types); end - # source://rubocop//lib/rubocop/cop/util.rb#71 + # source://rubocop//lib/rubocop/cop/util.rb#75 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/util.rb#83 + # source://rubocop//lib/rubocop/cop/util.rb#87 def args_end(node); end - # source://rubocop//lib/rubocop/cop/util.rb#104 + # source://rubocop//lib/rubocop/cop/util.rb#108 def begins_its_line?(range); end # This is a bad API @@ -52638,78 +52758,78 @@ module RuboCop::Cop::Util # source://rubocop//lib/rubocop/cop/util.rb#22 def comment_lines?(node); end - # source://rubocop//lib/rubocop/cop/util.rb#192 + # source://rubocop//lib/rubocop/cop/util.rb#198 def compatible_external_encoding_for?(src); end # If converting a string to Ruby string literal source code, must # double quotes be used? # - # source://rubocop//lib/rubocop/cop/util.rb#130 + # source://rubocop//lib/rubocop/cop/util.rb#134 def double_quotes_required?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#144 + # source://rubocop//lib/rubocop/cop/util.rb#148 def escape_string(string); end # Returns, for example, a bare `if` node if the given node is an `if` # with calls chained to the end of it. # - # source://rubocop//lib/rubocop/cop/util.rb#114 + # source://rubocop//lib/rubocop/cop/util.rb#118 def first_part_of_call_chain(node); end - # source://rubocop//lib/rubocop/cop/util.rb#197 + # source://rubocop//lib/rubocop/cop/util.rb#203 def include_or_equal?(source, target); end - # source://rubocop//lib/rubocop/cop/util.rb#179 + # source://rubocop//lib/rubocop/cop/util.rb#185 def indent(node, offset: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/util.rb#161 + # source://rubocop//lib/rubocop/cop/util.rb#165 def interpret_string_escapes(string); end - # source://rubocop//lib/rubocop/cop/util.rb#165 + # source://rubocop//lib/rubocop/cop/util.rb#169 def line(node_or_range); end - # source://rubocop//lib/rubocop/cop/util.rb#26 + # source://rubocop//lib/rubocop/cop/util.rb#30 def line_range(node); end - # source://rubocop//lib/rubocop/cop/util.rb#140 + # source://rubocop//lib/rubocop/cop/util.rb#144 def needs_escaping?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#87 + # source://rubocop//lib/rubocop/cop/util.rb#91 def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - # source://rubocop//lib/rubocop/cop/util.rb#30 + # source://rubocop//lib/rubocop/cop/util.rb#34 def parentheses?(node); end - # source://rubocop//lib/rubocop/cop/util.rb#173 + # source://rubocop//lib/rubocop/cop/util.rb#177 def same_line?(node1, node2); end - # source://rubocop//lib/rubocop/cop/util.rb#148 + # source://rubocop//lib/rubocop/cop/util.rb#152 def to_string_literal(string); end - # source://rubocop//lib/rubocop/cop/util.rb#185 + # source://rubocop//lib/rubocop/cop/util.rb#191 def to_supported_styles(enforced_style); end - # source://rubocop//lib/rubocop/cop/util.rb#157 + # source://rubocop//lib/rubocop/cop/util.rb#161 def trim_string_interpolation_escape_character(str); end class << self - # source://rubocop//lib/rubocop/cop/util.rb#35 + # source://rubocop//lib/rubocop/cop/util.rb#39 def add_parentheses(node, corrector); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#56 + # source://rubocop//lib/rubocop/cop/util.rb#60 def any_descendant?(node, *types); end - # source://rubocop//lib/rubocop/cop/util.rb#71 + # source://rubocop//lib/rubocop/cop/util.rb#75 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/util.rb#83 + # source://rubocop//lib/rubocop/cop/util.rb#87 def args_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#104 + # source://rubocop//lib/rubocop/cop/util.rb#108 def begins_its_line?(range); end # This is a bad API @@ -52730,62 +52850,62 @@ module RuboCop::Cop::Util # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#130 + # source://rubocop//lib/rubocop/cop/util.rb#134 def double_quotes_required?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#144 + # source://rubocop//lib/rubocop/cop/util.rb#148 def escape_string(string); end # Returns, for example, a bare `if` node if the given node is an `if` # with calls chained to the end of it. # - # source://rubocop//lib/rubocop/cop/util.rb#114 + # source://rubocop//lib/rubocop/cop/util.rb#118 def first_part_of_call_chain(node); end - # source://rubocop//lib/rubocop/cop/util.rb#179 + # source://rubocop//lib/rubocop/cop/util.rb#185 def indent(node, offset: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/util.rb#161 + # source://rubocop//lib/rubocop/cop/util.rb#165 def interpret_string_escapes(string); end - # source://rubocop//lib/rubocop/cop/util.rb#165 + # source://rubocop//lib/rubocop/cop/util.rb#169 def line(node_or_range); end - # source://rubocop//lib/rubocop/cop/util.rb#26 + # source://rubocop//lib/rubocop/cop/util.rb#30 def line_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#140 + # source://rubocop//lib/rubocop/cop/util.rb#144 def needs_escaping?(string); end # @yield [sexp] # - # source://rubocop//lib/rubocop/cop/util.rb#87 + # source://rubocop//lib/rubocop/cop/util.rb#91 def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#30 + # source://rubocop//lib/rubocop/cop/util.rb#34 def parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#173 + # source://rubocop//lib/rubocop/cop/util.rb#177 def same_line?(node1, node2); end - # source://rubocop//lib/rubocop/cop/util.rb#148 + # source://rubocop//lib/rubocop/cop/util.rb#152 def to_string_literal(string); end - # source://rubocop//lib/rubocop/cop/util.rb#185 + # source://rubocop//lib/rubocop/cop/util.rb#191 def to_supported_styles(enforced_style); end - # source://rubocop//lib/rubocop/cop/util.rb#157 + # source://rubocop//lib/rubocop/cop/util.rb#161 def trim_string_interpolation_escape_character(str); end end end -# source://rubocop//lib/rubocop/cop/util.rb#99 +# source://rubocop//lib/rubocop/cop/util.rb#103 RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) # Match literal regex characters, not including anchors, character @@ -52797,7 +52917,7 @@ RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) # Arbitrarily chosen value, should be enough to cover # the most nested source code in real world projects. # -# source://rubocop//lib/rubocop/cop/util.rb#98 +# source://rubocop//lib/rubocop/cop/util.rb#102 RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer) # source://rubocop//lib/rubocop/cop/utils/format_string.rb#5 @@ -54533,7 +54653,7 @@ module RuboCop::Ext::RegexpParser::Expression; end module RuboCop::Ext::RegexpParser::Expression::Base # Shortcut to `loc.expression` # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#27 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#26 def expression; end # E.g. @@ -54546,7 +54666,7 @@ module RuboCop::Ext::RegexpParser::Expression::Base # # Please open issue if you need other locations # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#61 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#44 def loc; end # Returns the value of attribute origin. @@ -54563,15 +54683,15 @@ module RuboCop::Ext::RegexpParser::Expression::Base private - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#67 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#50 def build_location; end end # Provide `CharacterSet` with `begin` and `end` locations. # -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#79 +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#62 module RuboCop::Ext::RegexpParser::Expression::CharacterSet - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#80 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#63 def build_location; end end @@ -55266,15 +55386,15 @@ end # This class provides helper methods used in the ERB CSS template. # -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#135 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#137 class RuboCop::Formatter::HTMLFormatter::CSSContext # Make Kernel#binding public. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#146 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#148 def binding; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#136 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#138 RuboCop::Formatter::HTMLFormatter::CSSContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) # source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 @@ -55346,60 +55466,60 @@ RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) # This class provides helper methods used in the ERB template. # -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#61 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#63 class RuboCop::Formatter::HTMLFormatter::ERBContext include ::RuboCop::PathUtil include ::RuboCop::Formatter::TextUtil # @return [ERBContext] a new instance of ERBContext # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#71 def initialize(files, summary); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#116 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#118 def base64_encoded_logo_image; end # Make Kernel#binding public. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 def binding; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#81 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83 def decorated_message(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#114 def escape(string); end # Returns the value of attribute files. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#92 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 def highlight_source_tag(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#85 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#87 def highlighted_source_line(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#108 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110 def possible_ellipses(location); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#124 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#126 def render_css; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#103 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#105 def source_after_highlight(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#98 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#100 def source_before_highlight(offense); end # Returns the value of attribute summary. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#65 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 diff --git a/sorbet/rbi/gems/spoom@1.3.2.rbi b/sorbet/rbi/gems/spoom@1.3.3.rbi similarity index 77% rename from sorbet/rbi/gems/spoom@1.3.2.rbi rename to sorbet/rbi/gems/spoom@1.3.3.rbi index 7c0b3a9..dd7de1b 100644 --- a/sorbet/rbi/gems/spoom@1.3.2.rbi +++ b/sorbet/rbi/gems/spoom@1.3.3.rbi @@ -6,7 +6,13 @@ # source://spoom//lib/spoom.rb#7 -module Spoom; end +module Spoom + class << self + # source://spoom//lib/spoom/parse.rb#13 + sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } + def parse_ruby(ruby, file:); end + end +end # source://spoom//lib/spoom/cli/helper.rb#9 module Spoom::Cli; end @@ -22,7 +28,7 @@ class Spoom::Cli::Deadcode < ::Thor def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/deadcode.rb#150 + # source://spoom//lib/spoom/cli/deadcode.rb#154 def remove(location_string); end end @@ -998,7 +1004,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end @@ -1338,7 +1344,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end @@ -1390,53 +1396,15 @@ class Spoom::Coverage::Template def html; end end -# source://spoom//lib/spoom/deadcode/visitor.rb#5 +# source://spoom//lib/spoom/deadcode/erb.rb#27 module Spoom::Deadcode class << self - # source://spoom//lib/spoom/deadcode.rb#81 - sig do - params( - index: ::Spoom::Deadcode::Index, - erb: ::String, - file: ::String, - plugins: T::Array[::Spoom::Deadcode::Plugins::Base] - ).void - end - def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode.rb#67 - sig do - params( - index: ::Spoom::Deadcode::Index, - node: ::Prism::Node, - ruby: ::String, - file: ::String, - plugins: T::Array[::Spoom::Deadcode::Plugins::Base] - ).void - end - def index_node(index, node, ruby, file:, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode.rb#75 - sig do - params( - index: ::Spoom::Deadcode::Index, - ruby: ::String, - file: ::String, - plugins: T::Array[::Spoom::Deadcode::Plugins::Base] - ).void - end - def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/plugins.rb#75 - sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + sig { params(context: ::Spoom::Context).returns(T::Array[T.class_of(Spoom::Deadcode::Plugins::Base)]) } def load_custom_plugins(context); end - # source://spoom//lib/spoom/deadcode.rb#43 - sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } - def parse_ruby(ruby, file:); end - # source://spoom//lib/spoom/deadcode/plugins.rb#61 - sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + sig { params(context: ::Spoom::Context).returns(T::Set[T.class_of(Spoom::Deadcode::Plugins::Base)]) } def plugins_from_gemfile_lock(context); end end end @@ -1454,7 +1422,7 @@ class Spoom::Deadcode::Definition < ::T::Struct const :kind, ::Spoom::Deadcode::Definition::Kind const :name, ::String const :full_name, ::String - const :location, ::Spoom::Deadcode::Location + const :location, ::Spoom::Location const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) # source://spoom//lib/spoom/deadcode/definition.rb#78 @@ -1512,7 +1480,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def to_json(*args); end class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end @@ -1572,40 +1540,35 @@ end # source://spoom//lib/spoom/deadcode/erb.rb#63 Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/deadcode.rb#21 -class Spoom::Deadcode::Error < ::Spoom::Error - abstract! -end - # source://spoom//lib/spoom/deadcode/index.rb#6 class Spoom::Deadcode::Index - # source://spoom//lib/spoom/deadcode/index.rb#16 - sig { void } - def initialize; end + # source://spoom//lib/spoom/deadcode/index.rb#29 + sig { params(model: ::Spoom::Model).void } + def initialize(model); end - # source://spoom//lib/spoom/deadcode/index.rb#51 + # source://spoom//lib/spoom/deadcode/index.rb#219 sig { returns(T::Array[::Spoom::Deadcode::Definition]) } def all_definitions; end - # source://spoom//lib/spoom/deadcode/index.rb#56 - sig { returns(T::Array[::Spoom::Deadcode::Reference]) } + # source://spoom//lib/spoom/deadcode/index.rb#224 + sig { returns(T::Array[::Spoom::Model::Reference]) } def all_references; end - # Indexing - # - # source://spoom//lib/spoom/deadcode/index.rb#24 + # source://spoom//lib/spoom/deadcode/index.rb#99 + sig { params(plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def apply_plugins!(plugins); end + + # source://spoom//lib/spoom/deadcode/index.rb#79 sig { params(definition: ::Spoom::Deadcode::Definition).void } def define(definition); end - # source://spoom//lib/spoom/deadcode/index.rb#10 + # source://spoom//lib/spoom/deadcode/index.rb#23 sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } def definitions; end # Utils # - # source://spoom//lib/spoom/deadcode/index.rb#46 + # source://spoom//lib/spoom/deadcode/index.rb#214 sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } def definitions_for_name(name); end @@ -1613,324 +1576,111 @@ class Spoom::Deadcode::Index # # To be called once all the files have been indexed and all the definitions and references discovered. # - # source://spoom//lib/spoom/deadcode/index.rb#37 + # source://spoom//lib/spoom/deadcode/index.rb#122 sig { void } def finalize!; end - # source://spoom//lib/spoom/deadcode/index.rb#29 - sig { params(reference: ::Spoom::Deadcode::Reference).void } - def reference(reference); end + # source://spoom//lib/spoom/deadcode/index.rb#94 + sig { params(symbol_def: ::Spoom::Model::SymbolDef).void } + def ignore(symbol_def); end - # source://spoom//lib/spoom/deadcode/index.rb#13 - sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) } + # source://spoom//lib/spoom/deadcode/index.rb#50 + sig { params(erb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_erb(erb, file:, plugins: T.unsafe(nil)); end + + # Indexing + # + # source://spoom//lib/spoom/deadcode/index.rb#39 + sig { params(file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_file(file, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/index.rb#55 + sig { params(rb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_ruby(rb, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/index.rb#20 + sig { returns(::Spoom::Model) } + def model; end + + # source://spoom//lib/spoom/deadcode/index.rb#84 + sig { params(name: ::String, location: ::Spoom::Location).void } + def reference_constant(name, location); end + + # source://spoom//lib/spoom/deadcode/index.rb#89 + sig { params(name: ::String, location: ::Spoom::Location).void } + def reference_method(name, location); end + + # source://spoom//lib/spoom/deadcode/index.rb#26 + sig { returns(T::Hash[::String, T::Array[::Spoom::Model::Reference]]) } def references; end end +# source://spoom//lib/spoom/deadcode/index.rb#9 +class Spoom::Deadcode::Index::Error < ::Spoom::Error + # source://spoom//lib/spoom/deadcode/index.rb#13 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end + # source://spoom//lib/spoom/deadcode/indexer.rb#6 -class Spoom::Deadcode::Indexer < ::Spoom::Deadcode::Visitor +class Spoom::Deadcode::Indexer < ::Spoom::Visitor # source://spoom//lib/spoom/deadcode/indexer.rb#16 sig do params( path: ::String, - source: ::String, index: ::Spoom::Deadcode::Index, plugins: T::Array[::Spoom::Deadcode::Plugins::Base] ).void end - def initialize(path, source, index, plugins: T.unsafe(nil)); end - - # Context - # - # source://spoom//lib/spoom/deadcode/indexer.rb#408 - sig { returns(::Prism::Node) } - def current_node; end - - # Definition indexing - # - # source://spoom//lib/spoom/deadcode/indexer.rb#322 - sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } - def define_attr_reader(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#334 - sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } - def define_attr_writer(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#346 - sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } - def define_class(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#358 - sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } - def define_constant(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#370 - sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } - def define_method(name, full_name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#382 - sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } - def define_module(name, full_name, node); end + def initialize(path, index, plugins: T.unsafe(nil)); end # source://spoom//lib/spoom/deadcode/indexer.rb#13 sig { returns(::Spoom::Deadcode::Index) } def index; end - # source://spoom//lib/spoom/deadcode/indexer.rb#453 - sig { returns(T.nilable(::String)) } - def last_sig; end - - # source://spoom//lib/spoom/deadcode/indexer.rb#427 - sig { returns(T.nilable(::Prism::BlockNode)) } - def nesting_block; end - - # source://spoom//lib/spoom/deadcode/indexer.rb#432 - sig { returns(T.nilable(::Prism::CallNode)) } - def nesting_call; end - - # source://spoom//lib/spoom/deadcode/indexer.rb#422 - sig { returns(T.nilable(::Prism::ClassNode)) } - def nesting_class; end - - # source://spoom//lib/spoom/deadcode/indexer.rb#437 - sig { returns(T.nilable(::String)) } - def nesting_class_name; end - - # source://spoom//lib/spoom/deadcode/indexer.rb#445 - sig { returns(T.nilable(::String)) } - def nesting_class_superclass_name; end - - # source://spoom//lib/spoom/deadcode/indexer.rb#413 - sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) } - def nesting_node(type); end - - # Node utils - # - # source://spoom//lib/spoom/deadcode/indexer.rb#464 - sig { params(node: ::Prism::Node).returns(::Spoom::Deadcode::Location) } - def node_location(node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#10 sig { returns(::String) } def path; end - # Reference indexing - # - # source://spoom//lib/spoom/deadcode/indexer.rb#396 - sig { params(name: ::String, node: ::Prism::Node).void } - def reference_constant(name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#401 - sig { params(name: ::String, node: ::Prism::Node).void } - def reference_method(name, node); end - # Visit # - # source://spoom//lib/spoom/deadcode/indexer.rb#35 - sig { override.params(node: T.nilable(::Prism::Node)).void } - def visit(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#45 - sig { override.params(node: ::Prism::AliasMethodNode).void } - def visit_alias_method_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#50 - sig { override.params(node: ::Prism::AndNode).void } - def visit_and_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#56 - sig { override.params(node: ::Prism::BlockArgumentNode).void } - def visit_block_argument_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#67 - sig { override.params(node: ::Prism::CallAndWriteNode).void } - def visit_call_and_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#91 + # source://spoom//lib/spoom/deadcode/indexer.rb#27 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#75 - sig { override.params(node: ::Prism::CallOperatorWriteNode).void } - def visit_call_operator_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#83 - sig { override.params(node: ::Prism::CallOrWriteNode).void } - def visit_call_or_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#104 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#137 - sig { override.params(node: ::Prism::ConstantAndWriteNode).void } - def visit_constant_and_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#143 - sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } - def visit_constant_operator_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#149 - sig { override.params(node: ::Prism::ConstantOrWriteNode).void } - def visit_constant_or_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#155 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#173 - sig { override.params(node: ::Prism::ConstantReadNode).void } - def visit_constant_read_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#178 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#186 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#194 - sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } - def visit_local_variable_and_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#202 - sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } - def visit_local_variable_operator_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#210 - sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } - def visit_local_variable_or_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#218 - sig { override.params(node: ::Prism::LocalVariableWriteNode).void } - def visit_local_variable_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#224 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#254 - sig { override.params(node: ::Prism::MultiWriteNode).void } - def visit_multi_write_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#268 - sig { override.params(node: ::Prism::OrNode).void } - def visit_or_node(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#274 - sig { params(send: ::Spoom::Deadcode::Send).void } - def visit_send(send); end -end - -# source://spoom//lib/spoom/deadcode.rb#29 -class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error - # source://spoom//lib/spoom/deadcode.rb#33 - sig { params(message: ::String, parent: ::Exception).void } - def initialize(message, parent:); end -end - -# source://spoom//lib/spoom/deadcode/location.rb#6 -class Spoom::Deadcode::Location - include ::Comparable - - # source://spoom//lib/spoom/deadcode/location.rb#54 - sig do - params( - file: ::String, - start_line: ::Integer, - start_column: ::Integer, - end_line: ::Integer, - end_column: ::Integer - ).void - end - def initialize(file, start_line, start_column, end_line, end_column); end - - # source://spoom//lib/spoom/deadcode/location.rb#74 - sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } - def <=>(other); end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def end_column; end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def end_line; end - - # source://spoom//lib/spoom/deadcode/location.rb#40 - sig { returns(::String) } - def file; end - - # source://spoom//lib/spoom/deadcode/location.rb#63 - sig { params(other: ::Spoom::Deadcode::Location).returns(T::Boolean) } - def include?(other); end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def start_column; end - - # source://spoom//lib/spoom/deadcode/location.rb#43 - sig { returns(::Integer) } - def start_line; end - - # source://spoom//lib/spoom/deadcode/location.rb#81 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/deadcode/location.rb#34 - sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Deadcode::Location) } - def from_prism(file, location); end - - # @raise [LocationError] - # - # source://spoom//lib/spoom/deadcode/location.rb#17 - sig { params(location_string: ::String).returns(::Spoom::Deadcode::Location) } - def from_string(location_string); end - end end -# source://spoom//lib/spoom/deadcode/location.rb#11 -class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end - # source://spoom//lib/spoom/deadcode/plugins.rb#36 Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) -# source://spoom//lib/spoom/deadcode.rb#27 -class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#8 module Spoom::Deadcode::Plugins; end # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7 class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#7 class Spoom::Deadcode::Plugins::ActionMailerPreview < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#13 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end end # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7 class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end - # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#39 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end -# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#10 +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#12 Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array) # source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7 @@ -1939,15 +1689,15 @@ class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; en # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7 class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7 class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64 @@ -1962,8 +1712,8 @@ Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Arra # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7 class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#22 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#19 @@ -1975,41 +1725,43 @@ Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.un class Spoom::Deadcode::Plugins::Base abstract! + # source://spoom//lib/spoom/deadcode/plugins/base.rb#132 + sig { params(index: ::Spoom::Deadcode::Index).void } + def initialize(index); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#129 + sig { returns(::Spoom::Deadcode::Index) } + def index; end + # Do not override this method, use `on_define_accessor` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#150 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_accessor(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#158 + sig { params(definition: ::Spoom::Model::Attr).void } + def internal_on_define_accessor(definition); end # Do not override this method, use `on_define_class` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#174 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_class(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#182 + sig { params(definition: ::Spoom::Model::Class).void } + def internal_on_define_class(definition); end # Do not override this method, use `on_define_constant` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#204 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_constant(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#212 + sig { params(definition: ::Spoom::Model::Constant).void } + def internal_on_define_constant(definition); end # Do not override this method, use `on_define_method` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_method(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#238 + sig { params(definition: ::Spoom::Model::Method).void } + def internal_on_define_method(definition); end # Do not override this method, use `on_define_module` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_module(indexer, definition); end - - # Do not override this method, use `on_send` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def internal_on_send(indexer, send); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#264 + sig { params(definition: ::Spoom::Model::Module).void } + def internal_on_define_module(definition); end # Called when an accessor is defined. # @@ -2019,15 +1771,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_accessor(indexer, definition) - # definition.ignored! if definition.name == "foo" + # def on_define_accessor(definition) + # @index.ignore(definition) if symbol_def.name == "foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#144 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_accessor(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#152 + sig { params(definition: ::Spoom::Model::Attr).void } + def on_define_accessor(definition); end # Called when a class is defined. # @@ -2037,15 +1789,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_class(indexer, definition) - # definition.ignored! if definition.name == "Foo" + # def on_define_class(definition) + # @index.ignore(definition) if definition.name == "Foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#168 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#176 + sig { params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # Called when a constant is defined. # @@ -2055,15 +1807,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_constant(indexer, definition) - # definition.ignored! if definition.name == "FOO" + # def on_define_constant(definition) + # @index.ignore(definition) if definition.name == "FOO" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#198 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#206 + sig { params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end # Called when a method is defined. # @@ -2073,17 +1825,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_method(indexer, definition) - # super # So the `ignore_method_names` DSL is still applied - # - # definition.ignored! if definition.name == "foo" + # def on_define_method(definition) + # @index.ignore(definition) if definition.name == "foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#226 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 + sig { params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end # Called when a module is defined. # @@ -2093,76 +1843,80 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_module(indexer, definition) - # definition.ignored! if definition.name == "Foo" + # def on_define_module(definition) + # @index.ignore(definition) if definition.name == "Foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#252 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 + sig { params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end # Called when a send is being processed # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_send(indexer, send) + # def on_send(send) # return unless send.name == "dsl_method" # return if send.args.empty? # # method_name = send.args.first.slice.delete_prefix(":") - # indexer.reference_method(method_name, send.node) + # @index.reference_method(method_name, send.node, send.loc) # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#278 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 + sig { params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end private # Plugin utils # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#339 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#352 sig { params(name: ::String).returns(::String) } def camelize(name); end - # DSL support - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#301 sig { params(name: T.nilable(::String)).returns(T::Boolean) } def ignored_class_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#307 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#320 sig { params(name: ::String).returns(T::Boolean) } def ignored_constant_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#312 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#325 sig { params(name: ::String).returns(T::Boolean) } def ignored_method_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#317 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#330 sig { params(name: ::String).returns(T::Boolean) } def ignored_module_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#322 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#335 sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) } def ignored_name?(name, names_variable, patterns_variable); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#300 - sig { params(superclass_name: T.nilable(::String)).returns(T::Boolean) } - def ignored_subclass?(superclass_name); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#308 + sig { params(definition: ::Spoom::Model::Class).returns(T::Boolean) } + def ignored_subclass?(definition); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#327 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#340 sig { params(const: ::Symbol).returns(T::Set[::String]) } def names(const); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#332 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#345 sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } def patterns(const); end + # DSL support + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + sig { params(definition: ::Spoom::Model::Namespace, superclass_name: ::String).returns(T::Boolean) } + def subclass_of?(definition, superclass_name); end + class << self # Mark classes directly subclassing a class matching `names` as ignored. # @@ -2271,32 +2025,32 @@ end # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#7 class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#28 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#7 class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end end # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7 class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end private # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23 - sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } - def used_as_namespace?(indexer); end + sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } + def used_as_namespace?(symbol_def); end end # source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7 @@ -2305,18 +2059,18 @@ class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end # source://spoom//lib/spoom/deadcode/plugins/rails.rb#7 class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/rails.rb#13 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # source://spoom//lib/spoom/deadcode/plugins/rails.rb#18 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end private # source://spoom//lib/spoom/deadcode/plugins/rails.rb#25 - sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } - def file_is_helper?(indexer); end + sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } + def file_is_helper?(symbol_def); end end # source://spoom//lib/spoom/deadcode/plugins/rake.rb#7 @@ -2325,22 +2079,12 @@ class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#7 class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#18 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#23 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end - - private - - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#30 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def rubocop_constant?(indexer, definition); end - - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#35 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def rubocop_method?(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#26 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end end # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10 @@ -2349,74 +2093,42 @@ Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set) # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7 class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end private # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#43 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } - def reference_symbol_as_constant(indexer, send, node); end + sig { params(send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } + def reference_symbol_as_constant(send, node); end end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7 class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end private - # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#34 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def sorbet_enum_constant?(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#28 + sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } + def sorbet_enum_constant?(definition); end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def sorbet_type_member?(indexer, definition); end + sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } + def sorbet_type_member?(definition); end end # source://spoom//lib/spoom/deadcode/plugins/thor.rb#7 class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/thor.rb#13 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end -end - -# A reference is a call to a method or a constant -# -# source://spoom//lib/spoom/deadcode/reference.rb#7 -class Spoom::Deadcode::Reference < ::T::Struct - const :kind, ::Spoom::Deadcode::Reference::Kind - const :name, ::String - const :location, ::Spoom::Deadcode::Location - - # Kind - # - # source://spoom//lib/spoom/deadcode/reference.rb#24 - sig { returns(T::Boolean) } - def constant?; end - - # source://spoom//lib/spoom/deadcode/reference.rb#29 - sig { returns(T::Boolean) } - def method?; end - - class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/deadcode/reference.rb#10 -class Spoom::Deadcode::Reference::Kind < ::T::Enum - enums do - Constant = new - Method = new - end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end end # source://spoom//lib/spoom/deadcode/remover.rb#6 @@ -2426,12 +2138,7 @@ class Spoom::Deadcode::Remover def initialize(context); end # source://spoom//lib/spoom/deadcode/remover.rb#17 - sig do - params( - kind: T.nilable(::Spoom::Deadcode::Definition::Kind), - location: ::Spoom::Deadcode::Location - ).returns(::String) - end + sig { params(kind: T.nilable(::Spoom::Deadcode::Definition::Kind), location: ::Spoom::Location).returns(::String) } def remove_location(kind, location); end end @@ -2484,6 +2191,8 @@ class Spoom::Deadcode::Remover::NodeContext sig { returns(T.nilable(::Prism::Node)) } def next_node; end + # @raise [Error] + # # source://spoom//lib/spoom/deadcode/remover.rb#433 sig { returns(T::Array[::Prism::Node]) } def next_nodes; end @@ -2492,10 +2201,14 @@ class Spoom::Deadcode::Remover::NodeContext sig { returns(::Prism::Node) } def node; end + # @raise [Error] + # # source://spoom//lib/spoom/deadcode/remover.rb#408 sig { returns(::Spoom::Deadcode::Remover::NodeContext) } def parent_context; end + # @raise [Error] + # # source://spoom//lib/spoom/deadcode/remover.rb#400 sig { returns(::Prism::Node) } def parent_node; end @@ -2504,6 +2217,8 @@ class Spoom::Deadcode::Remover::NodeContext sig { returns(T.nilable(::Prism::Node)) } def previous_node; end + # @raise [Error] + # # source://spoom//lib/spoom/deadcode/remover.rb#417 sig { returns(T::Array[::Prism::Node]) } def previous_nodes; end @@ -2522,9 +2237,9 @@ class Spoom::Deadcode::Remover::NodeContext end # source://spoom//lib/spoom/deadcode/remover.rb#549 -class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Deadcode::Visitor +class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor # source://spoom//lib/spoom/deadcode/remover.rb#621 - sig { params(location: ::Spoom::Deadcode::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } + sig { params(location: ::Spoom::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } def initialize(location, kind); end # source://spoom//lib/spoom/deadcode/remover.rb#615 @@ -2544,7 +2259,7 @@ class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Deadcode::Visitor sig do params( source: ::String, - location: ::Spoom::Deadcode::Location, + location: ::Spoom::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind) ).returns(::Spoom::Deadcode::Remover::NodeContext) end @@ -2563,7 +2278,7 @@ class Spoom::Deadcode::Remover::NodeRemover params( source: ::String, kind: T.nilable(::Spoom::Deadcode::Definition::Kind), - location: ::Spoom::Deadcode::Location + location: ::Spoom::Location ).void end def initialize(source, kind, location); end @@ -2632,8 +2347,9 @@ class Spoom::Deadcode::Send < ::T::Struct const :recv, T.nilable(::Prism::Node), default: T.unsafe(nil) const :args, T::Array[::Prism::Node], default: T.unsafe(nil) const :block, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :location, ::Spoom::Location - # source://spoom//lib/spoom/deadcode/send.rb#21 + # source://spoom//lib/spoom/deadcode/send.rb#22 sig do type_parameters(:T) .params( @@ -2643,1337 +2359,1518 @@ class Spoom::Deadcode::Send < ::T::Struct end def each_arg(arg_type, &block); end - # source://spoom//lib/spoom/deadcode/send.rb#28 + # source://spoom//lib/spoom/deadcode/send.rb#29 sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void } def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end -# source://spoom//lib/spoom/deadcode/visitor.rb#6 -class Spoom::Deadcode::Visitor < ::Prism::Visitor - # source://spoom//lib/spoom/deadcode/visitor.rb#15 - sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } - def visit_alias_global_variable_node(node); end - - # source://spoom//lib/spoom/deadcode/visitor.rb#20 - sig { override.params(node: ::Prism::AliasMethodNode).void } - def visit_alias_method_node(node); end +# source://spoom//lib/spoom.rb#12 +class Spoom::Error < ::StandardError; end - # source://spoom//lib/spoom/deadcode/visitor.rb#25 - sig { override.params(node: ::Prism::AlternationPatternNode).void } - def visit_alternation_pattern_node(node); end +# source://spoom//lib/spoom/context/exec.rb#5 +class Spoom::ExecResult < ::T::Struct + const :out, ::String + const :err, T.nilable(::String) + const :status, T::Boolean + const :exit_code, ::Integer - # source://spoom//lib/spoom/deadcode/visitor.rb#30 - sig { override.params(node: ::Prism::AndNode).void } - def visit_and_node(node); end + # source://spoom//lib/spoom/context/exec.rb#14 + sig { returns(::String) } + def to_s; end - # source://spoom//lib/spoom/deadcode/visitor.rb#35 - sig { override.params(node: ::Prism::ArgumentsNode).void } - def visit_arguments_node(node); end + class << self + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#40 - sig { override.params(node: ::Prism::ArrayNode).void } - def visit_array_node(node); end +# source://spoom//lib/spoom/file_collector.rb#5 +class Spoom::FileCollector + # Initialize a new file collector + # + # If `allow_extensions` is empty, all files are collected. + # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected. + # + # If `allow_mime_types` is empty, all files are collected. + # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in + # the list. + # + # source://spoom//lib/spoom/file_collector.rb#26 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).void + end + def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/visitor.rb#45 - sig { override.params(node: ::Prism::ArrayPatternNode).void } - def visit_array_pattern_node(node); end + # source://spoom//lib/spoom/file_collector.rb#9 + sig { returns(T::Array[::String]) } + def files; end - # source://spoom//lib/spoom/deadcode/visitor.rb#50 - sig { override.params(node: ::Prism::AssocNode).void } - def visit_assoc_node(node); end + # source://spoom//lib/spoom/file_collector.rb#39 + sig { params(path: ::String).void } + def visit_path(path); end - # source://spoom//lib/spoom/deadcode/visitor.rb#55 - sig { override.params(node: ::Prism::AssocSplatNode).void } - def visit_assoc_splat_node(node); end + # source://spoom//lib/spoom/file_collector.rb#34 + sig { params(paths: T::Array[::String]).void } + def visit_paths(paths); end - # source://spoom//lib/spoom/deadcode/visitor.rb#60 - sig { override.params(node: ::Prism::BackReferenceReadNode).void } - def visit_back_reference_read_node(node); end + private - # source://spoom//lib/spoom/deadcode/visitor.rb#65 - sig { override.params(node: ::Prism::BeginNode).void } - def visit_begin_node(node); end + # source://spoom//lib/spoom/file_collector.rb#56 + sig { params(path: ::String).returns(::String) } + def clean_path(path); end - # source://spoom//lib/spoom/deadcode/visitor.rb#70 - sig { override.params(node: ::Prism::BlockArgumentNode).void } - def visit_block_argument_node(node); end + # source://spoom//lib/spoom/file_collector.rb#73 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_file?(path); end - # source://spoom//lib/spoom/deadcode/visitor.rb#75 - sig { override.params(node: ::Prism::BlockLocalVariableNode).void } - def visit_block_local_variable_node(node); end + # source://spoom//lib/spoom/file_collector.rb#88 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_path?(path); end - # source://spoom//lib/spoom/deadcode/visitor.rb#80 - sig { override.params(node: ::Prism::BlockNode).void } - def visit_block_node(node); end + # source://spoom//lib/spoom/file_collector.rb#97 + sig { params(path: ::String).returns(T.nilable(::String)) } + def mime_type_for(path); end - # source://spoom//lib/spoom/deadcode/visitor.rb#85 - sig { override.params(node: ::Prism::BlockParameterNode).void } - def visit_block_parameter_node(node); end + # source://spoom//lib/spoom/file_collector.rb#68 + sig { params(path: ::String).void } + def visit_directory(path); end - # source://spoom//lib/spoom/deadcode/visitor.rb#90 - sig { override.params(node: ::Prism::BlockParametersNode).void } - def visit_block_parameters_node(node); end + # source://spoom//lib/spoom/file_collector.rb#61 + sig { params(path: ::String).void } + def visit_file(path); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#95 - sig { override.params(node: ::Prism::BreakNode).void } - def visit_break_node(node); end +# Build a file hierarchy from a set of file paths. +# +# source://spoom//lib/spoom/file_tree.rb#6 +class Spoom::FileTree + # source://spoom//lib/spoom/file_tree.rb#10 + sig { params(paths: T::Enumerable[::String]).void } + def initialize(paths = T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/visitor.rb#100 - sig { override.params(node: ::Prism::CallAndWriteNode).void } - def visit_call_and_write_node(node); end + # Add a `path` to the tree + # + # This will create all nodes until the root of `path`. + # + # source://spoom//lib/spoom/file_tree.rb#25 + sig { params(path: ::String).returns(::Spoom::FileTree::Node) } + def add_path(path); end - # source://spoom//lib/spoom/deadcode/visitor.rb#105 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end + # Add all `paths` to the tree + # + # source://spoom//lib/spoom/file_tree.rb#17 + sig { params(paths: T::Enumerable[::String]).void } + def add_paths(paths); end - # source://spoom//lib/spoom/deadcode/visitor.rb#110 - sig { override.params(node: ::Prism::CallOperatorWriteNode).void } - def visit_call_operator_write_node(node); end + # All the nodes in this tree + # + # source://spoom//lib/spoom/file_tree.rb#45 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end - # source://spoom//lib/spoom/deadcode/visitor.rb#115 - sig { override.params(node: ::Prism::CallOrWriteNode).void } - def visit_call_or_write_node(node); end + # Return a map of typing scores for each node in the tree + # + # source://spoom//lib/spoom/file_tree.rb#59 + sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def nodes_strictness_scores(context); end - # source://spoom//lib/spoom/deadcode/visitor.rb#120 - sig { override.params(node: ::Prism::CallTargetNode).void } - def visit_call_target_node(node); end + # All the paths in this tree + # + # source://spoom//lib/spoom/file_tree.rb#53 + sig { returns(T::Array[::String]) } + def paths; end - # source://spoom//lib/spoom/deadcode/visitor.rb#125 - sig { override.params(node: ::Prism::CapturePatternNode).void } - def visit_capture_pattern_node(node); end + # Return a map of typing scores for each path in the tree + # + # source://spoom//lib/spoom/file_tree.rb#67 + sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } + def paths_strictness_scores(context); end - # source://spoom//lib/spoom/deadcode/visitor.rb#130 - sig { override.params(node: ::Prism::CaseMatchNode).void } - def visit_case_match_node(node); end + # source://spoom//lib/spoom/file_tree.rb#72 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } + def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/visitor.rb#135 - sig { override.params(node: ::Prism::CaseNode).void } - def visit_case_node(node); end + # All root nodes + # + # source://spoom//lib/spoom/file_tree.rb#39 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def roots; end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#10 - sig { override.params(node: ::Prism::Node).void } - def visit_child_nodes(node); end +# A visitor that collects all the nodes in a tree +# +# source://spoom//lib/spoom/file_tree.rb#124 +class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#131 + sig { void } + def initialize; end - # source://spoom//lib/spoom/deadcode/visitor.rb#140 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end + # source://spoom//lib/spoom/file_tree.rb#128 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end - # source://spoom//lib/spoom/deadcode/visitor.rb#145 - sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } - def visit_class_variable_and_write_node(node); end + # source://spoom//lib/spoom/file_tree.rb#137 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#150 - sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } - def visit_class_variable_operator_write_node(node); end +# A visitor that collects the typing score of each node in a tree +# +# source://spoom//lib/spoom/file_tree.rb#167 +class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses + # source://spoom//lib/spoom/file_tree.rb#174 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end - # source://spoom//lib/spoom/deadcode/visitor.rb#155 - sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } - def visit_class_variable_or_write_node(node); end + # source://spoom//lib/spoom/file_tree.rb#171 + sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def scores; end - # source://spoom//lib/spoom/deadcode/visitor.rb#160 - sig { override.params(node: ::Prism::ClassVariableReadNode).void } - def visit_class_variable_read_node(node); end + # source://spoom//lib/spoom/file_tree.rb#181 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end - # source://spoom//lib/spoom/deadcode/visitor.rb#165 - sig { override.params(node: ::Prism::ClassVariableTargetNode).void } - def visit_class_variable_target_node(node); end + private - # source://spoom//lib/spoom/deadcode/visitor.rb#170 - sig { override.params(node: ::Prism::ClassVariableWriteNode).void } - def visit_class_variable_write_node(node); end + # source://spoom//lib/spoom/file_tree.rb#190 + sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } + def node_score(node); end - # source://spoom//lib/spoom/deadcode/visitor.rb#175 - sig { override.params(node: ::Prism::ConstantAndWriteNode).void } - def visit_constant_and_write_node(node); end + # source://spoom//lib/spoom/file_tree.rb#199 + sig { params(strictness: T.nilable(::String)).returns(::Float) } + def strictness_score(strictness); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#180 - sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } - def visit_constant_operator_write_node(node); end +# A visitor that collects the strictness of each node in a tree +# +# source://spoom//lib/spoom/file_tree.rb#144 +class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#151 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end - # source://spoom//lib/spoom/deadcode/visitor.rb#185 - sig { override.params(node: ::Prism::ConstantOrWriteNode).void } - def visit_constant_or_write_node(node); end + # source://spoom//lib/spoom/file_tree.rb#148 + sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } + def strictnesses; end - # source://spoom//lib/spoom/deadcode/visitor.rb#190 - sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } - def visit_constant_path_and_write_node(node); end + # source://spoom//lib/spoom/file_tree.rb#158 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#195 - sig { override.params(node: ::Prism::ConstantPathNode).void } - def visit_constant_path_node(node); end +# A node representing either a file or a directory inside a FileTree +# +# source://spoom//lib/spoom/file_tree.rb#78 +class Spoom::FileTree::Node < ::T::Struct + const :parent, T.nilable(::Spoom::FileTree::Node) + const :name, ::String + const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil) - # source://spoom//lib/spoom/deadcode/visitor.rb#200 - sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } - def visit_constant_path_operator_write_node(node); end + # Full path to this node from root + # + # source://spoom//lib/spoom/file_tree.rb#92 + sig { returns(::String) } + def path; end - # source://spoom//lib/spoom/deadcode/visitor.rb#205 - sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } - def visit_constant_path_or_write_node(node); end + class << self + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#210 - sig { override.params(node: ::Prism::ConstantPathTargetNode).void } - def visit_constant_path_target_node(node); end +# An internal class used to print a FileTree +# +# See `FileTree#print` +# +# source://spoom//lib/spoom/file_tree.rb#212 +class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#222 + sig do + params( + strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + out: T.any(::IO, ::StringIO), + colors: T::Boolean + ).void + end + def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/visitor.rb#215 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end + # source://spoom//lib/spoom/file_tree.rb#230 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end - # source://spoom//lib/spoom/deadcode/visitor.rb#220 - sig { override.params(node: ::Prism::ConstantReadNode).void } - def visit_constant_read_node(node); end + private - # source://spoom//lib/spoom/deadcode/visitor.rb#225 - sig { override.params(node: ::Prism::ConstantTargetNode).void } - def visit_constant_target_node(node); end + # source://spoom//lib/spoom/file_tree.rb#255 + sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } + def strictness_color(strictness); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#230 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end +# An abstract visitor for FileTree +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/file_tree.rb#101 +class Spoom::FileTree::Visitor + abstract! - # source://spoom//lib/spoom/deadcode/visitor.rb#235 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end + # source://spoom//lib/spoom/file_tree.rb#113 + sig { params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end - # source://spoom//lib/spoom/deadcode/visitor.rb#240 - sig { override.params(node: ::Prism::DefinedNode).void } - def visit_defined_node(node); end + # source://spoom//lib/spoom/file_tree.rb#118 + sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } + def visit_nodes(nodes); end - # source://spoom//lib/spoom/deadcode/visitor.rb#245 - sig { override.params(node: ::Prism::ElseNode).void } - def visit_else_node(node); end + # source://spoom//lib/spoom/file_tree.rb#108 + sig { params(tree: ::Spoom::FileTree).void } + def visit_tree(tree); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#250 - sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } - def visit_embedded_statements_node(node); end +# source://spoom//lib/spoom/context/git.rb#5 +module Spoom::Git; end - # source://spoom//lib/spoom/deadcode/visitor.rb#255 - sig { override.params(node: ::Prism::EmbeddedVariableNode).void } - def visit_embedded_variable_node(node); end +# source://spoom//lib/spoom/context/git.rb#6 +class Spoom::Git::Commit < ::T::Struct + const :sha, ::String + const :time, ::Time - # source://spoom//lib/spoom/deadcode/visitor.rb#260 - sig { override.params(node: ::Prism::EnsureNode).void } - def visit_ensure_node(node); end + # source://spoom//lib/spoom/context/git.rb#27 + sig { returns(::Integer) } + def timestamp; end - # source://spoom//lib/spoom/deadcode/visitor.rb#265 - sig { override.params(node: ::Prism::FalseNode).void } - def visit_false_node(node); end + class << self + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end - # source://spoom//lib/spoom/deadcode/visitor.rb#270 - sig { override.params(node: ::Prism::FindPatternNode).void } - def visit_find_pattern_node(node); end + # Parse a line formatted as `%h %at` into a `Commit` + # + # source://spoom//lib/spoom/context/git.rb#14 + sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } + def parse_line(string); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#275 - sig { override.params(node: ::Prism::FlipFlopNode).void } - def visit_flip_flop_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/base.rb#5 +module Spoom::LSP; end - # source://spoom//lib/spoom/deadcode/visitor.rb#280 - sig { override.params(node: ::Prism::FloatNode).void } - def visit_float_node(node); end +# source://spoom//lib/spoom/sorbet/lsp.rb#13 +class Spoom::LSP::Client + # source://spoom//lib/spoom/sorbet/lsp.rb#17 + sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void } + def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/visitor.rb#285 - sig { override.params(node: ::Prism::ForNode).void } - def visit_for_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#229 + sig { void } + def close; end - # source://spoom//lib/spoom/deadcode/visitor.rb#290 - sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } - def visit_forwarding_arguments_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#131 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def definitions(uri, line, column); end - # source://spoom//lib/spoom/deadcode/visitor.rb#295 - sig { override.params(node: ::Prism::ForwardingParameterNode).void } - def visit_forwarding_parameter_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#212 + sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def document_symbols(uri); end - # source://spoom//lib/spoom/deadcode/visitor.rb#300 - sig { override.params(node: ::Prism::ForwardingSuperNode).void } - def visit_forwarding_super_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#89 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) } + def hover(uri, line, column); end - # source://spoom//lib/spoom/deadcode/visitor.rb#305 - sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } - def visit_global_variable_and_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#27 + sig { returns(::Integer) } + def next_id; end - # source://spoom//lib/spoom/deadcode/visitor.rb#310 - sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } - def visit_global_variable_operator_write_node(node); end + # LSP requests + # + # @raise [Error::AlreadyOpen] + # + # source://spoom//lib/spoom/sorbet/lsp.rb#72 + sig { params(workspace_path: ::String).void } + def open(workspace_path); end - # source://spoom//lib/spoom/deadcode/visitor.rb#315 - sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } - def visit_global_variable_or_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#54 + sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def read; end - # source://spoom//lib/spoom/deadcode/visitor.rb#320 - sig { override.params(node: ::Prism::GlobalVariableReadNode).void } - def visit_global_variable_read_node(node); end + # @raise [Error::BadHeaders] + # + # source://spoom//lib/spoom/sorbet/lsp.rb#43 + sig { returns(T.nilable(::String)) } + def read_raw; end - # source://spoom//lib/spoom/deadcode/visitor.rb#325 - sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } - def visit_global_variable_target_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#173 + sig do + params( + uri: ::String, + line: ::Integer, + column: ::Integer, + include_decl: T::Boolean + ).returns(T::Array[::Spoom::LSP::Location]) + end + def references(uri, line, column, include_decl = T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/visitor.rb#330 - sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } - def visit_global_variable_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#37 + sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def send(message); end - # source://spoom//lib/spoom/deadcode/visitor.rb#335 - sig { override.params(node: ::Prism::HashNode).void } - def visit_hash_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#32 + sig { params(json_string: ::String).void } + def send_raw(json_string); end - # source://spoom//lib/spoom/deadcode/visitor.rb#340 - sig { override.params(node: ::Prism::HashPatternNode).void } - def visit_hash_pattern_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#110 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) } + def signatures(uri, line, column); end - # source://spoom//lib/spoom/deadcode/visitor.rb#345 - sig { override.params(node: ::Prism::IfNode).void } - def visit_if_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#197 + sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def symbols(query); end - # source://spoom//lib/spoom/deadcode/visitor.rb#350 - sig { override.params(node: ::Prism::ImaginaryNode).void } - def visit_imaginary_node(node); end + # source://spoom//lib/spoom/sorbet/lsp.rb#152 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def type_definitions(uri, line, column); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#355 - sig { override.params(node: ::Prism::ImplicitNode).void } - def visit_implicit_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#178 +class Spoom::LSP::Diagnostic < ::T::Struct + include ::Spoom::LSP::PrintableSymbol - # source://spoom//lib/spoom/deadcode/visitor.rb#360 - sig { override.params(node: ::Prism::ImplicitRestNode).void } - def visit_implicit_rest_node(node); end + const :range, ::Spoom::LSP::Range + const :code, ::Integer + const :message, ::String + const :information, ::Object - # source://spoom//lib/spoom/deadcode/visitor.rb#365 - sig { override.params(node: ::Prism::InNode).void } - def visit_in_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end - # source://spoom//lib/spoom/deadcode/visitor.rb#370 - sig { override.params(node: ::Prism::IndexAndWriteNode).void } - def visit_index_and_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207 + sig { returns(::String) } + def to_s; end - # source://spoom//lib/spoom/deadcode/visitor.rb#375 - sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } - def visit_index_operator_write_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } + def from_json(json); end - # source://spoom//lib/spoom/deadcode/visitor.rb#380 - sig { override.params(node: ::Prism::IndexOrWriteNode).void } - def visit_index_or_write_node(node); end + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#385 - sig { override.params(node: ::Prism::IndexTargetNode).void } - def visit_index_target_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#212 +class Spoom::LSP::DocumentSymbol < ::T::Struct + include ::Spoom::LSP::PrintableSymbol - # source://spoom//lib/spoom/deadcode/visitor.rb#390 - sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } - def visit_instance_variable_and_write_node(node); end + const :name, ::String + const :detail, T.nilable(::String) + const :kind, ::Integer + const :location, T.nilable(::Spoom::LSP::Location) + const :range, T.nilable(::Spoom::LSP::Range) + const :children, T::Array[::Spoom::LSP::DocumentSymbol] - # source://spoom//lib/spoom/deadcode/visitor.rb#395 - sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } - def visit_instance_variable_operator_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end - # source://spoom//lib/spoom/deadcode/visitor.rb#400 - sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } - def visit_instance_variable_or_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272 + sig { returns(::String) } + def kind_string; end - # source://spoom//lib/spoom/deadcode/visitor.rb#405 - sig { override.params(node: ::Prism::InstanceVariableReadNode).void } - def visit_instance_variable_read_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267 + sig { returns(::String) } + def to_s; end - # source://spoom//lib/spoom/deadcode/visitor.rb#410 - sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } - def visit_instance_variable_target_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } + def from_json(json); end - # source://spoom//lib/spoom/deadcode/visitor.rb#415 - sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } - def visit_instance_variable_write_node(node); end + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#420 - sig { override.params(node: ::Prism::IntegerNode).void } - def visit_integer_node(node); end - - # source://spoom//lib/spoom/deadcode/visitor.rb#425 - sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } - def visit_interpolated_match_last_line_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#276 +Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) - # source://spoom//lib/spoom/deadcode/visitor.rb#430 - sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } - def visit_interpolated_regular_expression_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 +class Spoom::LSP::Error < ::Spoom::Error; end - # source://spoom//lib/spoom/deadcode/visitor.rb#435 - sig { override.params(node: ::Prism::InterpolatedStringNode).void } - def visit_interpolated_string_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 +class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end - # source://spoom//lib/spoom/deadcode/visitor.rb#440 - sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } - def visit_interpolated_symbol_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8 +class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end - # source://spoom//lib/spoom/deadcode/visitor.rb#445 - sig { override.params(node: ::Prism::InterpolatedXStringNode).void } - def visit_interpolated_x_string_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10 +class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32 + sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void } + def initialize(uri, diagnostics); end - # source://spoom//lib/spoom/deadcode/visitor.rb#450 - sig { override.params(node: ::Prism::KeywordHashNode).void } - def visit_keyword_hash_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17 + sig { returns(T::Array[::Spoom::LSP::Diagnostic]) } + def diagnostics; end - # source://spoom//lib/spoom/deadcode/visitor.rb#455 - sig { override.params(node: ::Prism::KeywordRestParameterNode).void } - def visit_keyword_rest_parameter_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14 + sig { returns(::String) } + def uri; end - # source://spoom//lib/spoom/deadcode/visitor.rb#460 - sig { override.params(node: ::Prism::LambdaNode).void } - def visit_lambda_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) } + def from_json(json); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#465 - sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } - def visit_local_variable_and_write_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#19 +class Spoom::LSP::Hover < ::T::Struct + include ::Spoom::LSP::PrintableSymbol - # source://spoom//lib/spoom/deadcode/visitor.rb#470 - sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } - def visit_local_variable_operator_write_node(node); end + const :contents, ::String + const :range, T.nilable(T::Range[T.untyped]) - # source://spoom//lib/spoom/deadcode/visitor.rb#475 - sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } - def visit_local_variable_or_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end - # source://spoom//lib/spoom/deadcode/visitor.rb#480 - sig { override.params(node: ::Prism::LocalVariableReadNode).void } - def visit_local_variable_read_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45 + sig { returns(::String) } + def to_s; end - # source://spoom//lib/spoom/deadcode/visitor.rb#485 - sig { override.params(node: ::Prism::LocalVariableTargetNode).void } - def visit_local_variable_target_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } + def from_json(json); end - # source://spoom//lib/spoom/deadcode/visitor.rb#490 - sig { override.params(node: ::Prism::LocalVariableWriteNode).void } - def visit_local_variable_write_node(node); end + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#495 - sig { override.params(node: ::Prism::MatchLastLineNode).void } - def visit_match_last_line_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#112 +class Spoom::LSP::Location < ::T::Struct + include ::Spoom::LSP::PrintableSymbol - # source://spoom//lib/spoom/deadcode/visitor.rb#500 - sig { override.params(node: ::Prism::MatchPredicateNode).void } - def visit_match_predicate_node(node); end + const :uri, ::String + const :range, ::Spoom::LSP::Range - # source://spoom//lib/spoom/deadcode/visitor.rb#505 - sig { override.params(node: ::Prism::MatchRequiredNode).void } - def visit_match_required_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end - # source://spoom//lib/spoom/deadcode/visitor.rb#510 - sig { override.params(node: ::Prism::MatchWriteNode).void } - def visit_match_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138 + sig { returns(::String) } + def to_s; end - # source://spoom//lib/spoom/deadcode/visitor.rb#515 - sig { override.params(node: ::Prism::MissingNode).void } - def visit_missing_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } + def from_json(json); end - # source://spoom//lib/spoom/deadcode/visitor.rb#520 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#525 - sig { override.params(node: ::Prism::MultiTargetNode).void } - def visit_multi_target_node(node); end +# A general message as defined by JSON-RPC. +# +# The language server protocol always uses `"2.0"` as the `jsonrpc` version. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#12 +class Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 + sig { void } + def initialize; end - # source://spoom//lib/spoom/deadcode/visitor.rb#530 - sig { override.params(node: ::Prism::MultiWriteNode).void } - def visit_multi_write_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/base.rb#21 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def as_json; end - # source://spoom//lib/spoom/deadcode/visitor.rb#535 - sig { override.params(node: ::Prism::NextNode).void } - def visit_next_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/base.rb#29 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#540 - sig { override.params(node: ::Prism::NilNode).void } - def visit_nil_node(node); end +# A notification message. +# +# A processed notification message must not send a response back. They work like events. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#58 +class Spoom::LSP::Notification < ::Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 + sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(method, params); end - # source://spoom//lib/spoom/deadcode/visitor.rb#545 - sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } - def visit_no_keywords_parameter_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/base.rb#62 + sig { returns(::String) } + def method; end - # source://spoom//lib/spoom/deadcode/visitor.rb#550 - sig { override.params(node: ::Prism::NumberedParametersNode).void } - def visit_numbered_parameters_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/base.rb#65 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#555 - sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } - def visit_numbered_reference_read_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#50 +class Spoom::LSP::Position < ::T::Struct + include ::Spoom::LSP::PrintableSymbol - # source://spoom//lib/spoom/deadcode/visitor.rb#560 - sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } - def visit_optional_keyword_parameter_node(node); end + const :line, ::Integer + const :char, ::Integer - # source://spoom//lib/spoom/deadcode/visitor.rb#565 - sig { override.params(node: ::Prism::OptionalParameterNode).void } - def visit_optional_parameter_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end - # source://spoom//lib/spoom/deadcode/visitor.rb#570 - sig { override.params(node: ::Prism::OrNode).void } - def visit_or_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75 + sig { returns(::String) } + def to_s; end - # source://spoom//lib/spoom/deadcode/visitor.rb#575 - sig { override.params(node: ::Prism::ParametersNode).void } - def visit_parameters_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } + def from_json(json); end - # source://spoom//lib/spoom/deadcode/visitor.rb#580 - sig { override.params(node: ::Prism::ParenthesesNode).void } - def visit_parentheses_node(node); end + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#585 - sig { override.params(node: ::Prism::PinnedExpressionNode).void } - def visit_pinned_expression_node(node); end +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#9 +module Spoom::LSP::PrintableSymbol + interface! - # source://spoom//lib/spoom/deadcode/visitor.rb#590 - sig { override.params(node: ::Prism::PinnedVariableNode).void } - def visit_pinned_variable_node(node); end + # @abstract + # + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16 + sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#595 - sig { override.params(node: ::Prism::PostExecutionNode).void } - def visit_post_execution_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#80 +class Spoom::LSP::Range < ::T::Struct + include ::Spoom::LSP::PrintableSymbol - # source://spoom//lib/spoom/deadcode/visitor.rb#600 - sig { override.params(node: ::Prism::PreExecutionNode).void } - def visit_pre_execution_node(node); end + const :start, ::Spoom::LSP::Position + const :end, ::Spoom::LSP::Position - # source://spoom//lib/spoom/deadcode/visitor.rb#605 - sig { override.params(node: ::Prism::ProgramNode).void } - def visit_program_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end - # source://spoom//lib/spoom/deadcode/visitor.rb#610 - sig { override.params(node: ::Prism::RangeNode).void } - def visit_range_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107 + sig { returns(::String) } + def to_s; end - # source://spoom//lib/spoom/deadcode/visitor.rb#615 - sig { override.params(node: ::Prism::RationalNode).void } - def visit_rational_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } + def from_json(json); end - # source://spoom//lib/spoom/deadcode/visitor.rb#620 - sig { override.params(node: ::Prism::RedoNode).void } - def visit_redo_node(node); end + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#625 - sig { override.params(node: ::Prism::RegularExpressionNode).void } - def visit_regular_expression_node(node); end +# A request message to describe a request between the client and the server. +# +# Every processed request must send a response back to the sender of the request. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#37 +class Spoom::LSP::Request < ::Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 + sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(id, method, params); end - # source://spoom//lib/spoom/deadcode/visitor.rb#630 - sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } - def visit_required_keyword_parameter_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/base.rb#41 + sig { returns(::Integer) } + def id; end - # source://spoom//lib/spoom/deadcode/visitor.rb#635 - sig { override.params(node: ::Prism::RequiredParameterNode).void } - def visit_required_parameter_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#640 - sig { override.params(node: ::Prism::RescueModifierNode).void } - def visit_rescue_modifier_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#40 +class Spoom::LSP::ResponseError < ::Spoom::LSP::Error + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63 + sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void } + def initialize(code, message, data); end - # source://spoom//lib/spoom/deadcode/visitor.rb#645 - sig { override.params(node: ::Prism::RescueNode).void } - def visit_rescue_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44 + sig { returns(::Integer) } + def code; end - # source://spoom//lib/spoom/deadcode/visitor.rb#650 - sig { override.params(node: ::Prism::RestParameterNode).void } - def visit_rest_parameter_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def data; end - # source://spoom//lib/spoom/deadcode/visitor.rb#655 - sig { override.params(node: ::Prism::RetryNode).void } - def visit_retry_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) } + def from_json(json); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#660 - sig { override.params(node: ::Prism::ReturnNode).void } - def visit_return_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#143 +class Spoom::LSP::SignatureHelp < ::T::Struct + include ::Spoom::LSP::PrintableSymbol - # source://spoom//lib/spoom/deadcode/visitor.rb#665 - sig { override.params(node: ::Prism::SelfNode).void } - def visit_self_node(node); end + const :label, T.nilable(::String) + const :doc, ::Object + const :params, T::Array[T.untyped] - # source://spoom//lib/spoom/deadcode/visitor.rb#670 - sig { override.params(node: ::Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end - # source://spoom//lib/spoom/deadcode/visitor.rb#675 - sig { override.params(node: ::Prism::SourceEncodingNode).void } - def visit_source_encoding_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173 + sig { returns(::String) } + def to_s; end - # source://spoom//lib/spoom/deadcode/visitor.rb#680 - sig { override.params(node: ::Prism::SourceFileNode).void } - def visit_source_file_node(node); end + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } + def from_json(json); end - # source://spoom//lib/spoom/deadcode/visitor.rb#685 - sig { override.params(node: ::Prism::SourceLineNode).void } - def visit_source_line_node(node); end + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + def inherited(s); end + end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#690 - sig { override.params(node: ::Prism::SplatNode).void } - def visit_splat_node(node); end +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#309 +class Spoom::LSP::SymbolPrinter < ::Spoom::Printer + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#326 + sig do + params( + out: T.any(::IO, ::StringIO), + colors: T::Boolean, + indent_level: ::Integer, + prefix: T.nilable(::String) + ).void + end + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/visitor.rb#695 - sig { override.params(node: ::Prism::StatementsNode).void } - def visit_statements_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#348 + sig { params(uri: ::String).returns(::String) } + def clean_uri(uri); end - # source://spoom//lib/spoom/deadcode/visitor.rb#700 - sig { override.params(node: ::Prism::StringNode).void } - def visit_string_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 + sig { returns(T.nilable(::String)) } + def prefix; end - # source://spoom//lib/spoom/deadcode/visitor.rb#705 - sig { override.params(node: ::Prism::SuperNode).void } - def visit_super_node(node); end + # @return [String, nil] + # + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 + def prefix=(_arg0); end - # source://spoom//lib/spoom/deadcode/visitor.rb#710 - sig { override.params(node: ::Prism::SymbolNode).void } - def visit_symbol_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#356 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_list(objects); end - # source://spoom//lib/spoom/deadcode/visitor.rb#715 - sig { override.params(node: ::Prism::TrueNode).void } - def visit_true_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#336 + sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } + def print_object(object); end - # source://spoom//lib/spoom/deadcode/visitor.rb#720 - sig { override.params(node: ::Prism::UndefNode).void } - def visit_undef_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#343 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_objects(objects); end - # source://spoom//lib/spoom/deadcode/visitor.rb#725 - sig { override.params(node: ::Prism::UnlessNode).void } - def visit_unless_node(node); end + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 + sig { returns(T::Set[::Integer]) } + def seen; end +end - # source://spoom//lib/spoom/deadcode/visitor.rb#730 - sig { override.params(node: ::Prism::UntilNode).void } - def visit_until_node(node); end +# source://spoom//lib/spoom/location.rb#5 +class Spoom::Location + include ::Comparable - # source://spoom//lib/spoom/deadcode/visitor.rb#735 - sig { override.params(node: ::Prism::WhenNode).void } - def visit_when_node(node); end + # source://spoom//lib/spoom/location.rb#53 + sig do + params( + file: ::String, + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).void + end + def initialize(file, start_line, start_column, end_line, end_column); end - # source://spoom//lib/spoom/deadcode/visitor.rb#740 - sig { override.params(node: ::Prism::WhileNode).void } - def visit_while_node(node); end + # source://spoom//lib/spoom/location.rb#73 + sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } + def <=>(other); end - # source://spoom//lib/spoom/deadcode/visitor.rb#745 - sig { override.params(node: ::Prism::XStringNode).void } - def visit_x_string_node(node); end + # @return [Integer] + # + # source://spoom//lib/spoom/location.rb#42 + def end_column; end - # source://spoom//lib/spoom/deadcode/visitor.rb#750 - sig { override.params(node: ::Prism::YieldNode).void } - def visit_yield_node(node); end -end + # @return [Integer] + # + # source://spoom//lib/spoom/location.rb#42 + def end_line; end -# source://spoom//lib/spoom.rb#12 -class Spoom::Error < ::StandardError; end + # source://spoom//lib/spoom/location.rb#39 + sig { returns(::String) } + def file; end -# source://spoom//lib/spoom/context/exec.rb#5 -class Spoom::ExecResult < ::T::Struct - const :out, ::String - const :err, T.nilable(::String) - const :status, T::Boolean - const :exit_code, ::Integer + # source://spoom//lib/spoom/location.rb#62 + sig { params(other: ::Spoom::Location).returns(T::Boolean) } + def include?(other); end - # source://spoom//lib/spoom/context/exec.rb#14 + # @return [Integer] + # + # source://spoom//lib/spoom/location.rb#42 + def start_column; end + + # source://spoom//lib/spoom/location.rb#42 + sig { returns(::Integer) } + def start_line; end + + # source://spoom//lib/spoom/location.rb#80 sig { returns(::String) } def to_s; end class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end + # source://spoom//lib/spoom/location.rb#33 + sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Location) } + def from_prism(file, location); end + + # @raise [LocationError] + # + # source://spoom//lib/spoom/location.rb#16 + sig { params(location_string: ::String).returns(::Spoom::Location) } + def from_string(location_string); end end end -# source://spoom//lib/spoom/file_collector.rb#5 -class Spoom::FileCollector - # Initialize a new file collector +# source://spoom//lib/spoom/location.rb#10 +class Spoom::Location::LocationError < ::Spoom::Error; end + +# source://spoom//lib/spoom/model/model.rb#5 +class Spoom::Model + # source://spoom//lib/spoom/model/model.rb#238 + sig { void } + def initialize; end + + # Get a symbol by it's full name # - # If `allow_extensions` is empty, all files are collected. - # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected. + # Raises an error if the symbol is not found # - # If `allow_mime_types` is empty, all files are collected. - # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in - # the list. + # @raise [Error] # - # source://spoom//lib/spoom/file_collector.rb#26 - sig do - params( - allow_extensions: T::Array[::String], - allow_mime_types: T::Array[::String], - exclude_patterns: T::Array[::String] - ).void - end - def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + # source://spoom//lib/spoom/model/model.rb#247 + sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } + def [](full_name); end - # source://spoom//lib/spoom/file_collector.rb#9 - sig { returns(T::Array[::String]) } - def files; end + # source://spoom//lib/spoom/model/model.rb#296 + sig { void } + def finalize!; end - # source://spoom//lib/spoom/file_collector.rb#39 - sig { params(path: ::String).void } - def visit_path(path); end + # Register a new symbol by it's full name + # + # If the symbol already exists, it will be returned. + # + # source://spoom//lib/spoom/model/model.rb#258 + sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } + def register_symbol(full_name); end - # source://spoom//lib/spoom/file_collector.rb#34 - sig { params(paths: T::Array[::String]).void } - def visit_paths(paths); end + # source://spoom//lib/spoom/model/model.rb#263 + sig { params(full_name: ::String, context: ::Spoom::Model::Symbol).returns(::Spoom::Model::Symbol) } + def resolve_symbol(full_name, context:); end - private + # source://spoom//lib/spoom/model/model.rb#290 + sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } + def subtypes(symbol); end - # source://spoom//lib/spoom/file_collector.rb#56 - sig { params(path: ::String).returns(::String) } - def clean_path(path); end + # source://spoom//lib/spoom/model/model.rb#284 + sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } + def supertypes(symbol); end - # source://spoom//lib/spoom/file_collector.rb#73 - sig { params(path: ::String).returns(T::Boolean) } - def excluded_file?(path); end + # All the symbols registered in this model + # + # source://spoom//lib/spoom/model/model.rb#232 + sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) } + def symbols; end - # source://spoom//lib/spoom/file_collector.rb#88 - sig { params(path: ::String).returns(T::Boolean) } - def excluded_path?(path); end + # source://spoom//lib/spoom/model/model.rb#235 + sig { returns(Spoom::Poset[::Spoom::Model::Symbol]) } + def symbols_hierarchy; end - # source://spoom//lib/spoom/file_collector.rb#97 - sig { params(path: ::String).returns(T.nilable(::String)) } - def mime_type_for(path); end + private - # source://spoom//lib/spoom/file_collector.rb#68 - sig { params(path: ::String).void } - def visit_directory(path); end + # source://spoom//lib/spoom/model/model.rb#303 + sig { void } + def compute_symbols_hierarchy!; end +end - # source://spoom//lib/spoom/file_collector.rb#61 - sig { params(path: ::String).void } - def visit_file(path); end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#179 +class Spoom::Model::Attr < ::Spoom::Model::Property + abstract! end -# Build a file hierarchy from a set of file paths. +# source://spoom//lib/spoom/model/model.rb#185 +class Spoom::Model::AttrAccessor < ::Spoom::Model::Attr; end + +# source://spoom//lib/spoom/model/model.rb#183 +class Spoom::Model::AttrReader < ::Spoom::Model::Attr; end + +# source://spoom//lib/spoom/model/model.rb#184 +class Spoom::Model::AttrWriter < ::Spoom::Model::Attr; end + +# Populate a Model by visiting the nodes from a Ruby file # -# source://spoom//lib/spoom/file_tree.rb#6 -class Spoom::FileTree - # source://spoom//lib/spoom/file_tree.rb#10 - sig { params(paths: T::Enumerable[::String]).void } - def initialize(paths = T.unsafe(nil)); end +# source://spoom//lib/spoom/model/builder.rb#7 +class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor + # source://spoom//lib/spoom/model/builder.rb#11 + sig { params(model: ::Spoom::Model, file: ::String).void } + def initialize(model, file); end - # Add a `path` to the tree - # - # This will create all nodes until the root of `path`. + # Accessors # - # source://spoom//lib/spoom/file_tree.rb#25 - sig { params(path: ::String).returns(::Spoom::FileTree::Node) } - def add_path(path); end + # source://spoom//lib/spoom/model/builder.rb#146 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end - # Add all `paths` to the tree + # Classes # - # source://spoom//lib/spoom/file_tree.rb#17 - sig { params(paths: T::Enumerable[::String]).void } - def add_paths(paths); end + # source://spoom//lib/spoom/model/builder.rb#24 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end - # All the nodes in this tree + # Constants # - # source://spoom//lib/spoom/file_tree.rb#45 - sig { returns(T::Array[::Spoom::FileTree::Node]) } - def nodes; end + # source://spoom//lib/spoom/model/builder.rb#71 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end - # Return a map of typing scores for each node in the tree - # - # source://spoom//lib/spoom/file_tree.rb#59 - sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } - def nodes_strictness_scores(context); end + # source://spoom//lib/spoom/model/builder.rb#92 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end - # All the paths in this tree + # Methods # - # source://spoom//lib/spoom/file_tree.rb#53 - sig { returns(T::Array[::String]) } - def paths; end + # source://spoom//lib/spoom/model/builder.rb#127 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end - # Return a map of typing scores for each path in the tree + # Modules # - # source://spoom//lib/spoom/file_tree.rb#67 - sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } - def paths_strictness_scores(context); end - - # source://spoom//lib/spoom/file_tree.rb#72 - sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } - def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end + # source://spoom//lib/spoom/model/builder.rb#55 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end - # All root nodes - # - # source://spoom//lib/spoom/file_tree.rb#39 - sig { returns(T::Array[::Spoom::FileTree::Node]) } - def roots; end -end + # source://spoom//lib/spoom/model/builder.rb#106 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end -# A visitor that collects all the nodes in a tree -# -# source://spoom//lib/spoom/file_tree.rb#124 -class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#131 - sig { void } - def initialize; end + # source://spoom//lib/spoom/model/builder.rb#39 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end - # source://spoom//lib/spoom/file_tree.rb#128 - sig { returns(T::Array[::Spoom::FileTree::Node]) } - def nodes; end + private - # source://spoom//lib/spoom/file_tree.rb#137 - sig { override.params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end -end + # source://spoom//lib/spoom/model/builder.rb#234 + sig { returns(T::Array[::Spoom::Model::Sig]) } + def collect_sigs; end -# A visitor that collects the typing score of each node in a tree -# -# source://spoom//lib/spoom/file_tree.rb#167 -class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses - # source://spoom//lib/spoom/file_tree.rb#174 - sig { params(context: ::Spoom::Context).void } - def initialize(context); end + # source://spoom//lib/spoom/model/builder.rb#229 + sig { returns(::Spoom::Model::Visibility) } + def current_visibility; end - # source://spoom//lib/spoom/file_tree.rb#171 - sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } - def scores; end + # source://spoom//lib/spoom/model/builder.rb#241 + sig { params(node: ::Prism::Node).returns(::Spoom::Location) } + def node_location(node); end +end - # source://spoom//lib/spoom/file_tree.rb#181 - sig { override.params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end +# source://spoom//lib/spoom/model/model.rb#117 +class Spoom::Model::Class < ::Spoom::Model::Namespace + # source://spoom//lib/spoom/model/model.rb#129 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + superclass_name: T.nilable(::String) + ).void + end + def initialize(symbol, owner:, location:, superclass_name: T.unsafe(nil)); end - private + # source://spoom//lib/spoom/model/model.rb#119 + sig { returns(T.nilable(::String)) } + def superclass_name; end - # source://spoom//lib/spoom/file_tree.rb#190 - sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } - def node_score(node); end + # @return [String, nil] + # + # source://spoom//lib/spoom/model/model.rb#119 + def superclass_name=(_arg0); end +end - # source://spoom//lib/spoom/file_tree.rb#199 - sig { params(strictness: T.nilable(::String)).returns(::Float) } - def strictness_score(strictness); end +# source://spoom//lib/spoom/model/model.rb#138 +class Spoom::Model::Constant < ::Spoom::Model::SymbolDef + # source://spoom//lib/spoom/model/model.rb#143 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + value: ::String + ).void + end + def initialize(symbol, owner:, location:, value:); end + + # source://spoom//lib/spoom/model/model.rb#140 + sig { returns(::String) } + def value; end end -# A visitor that collects the strictness of each node in a tree -# -# source://spoom//lib/spoom/file_tree.rb#144 -class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#151 - sig { params(context: ::Spoom::Context).void } - def initialize(context); end +# source://spoom//lib/spoom/model/model.rb#8 +class Spoom::Model::Error < ::Spoom::Error; end - # source://spoom//lib/spoom/file_tree.rb#148 - sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } - def strictnesses; end +# source://spoom//lib/spoom/model/model.rb#213 +class Spoom::Model::Extend < ::Spoom::Model::Mixin; end - # source://spoom//lib/spoom/file_tree.rb#158 - sig { override.params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end -end +# source://spoom//lib/spoom/model/model.rb#211 +class Spoom::Model::Include < ::Spoom::Model::Mixin; end -# A node representing either a file or a directory inside a FileTree +# source://spoom//lib/spoom/model/model.rb#177 +class Spoom::Model::Method < ::Spoom::Model::Property; end + +# A mixin (include, prepend, extend) to a namespace # -# source://spoom//lib/spoom/file_tree.rb#78 -class Spoom::FileTree::Node < ::T::Struct - const :parent, T.nilable(::Spoom::FileTree::Node) - const :name, ::String - const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil) +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#196 +class Spoom::Model::Mixin + abstract! - # Full path to this node from root - # - # source://spoom//lib/spoom/file_tree.rb#92 - sig { returns(::String) } - def path; end + # source://spoom//lib/spoom/model/model.rb#206 + sig { params(name: ::String).void } + def initialize(name); end - class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end - end + # source://spoom//lib/spoom/model/model.rb#203 + sig { returns(::String) } + def name; end end -# An internal class used to print a FileTree +# source://spoom//lib/spoom/model/model.rb#136 +class Spoom::Model::Module < ::Spoom::Model::Namespace; end + +# A class or module # -# See `FileTree#print` +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://spoom//lib/spoom/file_tree.rb#212 -class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#222 +# source://spoom//lib/spoom/model/model.rb#97 +class Spoom::Model::Namespace < ::Spoom::Model::SymbolDef + abstract! + + # source://spoom//lib/spoom/model/model.rb#107 sig do params( - strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], - out: T.any(::IO, ::StringIO), - colors: T::Boolean + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location ).void end - def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end + def initialize(symbol, owner:, location:); end - # source://spoom//lib/spoom/file_tree.rb#230 - sig { override.params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end + # source://spoom//lib/spoom/model/model.rb#101 + sig { returns(T::Array[::Spoom::Model::SymbolDef]) } + def children; end - private + # source://spoom//lib/spoom/model/model.rb#104 + sig { returns(T::Array[::Spoom::Model::Mixin]) } + def mixins; end +end - # source://spoom//lib/spoom/file_tree.rb#255 - sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } - def strictness_color(strictness); end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/namespace_visitor.rb#6 +class Spoom::Model::NamespaceVisitor < ::Spoom::Visitor + abstract! + + # source://spoom//lib/spoom/model/namespace_visitor.rb#12 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/model/namespace_visitor.rb#19 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end end -# An abstract visitor for FileTree +# source://spoom//lib/spoom/model/model.rb#212 +class Spoom::Model::Prepend < ::Spoom::Model::Mixin; end + +# A method or an attribute accessor # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://spoom//lib/spoom/file_tree.rb#101 -class Spoom::FileTree::Visitor +# source://spoom//lib/spoom/model/model.rb#151 +class Spoom::Model::Property < ::Spoom::Model::SymbolDef abstract! - # source://spoom//lib/spoom/file_tree.rb#113 - sig { params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end + # source://spoom//lib/spoom/model/model.rb#169 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + visibility: ::Spoom::Model::Visibility, + sigs: T::Array[::Spoom::Model::Sig] + ).void + end + def initialize(symbol, owner:, location:, visibility:, sigs: T.unsafe(nil)); end - # source://spoom//lib/spoom/file_tree.rb#118 - sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } - def visit_nodes(nodes); end + # source://spoom//lib/spoom/model/model.rb#158 + sig { returns(T::Array[::Spoom::Model::Sig]) } + def sigs; end - # source://spoom//lib/spoom/file_tree.rb#108 - sig { params(tree: ::Spoom::FileTree).void } - def visit_tree(tree); end + # source://spoom//lib/spoom/model/model.rb#155 + sig { returns(::Spoom::Model::Visibility) } + def visibility; end end -# source://spoom//lib/spoom/context/git.rb#5 -module Spoom::Git; end +# A reference to something that looks like a constant or a method +# +# Constants could be classes, modules, or actual constants. +# Methods could be accessors, instance or class methods, aliases, etc. +# +# source://spoom//lib/spoom/model/reference.rb#10 +class Spoom::Model::Reference < ::T::Struct + const :kind, ::Spoom::Model::Reference::Kind + const :name, ::String + const :location, ::Spoom::Location -# source://spoom//lib/spoom/context/git.rb#6 -class Spoom::Git::Commit < ::T::Struct - const :sha, ::String - const :time, ::Time + # source://spoom//lib/spoom/model/reference.rb#39 + sig { returns(T::Boolean) } + def constant?; end - # source://spoom//lib/spoom/context/git.rb#27 - sig { returns(::Integer) } - def timestamp; end + # source://spoom//lib/spoom/model/reference.rb#44 + sig { returns(T::Boolean) } + def method?; end class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://spoom//lib/spoom/model/reference.rb#24 + sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } + def constant(name, location); end + + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end - # Parse a line formatted as `%h %at` into a `Commit` - # - # source://spoom//lib/spoom/context/git.rb#14 - sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } - def parse_line(string); end + # source://spoom//lib/spoom/model/reference.rb#29 + sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } + def method(name, location); end end end -# source://spoom//lib/spoom/sorbet/lsp/base.rb#5 -module Spoom::LSP; end +# source://spoom//lib/spoom/model/reference.rb#13 +class Spoom::Model::Reference::Kind < ::T::Enum + enums do + Constant = new + Method = new + end +end -# source://spoom//lib/spoom/sorbet/lsp.rb#13 -class Spoom::LSP::Client - # source://spoom//lib/spoom/sorbet/lsp.rb#17 - sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void } - def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end +# Visit a file to collect all the references to constants and methods +# +# source://spoom//lib/spoom/model/references_visitor.rb#7 +class Spoom::Model::ReferencesVisitor < ::Spoom::Visitor + # source://spoom//lib/spoom/model/references_visitor.rb#14 + sig { params(file: ::String).void } + def initialize(file); end + + # source://spoom//lib/spoom/model/references_visitor.rb#11 + sig { returns(T::Array[::Spoom::Model::Reference]) } + def references; end - # source://spoom//lib/spoom/sorbet/lsp.rb#229 - sig { void } - def close; end + # source://spoom//lib/spoom/model/references_visitor.rb#22 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#131 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } - def definitions(uri, line, column); end + # source://spoom//lib/spoom/model/references_visitor.rb#27 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#212 - sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } - def document_symbols(uri); end + # source://spoom//lib/spoom/model/references_visitor.rb#33 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#89 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) } - def hover(uri, line, column); end + # source://spoom//lib/spoom/model/references_visitor.rb#44 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#27 - sig { returns(::Integer) } - def next_id; end + # source://spoom//lib/spoom/model/references_visitor.rb#68 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end - # LSP requests - # - # @raise [Error::AlreadyOpen] - # - # source://spoom//lib/spoom/sorbet/lsp.rb#72 - sig { params(workspace_path: ::String).void } - def open(workspace_path); end + # source://spoom//lib/spoom/model/references_visitor.rb#52 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#54 - sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } - def read; end + # source://spoom//lib/spoom/model/references_visitor.rb#60 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end - # @raise [Error::BadHeaders] - # - # source://spoom//lib/spoom/sorbet/lsp.rb#43 - sig { returns(T.nilable(::String)) } - def read_raw; end + # source://spoom//lib/spoom/model/references_visitor.rb#85 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#173 - sig do - params( - uri: ::String, - line: ::Integer, - column: ::Integer, - include_decl: T::Boolean - ).returns(T::Array[::Spoom::LSP::Location]) - end - def references(uri, line, column, include_decl = T.unsafe(nil)); end + # source://spoom//lib/spoom/model/references_visitor.rb#91 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#37 - sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) } - def send(message); end + # source://spoom//lib/spoom/model/references_visitor.rb#97 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#32 - sig { params(json_string: ::String).void } - def send_raw(json_string); end + # source://spoom//lib/spoom/model/references_visitor.rb#103 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#110 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) } - def signatures(uri, line, column); end + # source://spoom//lib/spoom/model/references_visitor.rb#109 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end - # source://spoom//lib/spoom/sorbet/lsp.rb#197 - sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } - def symbols(query); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#152 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } - def type_definitions(uri, line, column); end -end + # source://spoom//lib/spoom/model/references_visitor.rb#115 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#178 -class Spoom::LSP::Diagnostic < ::T::Struct - include ::Spoom::LSP::PrintableSymbol + # source://spoom//lib/spoom/model/references_visitor.rb#121 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end - const :range, ::Spoom::LSP::Range - const :code, ::Integer - const :message, ::String - const :information, ::Object + # source://spoom//lib/spoom/model/references_visitor.rb#126 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end + # source://spoom//lib/spoom/model/references_visitor.rb#131 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207 - sig { returns(::String) } - def to_s; end + # source://spoom//lib/spoom/model/references_visitor.rb#139 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } - def from_json(json); end + # source://spoom//lib/spoom/model/references_visitor.rb#147 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end - end -end + # source://spoom//lib/spoom/model/references_visitor.rb#155 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#212 -class Spoom::LSP::DocumentSymbol < ::T::Struct - include ::Spoom::LSP::PrintableSymbol + # source://spoom//lib/spoom/model/references_visitor.rb#161 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end - const :name, ::String - const :detail, T.nilable(::String) - const :kind, ::Integer - const :location, T.nilable(::Spoom::LSP::Location) - const :range, T.nilable(::Spoom::LSP::Range) - const :children, T::Array[::Spoom::LSP::DocumentSymbol] + # source://spoom//lib/spoom/model/references_visitor.rb#166 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end + # source://spoom//lib/spoom/model/references_visitor.rb#177 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272 - sig { returns(::String) } - def kind_string; end + private - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267 - sig { returns(::String) } - def to_s; end + # source://spoom//lib/spoom/model/references_visitor.rb#195 + sig { params(node: ::Prism::Node).returns(::Spoom::Location) } + def node_location(node); end - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } - def from_json(json); end + # source://spoom//lib/spoom/model/references_visitor.rb#185 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_constant(name, node); end - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end - end + # source://spoom//lib/spoom/model/references_visitor.rb#190 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_method(name, node); end end -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#276 -Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) +# A Sorbet signature (sig block) +# +# source://spoom//lib/spoom/model/model.rb#216 +class Spoom::Model::Sig + # source://spoom//lib/spoom/model/model.rb#223 + sig { params(string: ::String).void } + def initialize(string); end -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 -class Spoom::LSP::Error < ::StandardError; end + # source://spoom//lib/spoom/model/model.rb#220 + sig { returns(::String) } + def string; end +end -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 -class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end +# source://spoom//lib/spoom/model/model.rb#115 +class Spoom::Model::SingletonClass < ::Spoom::Model::Namespace; end -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8 -class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end +# A Symbol is a uniquely named entity in the Ruby codebase +# +# A symbol can have multiple definitions, e.g. a class can be reopened. +# Sometimes a symbol can have multiple definitions of different types, +# e.g. `foo` method can be defined both as a method and as an attribute accessor. +# +# source://spoom//lib/spoom/model/model.rb#15 +class Spoom::Model::Symbol + # source://spoom//lib/spoom/model/model.rb#27 + sig { params(full_name: ::String).void } + def initialize(full_name); end -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10 -class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32 - sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void } - def initialize(uri, diagnostics); end + # The definitions of this symbol (where it exists in the code) + # + # source://spoom//lib/spoom/model/model.rb#24 + sig { returns(T::Array[::Spoom::Model::SymbolDef]) } + def definitions; end - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17 - sig { returns(T::Array[::Spoom::LSP::Diagnostic]) } - def diagnostics; end + # The full, unique name of this symbol + # + # source://spoom//lib/spoom/model/model.rb#20 + sig { returns(::String) } + def full_name; end - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14 + # The short name of this symbol + # + # source://spoom//lib/spoom/model/model.rb#34 sig { returns(::String) } - def uri; end + def name; end - class << self - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) } - def from_json(json); end - end + # source://spoom//lib/spoom/model/model.rb#39 + sig { returns(::String) } + def to_s; end end -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#19 -class Spoom::LSP::Hover < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :contents, ::String - const :range, T.nilable(T::Range[T.untyped]) +# A SymbolDef is a definition of a Symbol +# +# It can be a class, module, constant, method, etc. +# A SymbolDef has a location pointing to the actual code that defines the symbol. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#55 +class Spoom::Model::SymbolDef + abstract! - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end + # source://spoom//lib/spoom/model/model.rb#74 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location + ).void + end + def initialize(symbol, owner:, location:); end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45 + # The full name of the symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#85 sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } - def from_json(json); end + def full_name; end - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end - end -end + # The actual code location of this definition + # + # source://spoom//lib/spoom/model/model.rb#71 + sig { returns(::Spoom::Location) } + def location; end -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#112 -class Spoom::LSP::Location < ::T::Struct - include ::Spoom::LSP::PrintableSymbol + # The short name of the symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#91 + sig { returns(::String) } + def name; end - const :uri, ::String - const :range, ::Spoom::LSP::Range + # The enclosing namespace this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#67 + sig { returns(T.nilable(::Spoom::Model::Namespace)) } + def owner; end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end + # The symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#63 + sig { returns(::Spoom::Model::Symbol) } + def symbol; end +end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138 - sig { returns(::String) } +# source://spoom//lib/spoom/model/model.rb#44 +class Spoom::Model::UnresolvedSymbol < ::Spoom::Model::Symbol + # source://spoom//lib/spoom/model/model.rb#46 + sig { override.returns(::String) } def to_s; end +end - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } - def from_json(json); end - - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end +# source://spoom//lib/spoom/model/model.rb#187 +class Spoom::Model::Visibility < ::T::Enum + enums do + Public = new + Protected = new + Private = new end end -# A general message as defined by JSON-RPC. +# source://spoom//lib/spoom/parse.rb#7 +class Spoom::ParseError < ::Spoom::Error; end + +# A Poset is a set of elements with a partial order relation. # -# The language server protocol always uses `"2.0"` as the `jsonrpc` version. +# The partial order relation is a binary relation that is reflexive, antisymmetric, and transitive. +# It can be used to represent a hierarchy of classes or modules, the dependencies between gems, etc. # -# source://spoom//lib/spoom/sorbet/lsp/base.rb#12 -class Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 +# source://spoom//lib/spoom/poset.rb#9 +class Spoom::Poset + extend T::Generic + + E = type_member { { upper: Object } } + + # source://spoom//lib/spoom/poset.rb#18 sig { void } def initialize; end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#21 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def as_json; end + # Get the POSet element for a given value + # + # Raises if the element is not found + # + # @raise [Error] + # + # source://spoom//lib/spoom/poset.rb#26 + sig { params(value: E).returns(Spoom::Poset::Element[E]) } + def [](value); end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#29 - sig { params(args: T.untyped).returns(::String) } - def to_json(*args); end -end + # Add a direct edge from one element to another + # + # Transitive edges (transitive closure) are automatically computed. + # Adds the elements if they don't exist. + # If the direct edge already exists, nothing is done. + # + # source://spoom//lib/spoom/poset.rb#54 + sig { params(from: E, to: E).void } + def add_direct_edge(from, to); end -# A notification message. -# -# A processed notification message must not send a response back. They work like events. -# -# source://spoom//lib/spoom/sorbet/lsp/base.rb#58 -class Spoom::LSP::Notification < ::Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 - sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } - def initialize(method, params); end + # Add an element to the POSet + # + # source://spoom//lib/spoom/poset.rb#35 + sig { params(value: E).returns(Spoom::Poset::Element[E]) } + def add_element(value); end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#62 - sig { returns(::String) } - def method; end + # Is there a direct edge from `from` to `to`? + # + # source://spoom//lib/spoom/poset.rb#101 + sig { params(from: E, to: E).returns(T::Boolean) } + def direct_edge?(from, to); end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#65 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def params; end -end + # Is there an edge (direct or indirect) from `from` to `to`? + # + # source://spoom//lib/spoom/poset.rb#92 + sig { params(from: E, to: E).returns(T::Boolean) } + def edge?(from, to); end -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#50 -class Spoom::LSP::Position < ::T::Struct - include ::Spoom::LSP::PrintableSymbol + # Is the given value a element in the POSet? + # + # source://spoom//lib/spoom/poset.rb#44 + sig { params(value: E).returns(T::Boolean) } + def element?(value); end - const :line, ::Integer - const :char, ::Integer + # Show the POSet as a DOT graph using xdot (used for debugging) + # + # source://spoom//lib/spoom/poset.rb#107 + sig { params(direct: T::Boolean, transitive: T::Boolean).void } + def show_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end + # Return the POSet as a DOT graph + # + # source://spoom//lib/spoom/poset.rb#116 + sig { params(direct: T::Boolean, transitive: T::Boolean).returns(::String) } + def to_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end +end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75 - sig { returns(::String) } - def to_s; end +# An element in a POSet +# +# source://spoom//lib/spoom/poset.rb#136 +class Spoom::Poset::Element + extend T::Generic + include ::Comparable - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } - def from_json(json); end + E = type_member { { upper: Object } } - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end - end -end + # source://spoom//lib/spoom/poset.rb#152 + sig { params(value: E).void } + def initialize(value); end -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#9 -module Spoom::LSP::PrintableSymbol - interface! + # source://spoom//lib/spoom/poset.rb#161 + sig { params(other: T.untyped).returns(T.nilable(::Integer)) } + def <=>(other); end - # @abstract + # Direct and indirect ancestors of this element # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16 - sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end -end + # source://spoom//lib/spoom/poset.rb#180 + sig { returns(T::Array[E]) } + def ancestors; end -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#80 -class Spoom::LSP::Range < ::T::Struct - include ::Spoom::LSP::PrintableSymbol + # Direct children of this element + # + # source://spoom//lib/spoom/poset.rb#186 + sig { returns(T::Array[E]) } + def children; end - const :start, ::Spoom::LSP::Position - const :end, ::Spoom::LSP::Position + # Direct and indirect descendants of this element + # + # source://spoom//lib/spoom/poset.rb#192 + sig { returns(T::Array[E]) } + def descendants; end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # @return [Set] + # + # source://spoom//lib/spoom/poset.rb#149 + def dfroms; end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107 - sig { returns(::String) } - def to_s; end + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # source://spoom//lib/spoom/poset.rb#149 + sig { returns(T::Set[Spoom::Poset::Element[E]]) } + def dtos; end - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } - def from_json(json); end - - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# A request message to describe a request between the client and the server. -# -# Every processed request must send a response back to the sender of the request. -# -# source://spoom//lib/spoom/sorbet/lsp/base.rb#37 -class Spoom::LSP::Request < ::Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 - sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } - def initialize(id, method, params); end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#41 - sig { returns(::Integer) } - def id; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def params; end -end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#40 -class Spoom::LSP::ResponseError < ::Spoom::LSP::Error - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63 - sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void } - def initialize(code, message, data); end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44 - sig { returns(::Integer) } - def code; end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def data; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) } - def from_json(json); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#143 -class Spoom::LSP::SignatureHelp < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :label, T.nilable(::String) - const :doc, ::Object - const :params, T::Array[T.untyped] - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } - def from_json(json); end - - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#309 -class Spoom::LSP::SymbolPrinter < ::Spoom::Printer - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#326 - sig do - params( - out: T.any(::IO, ::StringIO), - colors: T::Boolean, - indent_level: ::Integer, - prefix: T.nilable(::String) - ).void - end - def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#348 - sig { params(uri: ::String).returns(::String) } - def clean_uri(uri); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 - sig { returns(T.nilable(::String)) } - def prefix; end - - # @return [String, nil] + # Edges (direct and indirect) from this element to other elements in the same POSet # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 - def prefix=(_arg0); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#356 - sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } - def print_list(objects); end + # @return [Set] + # + # source://spoom//lib/spoom/poset.rb#149 + def froms; end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#336 - sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } - def print_object(object); end + # Direct parents of this element + # + # source://spoom//lib/spoom/poset.rb#174 + sig { returns(T::Array[E]) } + def parents; end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#343 - sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } - def print_objects(objects); end + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # @return [Set] + # + # source://spoom//lib/spoom/poset.rb#149 + def tos; end - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 - sig { returns(T::Set[::Integer]) } - def seen; end + # The value held by this element + # + # source://spoom//lib/spoom/poset.rb#145 + sig { returns(E) } + def value; end end +# source://spoom//lib/spoom/poset.rb#13 +class Spoom::Poset::Error < ::Spoom::Error; end + # source://spoom//lib/spoom/printer.rb#7 class Spoom::Printer include ::Spoom::Colorize @@ -4161,7 +4058,7 @@ end Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) # source://spoom//lib/spoom/sorbet.rb#14 -class Spoom::Sorbet::Error < ::StandardError +class Spoom::Sorbet::Error < ::Spoom::Error # source://spoom//lib/spoom/sorbet.rb#29 sig { params(message: ::String, result: ::Spoom::ExecResult).void } def initialize(message, result); end @@ -4189,233 +4086,841 @@ end # source://spoom//lib/spoom/sorbet/errors.rb#7 Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/sorbet/errors.rb#125 +# source://spoom//lib/spoom/sorbet/errors.rb#127 class Spoom::Sorbet::Errors::Error include ::Comparable - # source://spoom//lib/spoom/sorbet/errors.rb#151 - sig do - params( - file: T.nilable(::String), - line: T.nilable(::Integer), - message: T.nilable(::String), - code: T.nilable(::Integer), - more: T::Array[::String] - ).void - end - def initialize(file, line, message, code, more = T.unsafe(nil)); end + # source://spoom//lib/spoom/sorbet/errors.rb#153 + sig do + params( + file: T.nilable(::String), + line: T.nilable(::Integer), + message: T.nilable(::String), + code: T.nilable(::Integer), + more: T::Array[::String] + ).void + end + def initialize(file, line, message, code, more = T.unsafe(nil)); end + + # By default errors are sorted by location + # + # source://spoom//lib/spoom/sorbet/errors.rb#164 + sig { params(other: T.untyped).returns(::Integer) } + def <=>(other); end + + # @return [Integer, nil] + # + # source://spoom//lib/spoom/sorbet/errors.rb#135 + def code; end + + # source://spoom//lib/spoom/sorbet/errors.rb#132 + sig { returns(T.nilable(::String)) } + def file; end + + # Other files associated with the error + # + # source://spoom//lib/spoom/sorbet/errors.rb#142 + sig { returns(T::Set[::String]) } + def files_from_error_sections; end + + # source://spoom//lib/spoom/sorbet/errors.rb#135 + sig { returns(T.nilable(::Integer)) } + def line; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/sorbet/errors.rb#132 + def message; end + + # source://spoom//lib/spoom/sorbet/errors.rb#138 + sig { returns(T::Array[::String]) } + def more; end + + # source://spoom//lib/spoom/sorbet/errors.rb#171 + sig { returns(::String) } + def to_s; end +end + +# Parse errors from Sorbet output +# +# source://spoom//lib/spoom/sorbet/errors.rb#18 +class Spoom::Sorbet::Errors::Parser + # source://spoom//lib/spoom/sorbet/errors.rb#45 + sig { params(error_url_base: ::String).void } + def initialize(error_url_base: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/errors.rb#52 + sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse(output); end + + private + + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#116 + sig { params(line: ::String).void } + def append_error(line); end + + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#108 + sig { void } + def close_error; end + + # source://spoom//lib/spoom/sorbet/errors.rb#75 + sig { params(error_url_base: ::String).returns(::Regexp) } + def error_line_match_regexp(error_url_base); end + + # source://spoom//lib/spoom/sorbet/errors.rb#92 + sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } + def match_error_line(line); end + + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#101 + sig { params(error: ::Spoom::Sorbet::Errors::Error).void } + def open_error(error); end + + class << self + # source://spoom//lib/spoom/sorbet/errors.rb#38 + sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse_string(output, error_url_base: T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/sorbet/errors.rb#23 +Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/sorbet/errors.rb#21 +class Spoom::Sorbet::Errors::Parser::ParseError < ::Spoom::Error; end + +# source://spoom//lib/spoom/sorbet.rb#37 +Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#38 +Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#41 +Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer) + +# source://spoom//lib/spoom/sorbet/metrics.rb#8 +module Spoom::Sorbet::MetricsParser + class << self + # source://spoom//lib/spoom/sorbet/metrics.rb#15 + sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_file(path, prefix = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/metrics.rb#25 + sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_hash(obj, prefix = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/metrics.rb#20 + sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_string(string, prefix = T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/sorbet/metrics.rb#9 +Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#42 +Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) + +# source://spoom//lib/spoom/sorbet/sigils.rb#9 +module Spoom::Sorbet::Sigils + class << self + # changes the sigil in the file at the passed path to the specified new strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#72 + sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) } + def change_sigil_in_file(path, new_strictness); end + + # changes the sigil to have a new strictness in a list of files + # + # source://spoom//lib/spoom/sorbet/sigils.rb#83 + sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) } + def change_sigil_in_files(path_list, new_strictness); end + + # returns a string containing the strictness of a sigil in a file at the passed path + # * returns nil if no sigil + # + # source://spoom//lib/spoom/sorbet/sigils.rb#63 + sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) } + def file_strictness(path); end + + # returns the full sigil comment string for the passed strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#38 + sig { params(strictness: ::String).returns(::String) } + def sigil_string(strictness); end + + # returns the strictness of a sigil in the passed file content string (nil if no sigil) + # + # source://spoom//lib/spoom/sorbet/sigils.rb#50 + sig { params(content: ::String).returns(T.nilable(::String)) } + def strictness_in_content(content); end + + # returns a string which is the passed content but with the sigil updated to a new strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#56 + sig { params(content: ::String, new_strictness: ::String).returns(::String) } + def update_sigil(content, new_strictness); end + + # returns true if the passed string is a valid strictness (else false) + # + # source://spoom//lib/spoom/sorbet/sigils.rb#44 + sig { params(strictness: ::String).returns(T::Boolean) } + def valid_strictness?(strictness); end + end +end + +# source://spoom//lib/spoom/sorbet/sigils.rb#31 +Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://spoom//lib/spoom/sorbet/sigils.rb#13 +Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#12 +Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#17 +Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#15 +Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#16 +Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#14 +Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#19 +Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/timeline.rb#5 +class Spoom::Timeline + # source://spoom//lib/spoom/timeline.rb#9 + sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void } + def initialize(context, from, to); end + + # Return one commit for each date in `dates` + # + # source://spoom//lib/spoom/timeline.rb#36 + sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) } + def commits_for_dates(dates); end + + # Return all months between `from` and `to` + # + # source://spoom//lib/spoom/timeline.rb#23 + sig { returns(T::Array[::Time]) } + def months; end + + # Return one commit for each month between `from` and `to` + # + # source://spoom//lib/spoom/timeline.rb#17 + sig { returns(T::Array[::Spoom::Git::Commit]) } + def ticks; end +end + +# source://spoom//lib/spoom/version.rb#5 +Spoom::VERSION = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/visitor.rb#7 +class Spoom::Visitor < ::Prism::Visitor + # source://spoom//lib/spoom/visitor.rb#16 + sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#21 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/visitor.rb#26 + sig { override.params(node: ::Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#31 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/visitor.rb#36 + sig { override.params(node: ::Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # source://spoom//lib/spoom/visitor.rb#41 + sig { override.params(node: ::Prism::ArrayNode).void } + def visit_array_node(node); end + + # source://spoom//lib/spoom/visitor.rb#46 + sig { override.params(node: ::Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#51 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://spoom//lib/spoom/visitor.rb#56 + sig { override.params(node: ::Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # source://spoom//lib/spoom/visitor.rb#61 + sig { override.params(node: ::Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#66 + sig { override.params(node: ::Prism::BeginNode).void } + def visit_begin_node(node); end + + # source://spoom//lib/spoom/visitor.rb#71 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/visitor.rb#76 + sig { override.params(node: ::Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#81 + sig { override.params(node: ::Prism::BlockNode).void } + def visit_block_node(node); end + + # source://spoom//lib/spoom/visitor.rb#86 + sig { override.params(node: ::Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#91 + sig { override.params(node: ::Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # source://spoom//lib/spoom/visitor.rb#96 + sig { override.params(node: ::Prism::BreakNode).void } + def visit_break_node(node); end + + # source://spoom//lib/spoom/visitor.rb#101 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#106 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/visitor.rb#111 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#116 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#121 + sig { override.params(node: ::Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#126 + sig { override.params(node: ::Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#131 + sig { override.params(node: ::Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # source://spoom//lib/spoom/visitor.rb#136 + sig { override.params(node: ::Prism::CaseNode).void } + def visit_case_node(node); end + + # source://spoom//lib/spoom/visitor.rb#11 + sig { override.params(node: ::Prism::Node).void } + def visit_child_nodes(node); end + + # source://spoom//lib/spoom/visitor.rb#141 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/visitor.rb#146 + sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#151 + sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#156 + sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#161 + sig { override.params(node: ::Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#166 + sig { override.params(node: ::Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#171 + sig { override.params(node: ::Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#176 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#181 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#186 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#191 + sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#196 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # source://spoom//lib/spoom/visitor.rb#201 + sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#206 + sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#211 + sig { override.params(node: ::Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#216 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#221 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#226 + sig { override.params(node: ::Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#231 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#236 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://spoom//lib/spoom/visitor.rb#241 + sig { override.params(node: ::Prism::DefinedNode).void } + def visit_defined_node(node); end + + # source://spoom//lib/spoom/visitor.rb#246 + sig { override.params(node: ::Prism::ElseNode).void } + def visit_else_node(node); end + + # source://spoom//lib/spoom/visitor.rb#251 + sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # source://spoom//lib/spoom/visitor.rb#256 + sig { override.params(node: ::Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#261 + sig { override.params(node: ::Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # source://spoom//lib/spoom/visitor.rb#266 + sig { override.params(node: ::Prism::FalseNode).void } + def visit_false_node(node); end + + # source://spoom//lib/spoom/visitor.rb#271 + sig { override.params(node: ::Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#276 + sig { override.params(node: ::Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # source://spoom//lib/spoom/visitor.rb#281 + sig { override.params(node: ::Prism::FloatNode).void } + def visit_float_node(node); end + + # source://spoom//lib/spoom/visitor.rb#286 + sig { override.params(node: ::Prism::ForNode).void } + def visit_for_node(node); end + + # source://spoom//lib/spoom/visitor.rb#291 + sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # source://spoom//lib/spoom/visitor.rb#296 + sig { override.params(node: ::Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#301 + sig { override.params(node: ::Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # source://spoom//lib/spoom/visitor.rb#306 + sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#311 + sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#316 + sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#321 + sig { override.params(node: ::Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#326 + sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#331 + sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#336 + sig { override.params(node: ::Prism::HashNode).void } + def visit_hash_node(node); end + + # source://spoom//lib/spoom/visitor.rb#341 + sig { override.params(node: ::Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#346 + sig { override.params(node: ::Prism::IfNode).void } + def visit_if_node(node); end + + # source://spoom//lib/spoom/visitor.rb#351 + sig { override.params(node: ::Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # source://spoom//lib/spoom/visitor.rb#356 + sig { override.params(node: ::Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # source://spoom//lib/spoom/visitor.rb#361 + sig { override.params(node: ::Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # source://spoom//lib/spoom/visitor.rb#366 + sig { override.params(node: ::Prism::InNode).void } + def visit_in_node(node); end + + # source://spoom//lib/spoom/visitor.rb#371 + sig { override.params(node: ::Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#376 + sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#381 + sig { override.params(node: ::Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#386 + sig { override.params(node: ::Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#391 + sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#396 + sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#401 + sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#406 + sig { override.params(node: ::Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#411 + sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#416 + sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#421 + sig { override.params(node: ::Prism::IntegerNode).void } + def visit_integer_node(node); end + + # source://spoom//lib/spoom/visitor.rb#426 + sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # source://spoom//lib/spoom/visitor.rb#431 + sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # source://spoom//lib/spoom/visitor.rb#436 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#441 + sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # source://spoom//lib/spoom/visitor.rb#446 + sig { override.params(node: ::Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#451 + sig { override.params(node: ::Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # source://spoom//lib/spoom/visitor.rb#456 + sig { override.params(node: ::Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#461 + sig { override.params(node: ::Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # source://spoom//lib/spoom/visitor.rb#466 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#471 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#476 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#481 + sig { override.params(node: ::Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#486 + sig { override.params(node: ::Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#491 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#496 + sig { override.params(node: ::Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # source://spoom//lib/spoom/visitor.rb#501 + sig { override.params(node: ::Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # source://spoom//lib/spoom/visitor.rb#506 + sig { override.params(node: ::Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # source://spoom//lib/spoom/visitor.rb#511 + sig { override.params(node: ::Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#516 + sig { override.params(node: ::Prism::MissingNode).void } + def visit_missing_node(node); end + + # source://spoom//lib/spoom/visitor.rb#521 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/visitor.rb#526 + sig { override.params(node: ::Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end - # By default errors are sorted by location - # - # source://spoom//lib/spoom/sorbet/errors.rb#162 - sig { params(other: T.untyped).returns(::Integer) } - def <=>(other); end + # source://spoom//lib/spoom/visitor.rb#531 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end - # @return [Integer, nil] - # - # source://spoom//lib/spoom/sorbet/errors.rb#133 - def code; end + # source://spoom//lib/spoom/visitor.rb#536 + sig { override.params(node: ::Prism::NextNode).void } + def visit_next_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#130 - sig { returns(T.nilable(::String)) } - def file; end + # source://spoom//lib/spoom/visitor.rb#541 + sig { override.params(node: ::Prism::NilNode).void } + def visit_nil_node(node); end - # Other files associated with the error - # - # source://spoom//lib/spoom/sorbet/errors.rb#140 - sig { returns(T::Set[::String]) } - def files_from_error_sections; end + # source://spoom//lib/spoom/visitor.rb#546 + sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#133 - sig { returns(T.nilable(::Integer)) } - def line; end + # source://spoom//lib/spoom/visitor.rb#551 + sig { override.params(node: ::Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end - # @return [String, nil] - # - # source://spoom//lib/spoom/sorbet/errors.rb#130 - def message; end + # source://spoom//lib/spoom/visitor.rb#556 + sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#136 - sig { returns(T::Array[::String]) } - def more; end + # source://spoom//lib/spoom/visitor.rb#561 + sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#169 - sig { returns(::String) } - def to_s; end -end + # source://spoom//lib/spoom/visitor.rb#566 + sig { override.params(node: ::Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end -# Parse errors from Sorbet output -# -# source://spoom//lib/spoom/sorbet/errors.rb#18 -class Spoom::Sorbet::Errors::Parser - # source://spoom//lib/spoom/sorbet/errors.rb#43 - sig { params(error_url_base: ::String).void } - def initialize(error_url_base: T.unsafe(nil)); end + # source://spoom//lib/spoom/visitor.rb#571 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#50 - sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def parse(output); end + # source://spoom//lib/spoom/visitor.rb#576 + sig { override.params(node: ::Prism::ParametersNode).void } + def visit_parameters_node(node); end - private + # source://spoom//lib/spoom/visitor.rb#581 + sig { override.params(node: ::Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#114 - sig { params(line: ::String).void } - def append_error(line); end + # source://spoom//lib/spoom/visitor.rb#586 + sig { override.params(node: ::Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#106 - sig { void } - def close_error; end + # source://spoom//lib/spoom/visitor.rb#591 + sig { override.params(node: ::Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#73 - sig { params(error_url_base: ::String).returns(::Regexp) } - def error_line_match_regexp(error_url_base); end + # source://spoom//lib/spoom/visitor.rb#596 + sig { override.params(node: ::Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#90 - sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } - def match_error_line(line); end + # source://spoom//lib/spoom/visitor.rb#601 + sig { override.params(node: ::Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end - # source://spoom//lib/spoom/sorbet/errors.rb#99 - sig { params(error: ::Spoom::Sorbet::Errors::Error).void } - def open_error(error); end + # source://spoom//lib/spoom/visitor.rb#606 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end - class << self - # source://spoom//lib/spoom/sorbet/errors.rb#36 - sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def parse_string(output, error_url_base: T.unsafe(nil)); end - end -end + # source://spoom//lib/spoom/visitor.rb#611 + sig { override.params(node: ::Prism::RangeNode).void } + def visit_range_node(node); end -# source://spoom//lib/spoom/sorbet/errors.rb#21 -Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) + # source://spoom//lib/spoom/visitor.rb#616 + sig { override.params(node: ::Prism::RationalNode).void } + def visit_rational_node(node); end -# source://spoom//lib/spoom/sorbet.rb#37 -Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#621 + sig { override.params(node: ::Prism::RedoNode).void } + def visit_redo_node(node); end -# source://spoom//lib/spoom/sorbet.rb#38 -Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#626 + sig { override.params(node: ::Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end -# source://spoom//lib/spoom/sorbet.rb#41 -Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer) + # source://spoom//lib/spoom/visitor.rb#631 + sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end -# source://spoom//lib/spoom/sorbet/metrics.rb#8 -module Spoom::Sorbet::MetricsParser - class << self - # source://spoom//lib/spoom/sorbet/metrics.rb#15 - sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_file(path, prefix = T.unsafe(nil)); end + # source://spoom//lib/spoom/visitor.rb#636 + sig { override.params(node: ::Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end - # source://spoom//lib/spoom/sorbet/metrics.rb#25 - sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_hash(obj, prefix = T.unsafe(nil)); end + # source://spoom//lib/spoom/visitor.rb#641 + sig { override.params(node: ::Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end - # source://spoom//lib/spoom/sorbet/metrics.rb#20 - sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_string(string, prefix = T.unsafe(nil)); end - end -end + # source://spoom//lib/spoom/visitor.rb#646 + sig { override.params(node: ::Prism::RescueNode).void } + def visit_rescue_node(node); end -# source://spoom//lib/spoom/sorbet/metrics.rb#9 -Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#651 + sig { override.params(node: ::Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end -# source://spoom//lib/spoom/sorbet.rb#42 -Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) + # source://spoom//lib/spoom/visitor.rb#656 + sig { override.params(node: ::Prism::RetryNode).void } + def visit_retry_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#9 -module Spoom::Sorbet::Sigils - class << self - # changes the sigil in the file at the passed path to the specified new strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#72 - sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) } - def change_sigil_in_file(path, new_strictness); end + # source://spoom//lib/spoom/visitor.rb#661 + sig { override.params(node: ::Prism::ReturnNode).void } + def visit_return_node(node); end - # changes the sigil to have a new strictness in a list of files - # - # source://spoom//lib/spoom/sorbet/sigils.rb#83 - sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) } - def change_sigil_in_files(path_list, new_strictness); end + # source://spoom//lib/spoom/visitor.rb#666 + sig { override.params(node: ::Prism::SelfNode).void } + def visit_self_node(node); end - # returns a string containing the strictness of a sigil in a file at the passed path - # * returns nil if no sigil - # - # source://spoom//lib/spoom/sorbet/sigils.rb#63 - sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) } - def file_strictness(path); end + # source://spoom//lib/spoom/visitor.rb#671 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end - # returns the full sigil comment string for the passed strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#38 - sig { params(strictness: ::String).returns(::String) } - def sigil_string(strictness); end + # source://spoom//lib/spoom/visitor.rb#676 + sig { override.params(node: ::Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end - # returns the strictness of a sigil in the passed file content string (nil if no sigil) - # - # source://spoom//lib/spoom/sorbet/sigils.rb#50 - sig { params(content: ::String).returns(T.nilable(::String)) } - def strictness_in_content(content); end + # source://spoom//lib/spoom/visitor.rb#681 + sig { override.params(node: ::Prism::SourceFileNode).void } + def visit_source_file_node(node); end - # returns a string which is the passed content but with the sigil updated to a new strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#56 - sig { params(content: ::String, new_strictness: ::String).returns(::String) } - def update_sigil(content, new_strictness); end + # source://spoom//lib/spoom/visitor.rb#686 + sig { override.params(node: ::Prism::SourceLineNode).void } + def visit_source_line_node(node); end - # returns true if the passed string is a valid strictness (else false) - # - # source://spoom//lib/spoom/sorbet/sigils.rb#44 - sig { params(strictness: ::String).returns(T::Boolean) } - def valid_strictness?(strictness); end - end -end + # source://spoom//lib/spoom/visitor.rb#691 + sig { override.params(node: ::Prism::SplatNode).void } + def visit_splat_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#31 -Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) + # source://spoom//lib/spoom/visitor.rb#696 + sig { override.params(node: ::Prism::StatementsNode).void } + def visit_statements_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#13 -Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#701 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#12 -Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#706 + sig { override.params(node: ::Prism::SuperNode).void } + def visit_super_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#17 -Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#711 + sig { override.params(node: ::Prism::SymbolNode).void } + def visit_symbol_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#15 -Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#716 + sig { override.params(node: ::Prism::TrueNode).void } + def visit_true_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#16 -Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#721 + sig { override.params(node: ::Prism::UndefNode).void } + def visit_undef_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#14 -Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) + # source://spoom//lib/spoom/visitor.rb#726 + sig { override.params(node: ::Prism::UnlessNode).void } + def visit_unless_node(node); end -# source://spoom//lib/spoom/sorbet/sigils.rb#19 -Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) + # source://spoom//lib/spoom/visitor.rb#731 + sig { override.params(node: ::Prism::UntilNode).void } + def visit_until_node(node); end -# source://spoom//lib/spoom/timeline.rb#5 -class Spoom::Timeline - # source://spoom//lib/spoom/timeline.rb#9 - sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void } - def initialize(context, from, to); end + # source://spoom//lib/spoom/visitor.rb#736 + sig { override.params(node: ::Prism::WhenNode).void } + def visit_when_node(node); end - # Return one commit for each date in `dates` - # - # source://spoom//lib/spoom/timeline.rb#36 - sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) } - def commits_for_dates(dates); end + # source://spoom//lib/spoom/visitor.rb#741 + sig { override.params(node: ::Prism::WhileNode).void } + def visit_while_node(node); end - # Return all months between `from` and `to` - # - # source://spoom//lib/spoom/timeline.rb#23 - sig { returns(T::Array[::Time]) } - def months; end + # source://spoom//lib/spoom/visitor.rb#746 + sig { override.params(node: ::Prism::XStringNode).void } + def visit_x_string_node(node); end - # Return one commit for each month between `from` and `to` - # - # source://spoom//lib/spoom/timeline.rb#17 - sig { returns(T::Array[::Spoom::Git::Commit]) } - def ticks; end + # source://spoom//lib/spoom/visitor.rb#751 + sig { override.params(node: ::Prism::YieldNode).void } + def visit_yield_node(node); end end - -# source://spoom//lib/spoom/version.rb#5 -Spoom::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/tapioca@0.15.0.rbi b/sorbet/rbi/gems/tapioca@0.15.1.rbi similarity index 99% rename from sorbet/rbi/gems/tapioca@0.15.0.rbi rename to sorbet/rbi/gems/tapioca@0.15.1.rbi index 723abdc..03fdd66 100644 --- a/sorbet/rbi/gems/tapioca@0.15.0.rbi +++ b/sorbet/rbi/gems/tapioca@0.15.1.rbi @@ -232,7 +232,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end @@ -401,7 +401,7 @@ end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 module Tapioca class << self - # source://tapioca//lib/tapioca.rb#19 + # source://tapioca//lib/tapioca.rb#20 sig do type_parameters(:Result) .params( @@ -412,7 +412,7 @@ module Tapioca end end -# source://tapioca//lib/tapioca.rb#37 +# source://tapioca//lib/tapioca.rb#38 Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 @@ -452,13 +452,13 @@ module Tapioca::BundlerExt::AutoRequireHook end end -# source://tapioca//lib/tapioca.rb#60 +# source://tapioca//lib/tapioca.rb#61 Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#59 +# source://tapioca//lib/tapioca.rb#60 Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#58 +# source://tapioca//lib/tapioca.rb#59 Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/cli.rb#5 @@ -1155,7 +1155,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end @@ -1166,42 +1166,42 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end -# source://tapioca//lib/tapioca.rb#44 +# source://tapioca//lib/tapioca.rb#45 Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#40 +# source://tapioca//lib/tapioca.rb#41 Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#56 +# source://tapioca//lib/tapioca.rb#57 Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#41 +# source://tapioca//lib/tapioca.rb#42 Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#46 +# source://tapioca//lib/tapioca.rb#47 Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) -# source://tapioca//lib/tapioca.rb#38 +# source://tapioca//lib/tapioca.rb#39 Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#39 +# source://tapioca//lib/tapioca.rb#40 Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/rbi_formatter.rb#31 Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) -# source://tapioca//lib/tapioca.rb#55 +# source://tapioca//lib/tapioca.rb#56 Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) -# source://tapioca//lib/tapioca.rb#42 +# source://tapioca//lib/tapioca.rb#43 Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#43 +# source://tapioca//lib/tapioca.rb#44 Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/dsl/compilers.rb#5 @@ -2207,7 +2207,7 @@ class Tapioca::GemInfo < ::T::Struct sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } def from_spec(spec); end - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end @@ -2684,7 +2684,7 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array] # - # source://sorbet-runtime/0.5.11466/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11481/lib/types/private/methods/_methods.rb#257 def eager_load_paths(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/loaders/loader.rb#188 @@ -3494,10 +3494,10 @@ module Tapioca::Runtime::Trackers::Tracker end end -# source://tapioca//lib/tapioca.rb#33 +# source://tapioca//lib/tapioca.rb#34 Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#32 +# source://tapioca//lib/tapioca.rb#33 Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 @@ -3592,7 +3592,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11466/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11481/lib/types/private/methods/_methods.rb#257 def engines(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 @@ -3629,10 +3629,10 @@ end # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca.rb#35 +# source://tapioca//lib/tapioca.rb#36 Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#34 +# source://tapioca//lib/tapioca.rb#35 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108 diff --git a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi index 2a7541f..e805297 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi @@ -388,7 +388,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.11466/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 def inherited(s); end end end