diff --git a/Gemfile.lock b/Gemfile.lock index d38255a..7a4fb0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -50,7 +50,7 @@ GEM smart_properties bigdecimal (4.1.2) builder (3.3.0) - code_teams (1.3.0) + code_teams (1.3.1) sorbet-runtime coderay (1.1.3) concurrent-ruby (1.3.8) @@ -68,7 +68,7 @@ GEM prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.21.2) + json (3.0.2) language_server-protocol (3.17.0.6) lint_roller (1.1.0) logger (1.7.0) @@ -99,7 +99,7 @@ GEM parser prism (>= 1.4.0) zeitwerk (>= 2.6.1) - parallel (2.1.0) + parallel (2.2.0) parser (3.3.12.0) ast (~> 2.4.1) racc @@ -138,10 +138,10 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.4.2) - rbi (0.3.14) + rbi (0.4.3) prism (~> 1.0) rbs (>= 4.0.1) - rbs (4.1.0.pre.2) + rbs (4.2.1.pre.1) logger prism (>= 1.6.0) tsort @@ -150,12 +150,12 @@ GEM prism (>= 1.6.0) rbs (>= 4.0.0) tsort - regexp_parser (2.12.0) + regexp_parser (2.13.1) reline (0.7.0) io-console (~> 0.5) - require-hooks (0.4.0) + require-hooks (0.5.1) rexml (3.4.4) - rubocop (1.90.0) + rubocop (1.91.0) json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -169,19 +169,19 @@ GEM rubocop-ast (1.50.0) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-gusto (11.3.0) + rubocop-gusto (11.8.1) code_teams lint_roller rubocop (>= 1.76) rubocop-performance rubocop-rake rubocop-rspec - rubocop-sorbet + rubocop-sorbet (>= 0.13.0) smart_todo thor - rubocop-performance (1.26.1) + rubocop-performance (1.27.0) lint_roller (~> 1.1) - rubocop (>= 1.75.0, < 2.0) + rubocop (>= 1.89.0, < 2.0) rubocop-ast (>= 1.47.1, < 2.0) rubocop-rake (0.7.1) lint_roller (~> 1.1) @@ -190,40 +190,42 @@ GEM lint_roller (~> 1.1) regexp_parser (>= 2.0) rubocop (~> 1.86, >= 1.86.2) - rubocop-sorbet (0.12.0) + rubocop-sorbet (0.16.0) lint_roller + rbi (~> 0.4) rubocop (>= 1.75.2) + spoom (~> 1.8) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubydex (0.2.7-arm64-darwin) - rubydex (0.2.7-x86_64-darwin) - rubydex (0.2.7-x86_64-linux) + rubydex (0.4.1-arm64-darwin) + rubydex (0.4.1-x86_64-darwin) + rubydex (0.4.1-x86_64-linux) securerandom (0.4.1) smart_properties (1.17.0) smart_todo (1.11.0) prism (~> 1.0) - sorbet (0.6.13454) - sorbet-static (= 0.6.13454) - sorbet-runtime (0.6.13454) - sorbet-static (0.6.13454-universal-darwin) - sorbet-static (0.6.13454-x86_64-linux) - sorbet-static-and-runtime (0.6.13454) - sorbet (= 0.6.13454) - sorbet-runtime (= 0.6.13454) - spoom (1.8.2) + sorbet (0.6.13506) + sorbet-static (= 0.6.13506) + sorbet-runtime (0.6.13506) + sorbet-static (0.6.13506-universal-darwin) + sorbet-static (0.6.13506-x86_64-linux) + sorbet-static-and-runtime (0.6.13506) + sorbet (= 0.6.13506) + sorbet-runtime (= 0.6.13506) + spoom (1.8.10) erubi (>= 1.10.0) prism (>= 0.28.0) - rbi (>= 0.3.14) + rbi (>= 0.4.2) rbs (>= 4.0.0.dev.5) rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - tapioca (0.19.2) + tapioca (0.20.0) benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (>= 0.3.7) + rbi (>= 0.4.1) require-hooks (>= 0.2.2) rubydex (>= 0.1.0.beta10) sorbet-static-and-runtime (>= 0.6.12698) @@ -234,9 +236,9 @@ GEM tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.2.0) - unicode-emoji (~> 4.1) - unicode-emoji (4.2.0) + unicode-display_width (3.3.0) + unicode-emoji (~> 4.3) + unicode-emoji (4.3.0) uri (1.1.1) useragent (0.16.11) zeitwerk (2.8.3) diff --git a/sorbet/rbi/gems/code_teams@1.3.0.rbi b/sorbet/rbi/gems/code_teams@1.3.1.rbi similarity index 99% rename from sorbet/rbi/gems/code_teams@1.3.0.rbi rename to sorbet/rbi/gems/code_teams@1.3.1.rbi index d24179a..e827d60 100644 --- a/sorbet/rbi/gems/code_teams@1.3.0.rbi +++ b/sorbet/rbi/gems/code_teams@1.3.1.rbi @@ -163,7 +163,7 @@ class CodeTeams::Team def config_yml; end # pkg:gem/code_teams#lib/code_teams.rb:142 - def eql?(*args, **_arg1, &blk); end + def eql?(*args, **, &blk); end # pkg:gem/code_teams#lib/code_teams.rb:145 sig { returns(::Integer) } diff --git a/sorbet/rbi/gems/parallel@2.1.0.rbi b/sorbet/rbi/gems/parallel@2.2.0.rbi similarity index 83% rename from sorbet/rbi/gems/parallel@2.1.0.rbi rename to sorbet/rbi/gems/parallel@2.2.0.rbi index f785286..416a258 100644 --- a/sorbet/rbi/gems/parallel@2.1.0.rbi +++ b/sorbet/rbi/gems/parallel@2.2.0.rbi @@ -20,11 +20,11 @@ module Parallel # pkg:gem/parallel#lib/parallel.rb:261 def each_with_index(array, options = T.unsafe(nil), &block); end - # pkg:gem/parallel#lib/parallel.rb:320 - def filter_map(*_arg0, **_arg1, &_arg2); end + # pkg:gem/parallel#lib/parallel.rb:333 + def filter_map(*, **, &); end - # pkg:gem/parallel#lib/parallel.rb:316 - def flat_map(*_arg0, **_arg1, &_arg2); end + # pkg:gem/parallel#lib/parallel.rb:329 + def flat_map(*, **, &); end # pkg:gem/parallel#lib/parallel.rb:241 def in_processes(options = T.unsafe(nil), &block); end @@ -35,97 +35,105 @@ module Parallel # pkg:gem/parallel#lib/parallel.rb:265 def map(source, options = T.unsafe(nil), &block); end - # pkg:gem/parallel#lib/parallel.rb:312 + # pkg:gem/parallel#lib/parallel.rb:325 def map_with_index(array, options = T.unsafe(nil), &block); end # Number of physical processor cores on the current system. # - # pkg:gem/parallel#lib/parallel.rb:325 + # pkg:gem/parallel#lib/parallel.rb:338 def physical_processor_count; end # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, # used for process scheduling # - # pkg:gem/parallel#lib/parallel.rb:355 + # pkg:gem/parallel#lib/parallel.rb:368 def processor_count; end - # pkg:gem/parallel#lib/parallel.rb:359 + # pkg:gem/parallel#lib/parallel.rb:372 def worker_number; end # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed # - # pkg:gem/parallel#lib/parallel.rb:364 + # pkg:gem/parallel#lib/parallel.rb:377 def worker_number=(worker_num); end private - # pkg:gem/parallel#lib/parallel.rb:397 + # pkg:gem/parallel#lib/parallel.rb:410 def add_progress_bar!(job_factory, options); end - # pkg:gem/parallel#lib/parallel.rb:738 + # pkg:gem/parallel#lib/parallel.rb:797 def available_processor_count; end - # pkg:gem/parallel#lib/parallel.rb:686 + # pkg:gem/parallel#lib/parallel.rb:745 def call_with_index(item, index, options, &block); end - # pkg:gem/parallel#lib/parallel.rb:616 + # pkg:gem/parallel#lib/parallel.rb:655 def create_workers(job_factory, options, &block); end # options is either a Integer or a Hash with :count # - # pkg:gem/parallel#lib/parallel.rb:676 + # pkg:gem/parallel#lib/parallel.rb:735 def extract_count_from_options(options); end - # pkg:gem/parallel#lib/parallel.rb:704 + # pkg:gem/parallel#lib/parallel.rb:763 def instrument_finish(item, index, result, options); end # yield results in the order of the input items # needs to use `options` to store state between executions # needs to use `done` index since a nil result would also be valid # - # pkg:gem/parallel#lib/parallel.rb:713 + # pkg:gem/parallel#lib/parallel.rb:772 def instrument_finish_in_order(item, index, result, options); end - # pkg:gem/parallel#lib/parallel.rb:733 + # pkg:gem/parallel#lib/parallel.rb:792 def instrument_start(item, index, options); end - # pkg:gem/parallel#lib/parallel.rb:370 + # pkg:gem/parallel#lib/parallel.rb:383 def physical_processor_count_windows; end - # pkg:gem/parallel#lib/parallel.rb:651 + # pkg:gem/parallel#lib/parallel.rb:710 def process_incoming_jobs(read, write, job_factory, options, &block); end - # pkg:gem/parallel#lib/parallel.rb:526 + # ractors cannot execute blocks, so run the callback directly when not using ractors + # + # pkg:gem/parallel#lib/parallel.rb:548 + def ractor_block(options); end + + # pkg:gem/parallel#lib/parallel.rb:554 def ractor_build(use_port); end - # pkg:gem/parallel#lib/parallel.rb:547 + # pkg:gem/parallel#lib/parallel.rb:577 def ractor_result(item, index, result, results, results_mutex, options); end - # pkg:gem/parallel#lib/parallel.rb:552 + # pkg:gem/parallel#lib/parallel.rb:582 + def ractor_send(ractor, callback, job, options); end + + # pkg:gem/parallel#lib/parallel.rb:588 def ractor_stop(ractor); end - # pkg:gem/parallel#lib/parallel.rb:604 + # pkg:gem/parallel#lib/parallel.rb:643 def replace_worker(job_factory, workers, index, options, blk); end - # pkg:gem/parallel#lib/parallel.rb:391 + # pkg:gem/parallel#lib/parallel.rb:404 def run(command); end - # pkg:gem/parallel#lib/parallel.rb:697 + # pkg:gem/parallel#lib/parallel.rb:756 def with_instrumentation(item, index, options); end - # pkg:gem/parallel#lib/parallel.rb:422 + # pkg:gem/parallel#lib/parallel.rb:435 def work_direct(job_factory, options, &block); end - # pkg:gem/parallel#lib/parallel.rb:556 + # pkg:gem/parallel#lib/parallel.rb:594 def work_in_processes(job_factory, options, &blk); end - # pkg:gem/parallel#lib/parallel.rb:466 + # pkg:gem/parallel#lib/parallel.rb:481 def work_in_ractors(job_factory, options); end - # pkg:gem/parallel#lib/parallel.rb:441 + # pkg:gem/parallel#lib/parallel.rb:456 def work_in_threads(job_factory, options, &block); end - # pkg:gem/parallel#lib/parallel.rb:624 + # pkg:gem/parallel#lib/parallel.rb:670 def worker(job_factory, options, &block); end end end @@ -216,10 +224,13 @@ class Parallel::Serializer::Hmac # pkg:gem/parallel#lib/parallel/serializer.rb:22 def initialize(inner: T.unsafe(nil), secret: T.unsafe(nil)); end - # pkg:gem/parallel#lib/parallel/serializer.rb:27 + # pkg:gem/parallel#lib/parallel/serializer.rb:31 def dump(data, io); end - # pkg:gem/parallel#lib/parallel/serializer.rb:33 + # pkg:gem/parallel#lib/parallel/serializer.rb:27 + def inspect; end + + # pkg:gem/parallel#lib/parallel/serializer.rb:37 def load(io); end end diff --git a/sorbet/rbi/gems/rbi@0.3.14.rbi b/sorbet/rbi/gems/rbi@0.4.3.rbi similarity index 83% rename from sorbet/rbi/gems/rbi@0.3.14.rbi rename to sorbet/rbi/gems/rbi@0.4.3.rbi index dd7d020..6653035 100644 --- a/sorbet/rbi/gems/rbi@0.3.14.rbi +++ b/sorbet/rbi/gems/rbi@0.4.3.rbi @@ -14,21 +14,21 @@ # pkg:gem/rbi#lib/rbi.rb:7 module RBI; end -# pkg:gem/rbi#lib/rbi/model.rb:862 +# pkg:gem/rbi#lib/rbi/model.rb:1011 class RBI::Arg < ::RBI::Node - # pkg:gem/rbi#lib/rbi/model.rb:867 + # pkg:gem/rbi#lib/rbi/model.rb:1016 sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(value, loc: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/model.rb:873 + # pkg:gem/rbi#lib/rbi/model.rb:1022 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # pkg:gem/rbi#lib/rbi/model.rb:878 + # pkg:gem/rbi#lib/rbi/model.rb:1027 sig { returns(::String) } def to_s; end - # pkg:gem/rbi#lib/rbi/model.rb:864 + # pkg:gem/rbi#lib/rbi/model.rb:1013 sig { returns(::String) } def value; end end @@ -165,7 +165,7 @@ class RBI::AttrAccessor < ::RBI::Attr # @override # - # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:130 + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:131 sig { override.returns(T::Array[::RBI::Method]) } def convert_to_methods; end @@ -206,7 +206,7 @@ class RBI::AttrReader < ::RBI::Attr # @override # - # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:145 + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:146 sig { override.returns(T::Array[::RBI::Method]) } def convert_to_methods; end @@ -247,7 +247,7 @@ class RBI::AttrWriter < ::RBI::Attr # @override # - # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:155 + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:156 sig { override.returns(T::Array[::RBI::Method]) } def convert_to_methods; end @@ -273,12 +273,12 @@ class RBI::BlankLine < ::RBI::Comment def initialize(loc: T.unsafe(nil)); end end -# pkg:gem/rbi#lib/rbi/model.rb:710 +# pkg:gem/rbi#lib/rbi/model.rb:843 class RBI::BlockParam < ::RBI::Param - # pkg:gem/rbi#lib/rbi/model.rb:712 + # pkg:gem/rbi#lib/rbi/model.rb:849 sig do params( - name: ::String, + name: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment]), block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) @@ -286,9 +286,25 @@ class RBI::BlockParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # pkg:gem/rbi#lib/rbi/model.rb:868 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + # @override # - # pkg:gem/rbi#lib/rbi/model.rb:719 + # pkg:gem/rbi#lib/rbi/model.rb:863 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:846 + sig { override.returns(T.nilable(::String)) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:857 sig { override.returns(::String) } def to_s; end end @@ -364,24 +380,24 @@ end # end # ~~~ # -# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:591 +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:634 class RBI::ConflictTree < ::RBI::Tree - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:599 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:642 sig { params(left_name: ::String, right_name: ::String).void } def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:593 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:636 sig { returns(::RBI::Tree) } def left; end - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:596 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:639 sig { returns(::String) } def left_name; end - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:593 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:636 def right; end - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:596 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:639 def right_name; end end @@ -439,11 +455,11 @@ class RBI::DuplicateNodeError < ::RBI::Error; end # pkg:gem/rbi#lib/rbi.rb:8 class RBI::Error < ::StandardError; end -# pkg:gem/rbi#lib/rbi/model.rb:752 +# pkg:gem/rbi#lib/rbi/model.rb:901 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:754 + # pkg:gem/rbi#lib/rbi/model.rb:903 sig do params( name: ::String, @@ -457,7 +473,7 @@ class RBI::Extend < ::RBI::Mixin # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:524 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:567 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -469,7 +485,7 @@ class RBI::Extend < ::RBI::Mixin # @override # - # pkg:gem/rbi#lib/rbi/model.rb:761 + # pkg:gem/rbi#lib/rbi/model.rb:910 sig { override.returns(::String) } def to_s; end end @@ -506,7 +522,7 @@ class RBI::File sig { returns(T::Boolean) } def empty?; end - # pkg:gem/rbi#lib/rbi/printer.rb:877 + # pkg:gem/rbi#lib/rbi/printer.rb:866 sig do params( out: T.any(::IO, ::StringIO), @@ -517,11 +533,11 @@ class RBI::File end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1236 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1218 sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1242 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1224 sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end @@ -539,7 +555,7 @@ class RBI::File # pkg:gem/rbi#lib/rbi/model.rb:148 def strictness=(_arg0); end - # pkg:gem/rbi#lib/rbi/printer.rb:883 + # pkg:gem/rbi#lib/rbi/printer.rb:872 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end @@ -645,11 +661,11 @@ class RBI::GroupNodesError < ::RBI::Error; end # Sorbet's misc. # -# pkg:gem/rbi#lib/rbi/model.rb:1187 +# pkg:gem/rbi#lib/rbi/model.rb:1349 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:1192 + # pkg:gem/rbi#lib/rbi/model.rb:1354 sig do params( name: ::String, @@ -662,7 +678,7 @@ class RBI::Helper < ::RBI::NodeWithComments # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:540 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:583 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -672,22 +688,22 @@ class RBI::Helper < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # pkg:gem/rbi#lib/rbi/model.rb:1189 + # pkg:gem/rbi#lib/rbi/model.rb:1351 sig { returns(::String) } def name; end # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1200 + # pkg:gem/rbi#lib/rbi/model.rb:1362 sig { override.returns(::String) } def to_s; end end -# pkg:gem/rbi#lib/rbi/model.rb:738 +# pkg:gem/rbi#lib/rbi/model.rb:887 class RBI::Include < ::RBI::Mixin include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:740 + # pkg:gem/rbi#lib/rbi/model.rb:889 sig do params( name: ::String, @@ -701,7 +717,7 @@ class RBI::Include < ::RBI::Mixin # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:516 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:559 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -713,7 +729,7 @@ class RBI::Include < ::RBI::Mixin # @override # - # pkg:gem/rbi#lib/rbi/model.rb:747 + # pkg:gem/rbi#lib/rbi/model.rb:896 sig { override.returns(::String) } def to_s; end end @@ -773,28 +789,28 @@ module RBI::Indexable def index_ids; end end -# pkg:gem/rbi#lib/rbi/model.rb:883 +# pkg:gem/rbi#lib/rbi/model.rb:1032 class RBI::KwArg < ::RBI::Arg - # pkg:gem/rbi#lib/rbi/model.rb:888 + # pkg:gem/rbi#lib/rbi/model.rb:1037 sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(keyword, value, loc: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/model.rb:894 + # pkg:gem/rbi#lib/rbi/model.rb:1043 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # pkg:gem/rbi#lib/rbi/model.rb:885 + # pkg:gem/rbi#lib/rbi/model.rb:1034 sig { returns(::String) } def keyword; end - # pkg:gem/rbi#lib/rbi/model.rb:899 + # pkg:gem/rbi#lib/rbi/model.rb:1048 sig { returns(::String) } def to_s; end end -# pkg:gem/rbi#lib/rbi/model.rb:678 +# pkg:gem/rbi#lib/rbi/model.rb:754 class RBI::KwOptParam < ::RBI::Param - # pkg:gem/rbi#lib/rbi/model.rb:683 + # pkg:gem/rbi#lib/rbi/model.rb:763 sig do params( name: ::String, @@ -806,20 +822,36 @@ class RBI::KwOptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # pkg:gem/rbi#lib/rbi/model.rb:783 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + # @override # - # pkg:gem/rbi#lib/rbi/model.rb:691 + # pkg:gem/rbi#lib/rbi/model.rb:778 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:757 + sig { override.returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:772 sig { override.returns(::String) } def to_s; end - # pkg:gem/rbi#lib/rbi/model.rb:680 + # pkg:gem/rbi#lib/rbi/model.rb:760 sig { returns(::String) } def value; end end -# pkg:gem/rbi#lib/rbi/model.rb:664 +# pkg:gem/rbi#lib/rbi/model.rb:724 class RBI::KwParam < ::RBI::Param - # pkg:gem/rbi#lib/rbi/model.rb:666 + # pkg:gem/rbi#lib/rbi/model.rb:730 sig do params( name: ::String, @@ -830,19 +862,35 @@ class RBI::KwParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # pkg:gem/rbi#lib/rbi/model.rb:749 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + # @override # - # pkg:gem/rbi#lib/rbi/model.rb:673 + # pkg:gem/rbi#lib/rbi/model.rb:744 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:727 + sig { override.returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:738 sig { override.returns(::String) } def to_s; end end -# pkg:gem/rbi#lib/rbi/model.rb:696 +# pkg:gem/rbi#lib/rbi/model.rb:788 class RBI::KwRestParam < ::RBI::Param - # pkg:gem/rbi#lib/rbi/model.rb:698 + # pkg:gem/rbi#lib/rbi/model.rb:794 sig do params( - name: ::String, + name: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment]), block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) @@ -850,9 +898,25 @@ class RBI::KwRestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # pkg:gem/rbi#lib/rbi/model.rb:813 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + # @override # - # pkg:gem/rbi#lib/rbi/model.rb:705 + # pkg:gem/rbi#lib/rbi/model.rb:808 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:791 + sig { override.returns(T.nilable(::String)) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:802 sig { override.returns(::String) } def to_s; end end @@ -892,11 +956,15 @@ class RBI::Loc sig { params(other: ::RBI::Loc).returns(::RBI::Loc) } def join(other); end - # pkg:gem/rbi#lib/rbi/loc.rb:61 + # pkg:gem/rbi#lib/rbi/loc.rb:52 + sig { returns(T::Boolean) } + def multiline?; end + + # pkg:gem/rbi#lib/rbi/loc.rb:68 sig { returns(T.nilable(::String)) } def source; end - # pkg:gem/rbi#lib/rbi/loc.rb:52 + # pkg:gem/rbi#lib/rbi/loc.rb:59 sig { returns(::String) } def to_s; end @@ -952,7 +1020,7 @@ class RBI::Method < ::RBI::NodeWithComments sig { params(param: ::RBI::Param).void } def <<(param); end - # pkg:gem/rbi#lib/rbi/model.rb:546 + # pkg:gem/rbi#lib/rbi/model.rb:551 sig { params(name: ::String).void } def add_block_param(name); end @@ -968,6 +1036,10 @@ class RBI::Method < ::RBI::NodeWithComments sig { params(name: ::String).void } def add_kw_rest_param(name); end + # pkg:gem/rbi#lib/rbi/model.rb:546 + sig { void } + def add_no_kw_param; end + # pkg:gem/rbi#lib/rbi/model.rb:521 sig { params(name: ::String, default_value: ::String).void } def add_opt_param(name, default_value); end @@ -980,11 +1052,12 @@ class RBI::Method < ::RBI::NodeWithComments sig { params(name: ::String).void } def add_rest_param(name); end - # pkg:gem/rbi#lib/rbi/model.rb:559 + # pkg:gem/rbi#lib/rbi/model.rb:565 sig do params( params: T.nilable(T::Array[::RBI::SigParam]), return_type: T.any(::RBI::Type, ::String), + bind_type: T.nilable(T.any(::RBI::Type, ::String)), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, @@ -994,7 +1067,7 @@ class RBI::Method < ::RBI::NodeWithComments block: T.nilable(T.proc.params(node: ::RBI::Sig).void) ).void end - def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end + def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), bind_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end # @override # @@ -1002,7 +1075,7 @@ class RBI::Method < ::RBI::NodeWithComments sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # pkg:gem/rbi#lib/rbi/model.rb:585 + # pkg:gem/rbi#lib/rbi/model.rb:593 sig { returns(::String) } def fully_qualified_name; end @@ -1021,7 +1094,7 @@ class RBI::Method < ::RBI::NodeWithComments # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:476 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:482 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end @@ -1047,7 +1120,7 @@ class RBI::Method < ::RBI::NodeWithComments # @override # - # pkg:gem/rbi#lib/rbi/model.rb:595 + # pkg:gem/rbi#lib/rbi/model.rb:603 sig { override.returns(::String) } def to_s; end @@ -1060,16 +1133,24 @@ class RBI::Method < ::RBI::NodeWithComments private - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:498 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:504 sig { params(other: ::RBI::Method).returns(T::Boolean) } - def at_most_one_side_anonymous?(other); end + def compatible_params?(other); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:513 + sig { params(preferred: T::Array[::RBI::Param], fallback: T::Array[::RBI::Param]).returns(T::Array[::RBI::Param]) } + def merge_params(preferred, fallback); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:524 + sig { params(sigs: T::Array[::RBI::Sig], params: T::Array[::RBI::Param]).void } + def rename_sigs_params(sigs, params); end end -# pkg:gem/rbi#lib/rbi/model.rb:1231 +# pkg:gem/rbi#lib/rbi/model.rb:1393 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:1238 + # pkg:gem/rbi#lib/rbi/model.rb:1400 sig do params( name: ::String, @@ -1083,7 +1164,7 @@ class RBI::MixesInClassMethods < ::RBI::Mixin # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:532 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:575 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -1095,18 +1176,18 @@ class RBI::MixesInClassMethods < ::RBI::Mixin # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1245 + # pkg:gem/rbi#lib/rbi/model.rb:1407 sig { override.returns(::String) } def to_s; end end # @abstract # -# pkg:gem/rbi#lib/rbi/model.rb:727 +# pkg:gem/rbi#lib/rbi/model.rb:876 class RBI::Mixin < ::RBI::NodeWithComments abstract! - # pkg:gem/rbi#lib/rbi/model.rb:732 + # pkg:gem/rbi#lib/rbi/model.rb:881 sig do params( name: ::String, @@ -1119,11 +1200,11 @@ class RBI::Mixin < ::RBI::NodeWithComments # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:508 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:551 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # pkg:gem/rbi#lib/rbi/model.rb:729 + # pkg:gem/rbi#lib/rbi/model.rb:878 sig { returns(T::Array[::String]) } def names; end end @@ -1158,6 +1239,35 @@ class RBI::Module < ::RBI::Scope def name; end end +# pkg:gem/rbi#lib/rbi/model.rb:818 +class RBI::NoKwParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:820 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::NoKwParam).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:838 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:833 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:827 + sig { override.returns(::String) } + def to_s; end +end + # @abstract # # pkg:gem/rbi#lib/rbi/model.rb:8 @@ -1171,6 +1281,7 @@ class RBI::Node # Can `self` and `_other` be merged into a single definition? # # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:302 + sig { params(_other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(_other); end # pkg:gem/rbi#lib/rbi/model.rb:22 @@ -1205,7 +1316,7 @@ class RBI::Node # pkg:gem/rbi#lib/rbi/model.rb:10 def parent_tree=(_arg0); end - # pkg:gem/rbi#lib/rbi/printer.rb:895 + # pkg:gem/rbi#lib/rbi/printer.rb:884 sig do params( out: T.any(::IO, ::StringIO), @@ -1216,7 +1327,7 @@ class RBI::Node end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1251 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1233 sig do params( out: T.any(::IO, ::StringIO), @@ -1227,7 +1338,7 @@ class RBI::Node end def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1257 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1239 sig { params(indent: ::Integer, print_locs: T::Boolean, positional_names: T::Boolean).returns(::String) } def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end @@ -1239,7 +1350,7 @@ class RBI::Node sig { params(version: ::Gem::Version).returns(T::Boolean) } def satisfies_version?(version); end - # pkg:gem/rbi#lib/rbi/printer.rb:901 + # pkg:gem/rbi#lib/rbi/printer.rb:890 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end @@ -1284,9 +1395,9 @@ class RBI::NodeWithComments < ::RBI::Node def version_requirements; end end -# pkg:gem/rbi#lib/rbi/model.rb:638 +# pkg:gem/rbi#lib/rbi/model.rb:660 class RBI::OptParam < ::RBI::Param - # pkg:gem/rbi#lib/rbi/model.rb:643 + # pkg:gem/rbi#lib/rbi/model.rb:669 sig do params( name: ::String, @@ -1298,38 +1409,58 @@ class RBI::OptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # pkg:gem/rbi#lib/rbi/model.rb:640 + # pkg:gem/rbi#lib/rbi/model.rb:689 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:684 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:663 + sig { override.returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:678 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:666 sig { returns(::String) } def value; end end # @abstract # -# pkg:gem/rbi#lib/rbi/model.rb:601 +# pkg:gem/rbi#lib/rbi/model.rb:609 class RBI::Param < ::RBI::NodeWithComments abstract! - # pkg:gem/rbi#lib/rbi/model.rb:606 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # pkg:gem/rbi#lib/rbi/model.rb:624 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end + # pkg:gem/rbi#lib/rbi/model.rb:611 + sig { params(loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/model.rb:619 - sig { returns(T::Boolean) } + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:625 + sig { abstract.returns(T::Boolean) } def anonymous?; end - # pkg:gem/rbi#lib/rbi/model.rb:603 - sig { returns(::String) } - def name; end - # @override # - # pkg:gem/rbi#lib/rbi/model.rb:614 - sig { override.returns(::String) } - def to_s; end + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:543 + sig { override.params(other: T.nilable(::RBI::Node)).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:616 + sig { returns(T.nilable(::String)) } + def name; end end # pkg:gem/rbi#lib/rbi/parser.rb:7 @@ -1378,123 +1509,131 @@ class RBI::Parser end end -# pkg:gem/rbi#lib/rbi/parser.rb:1003 +# pkg:gem/rbi#lib/rbi/parser.rb:1044 class RBI::Parser::HeredocLocationVisitor < ::Prism::Visitor - # pkg:gem/rbi#lib/rbi/parser.rb:1005 + # pkg:gem/rbi#lib/rbi/parser.rb:1046 sig { params(source: ::Prism::Source, begin_offset: ::Integer, end_offset: ::Integer).void } def initialize(source, begin_offset, end_offset); end - # pkg:gem/rbi#lib/rbi/parser.rb:1036 + # pkg:gem/rbi#lib/rbi/parser.rb:1077 sig { returns(::Prism::Location) } def location; end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:1026 + # pkg:gem/rbi#lib/rbi/parser.rb:1067 sig { override.params(node: ::Prism::InterpolatedStringNode).void } def visit_interpolated_string_node(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:1015 + # pkg:gem/rbi#lib/rbi/parser.rb:1056 sig { override.params(node: ::Prism::StringNode).void } def visit_string_node(node); end private - # pkg:gem/rbi#lib/rbi/parser.rb:1047 + # pkg:gem/rbi#lib/rbi/parser.rb:1088 sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void } def handle_string_node(node); end end -# pkg:gem/rbi#lib/rbi/parser.rb:915 +# pkg:gem/rbi#lib/rbi/parser.rb:935 class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor - # pkg:gem/rbi#lib/rbi/parser.rb:920 + # pkg:gem/rbi#lib/rbi/parser.rb:940 sig { params(content: ::String, file: ::String).void } def initialize(content, file:); end - # pkg:gem/rbi#lib/rbi/parser.rb:986 + # pkg:gem/rbi#lib/rbi/parser.rb:1027 sig { params(node: ::Prism::CallNode, value: ::String).returns(T::Boolean) } def allow_incompatible_override?(node, value); end - # pkg:gem/rbi#lib/rbi/parser.rb:917 + # pkg:gem/rbi#lib/rbi/parser.rb:937 sig { returns(::RBI::Sig) } def current; end + # pkg:gem/rbi#lib/rbi/parser.rb:1017 + sig { params(node: ::Prism::Node).returns(::String) } + def sig_param_name(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:1006 + sig { params(node: ::Prism::CallNode).returns(T.nilable(::String)) } + def sig_type_argument(node); end + # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:978 + # pkg:gem/rbi#lib/rbi/parser.rb:998 sig { override.params(node: ::Prism::AssocNode).void } def visit_assoc_node(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:928 + # pkg:gem/rbi#lib/rbi/parser.rb:948 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end end -# pkg:gem/rbi#lib/rbi/parser.rb:164 +# pkg:gem/rbi#lib/rbi/parser.rb:179 class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor - # pkg:gem/rbi#lib/rbi/parser.rb:172 + # pkg:gem/rbi#lib/rbi/parser.rb:187 sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } def initialize(source, comments:, file:); end - # pkg:gem/rbi#lib/rbi/parser.rb:169 + # pkg:gem/rbi#lib/rbi/parser.rb:184 sig { returns(T.nilable(::Prism::Node)) } def last_node; end - # pkg:gem/rbi#lib/rbi/parser.rb:166 + # pkg:gem/rbi#lib/rbi/parser.rb:181 sig { returns(::RBI::Tree) } def tree; end - # pkg:gem/rbi#lib/rbi/parser.rb:361 + # pkg:gem/rbi#lib/rbi/parser.rb:376 sig { params(node: ::Prism::CallNode).void } def visit_call_node(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:185 + # pkg:gem/rbi#lib/rbi/parser.rb:200 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:236 + # pkg:gem/rbi#lib/rbi/parser.rb:251 sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } def visit_constant_assign(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:229 + # pkg:gem/rbi#lib/rbi/parser.rb:244 sig { override.params(node: ::Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:221 + # pkg:gem/rbi#lib/rbi/parser.rb:236 sig { override.params(node: ::Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:291 + # pkg:gem/rbi#lib/rbi/parser.rb:306 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:313 + # pkg:gem/rbi#lib/rbi/parser.rb:328 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:332 + # pkg:gem/rbi#lib/rbi/parser.rb:347 sig { override.params(node: ::Prism::ProgramNode).void } def visit_program_node(node); end # @override # - # pkg:gem/rbi#lib/rbi/parser.rb:344 + # pkg:gem/rbi#lib/rbi/parser.rb:359 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end @@ -1502,49 +1641,49 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # Collect all the remaining comments within a node # - # pkg:gem/rbi#lib/rbi/parser.rb:539 + # pkg:gem/rbi#lib/rbi/parser.rb:554 sig { params(node: ::Prism::Node).void } def collect_dangling_comments(node); end # Collect all the remaining comments after visiting the tree # - # pkg:gem/rbi#lib/rbi/parser.rb:557 + # pkg:gem/rbi#lib/rbi/parser.rb:572 sig { void } def collect_orphan_comments; end - # pkg:gem/rbi#lib/rbi/parser.rb:580 + # pkg:gem/rbi#lib/rbi/parser.rb:595 sig { returns(::RBI::Tree) } def current_scope; end - # pkg:gem/rbi#lib/rbi/parser.rb:585 + # pkg:gem/rbi#lib/rbi/parser.rb:600 sig { returns(T::Array[::RBI::Sig]) } def current_sigs; end - # pkg:gem/rbi#lib/rbi/parser.rb:592 + # pkg:gem/rbi#lib/rbi/parser.rb:607 sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } def detach_comments_from_sigs(sigs); end - # pkg:gem/rbi#lib/rbi/parser.rb:604 + # pkg:gem/rbi#lib/rbi/parser.rb:619 sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } def node_comments(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:666 + # pkg:gem/rbi#lib/rbi/parser.rb:681 sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } def parse_comment(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:699 + # pkg:gem/rbi#lib/rbi/parser.rb:714 sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } def parse_params(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:673 + # pkg:gem/rbi#lib/rbi/parser.rb:688 sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } def parse_send_args(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:765 + # pkg:gem/rbi#lib/rbi/parser.rb:785 sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } def parse_sig(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:774 + # pkg:gem/rbi#lib/rbi/parser.rb:794 sig do params( node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) @@ -1552,27 +1691,27 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor end def parse_struct(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:822 + # pkg:gem/rbi#lib/rbi/parser.rb:842 sig { params(send: ::Prism::CallNode).void } def parse_tstruct_field(send); end - # pkg:gem/rbi#lib/rbi/parser.rb:859 + # pkg:gem/rbi#lib/rbi/parser.rb:879 sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } def parse_visibility(name, node); end - # pkg:gem/rbi#lib/rbi/parser.rb:873 + # pkg:gem/rbi#lib/rbi/parser.rb:893 sig { void } def separate_header_comments; end - # pkg:gem/rbi#lib/rbi/parser.rb:883 + # pkg:gem/rbi#lib/rbi/parser.rb:903 sig { void } def set_root_tree_loc; end - # pkg:gem/rbi#lib/rbi/parser.rb:902 + # pkg:gem/rbi#lib/rbi/parser.rb:922 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t_enum_value?(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:897 + # pkg:gem/rbi#lib/rbi/parser.rb:917 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def type_variable_definition?(node); end end @@ -1585,10 +1724,14 @@ class RBI::Parser::Visitor < ::Prism::Visitor private - # pkg:gem/rbi#lib/rbi/parser.rb:143 + # pkg:gem/rbi#lib/rbi/parser.rb:158 sig { params(node: ::Prism::Node).returns(::Prism::Location) } def adjust_prism_location_for_heredoc(node); end + # pkg:gem/rbi#lib/rbi/parser.rb:149 + sig { params(node: ::Prism::Node).returns(T::Boolean) } + def braceless_shape?(node); end + # pkg:gem/rbi#lib/rbi/parser.rb:126 sig { params(node: ::Prism::Node).returns(::RBI::Loc) } def node_loc(node); end @@ -1601,13 +1744,17 @@ class RBI::Parser::Visitor < ::Prism::Visitor sig { params(node: ::Prism::Node).returns(::String) } def node_string!(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:154 + # pkg:gem/rbi#lib/rbi/parser.rb:169 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def self?(node); end - # pkg:gem/rbi#lib/rbi/parser.rb:159 + # pkg:gem/rbi#lib/rbi/parser.rb:174 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t_sig_without_runtime?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:143 + sig { params(node: ::Prism::Node).returns(::String) } + def type_string(node); end end # pkg:gem/rbi#lib/rbi/printer.rb:7 @@ -1698,41 +1845,41 @@ class RBI::Printer < ::RBI::Visitor private - # pkg:gem/rbi#lib/rbi/printer.rb:720 + # pkg:gem/rbi#lib/rbi/printer.rb:708 sig { params(node: ::RBI::Node).returns(T::Boolean) } def oneline?(node); end - # pkg:gem/rbi#lib/rbi/printer.rb:678 + # pkg:gem/rbi#lib/rbi/printer.rb:676 sig { params(node: ::RBI::Node).void } def print_blank_line_before(node); end - # pkg:gem/rbi#lib/rbi/printer.rb:688 + # pkg:gem/rbi#lib/rbi/printer.rb:686 sig { params(node: ::RBI::Node).void } def print_loc(node); end - # pkg:gem/rbi#lib/rbi/printer.rb:694 + # pkg:gem/rbi#lib/rbi/printer.rb:692 sig { params(node: ::RBI::Param, last: T::Boolean).void } def print_param_comment_leading_space(node, last:); end - # pkg:gem/rbi#lib/rbi/printer.rb:779 + # pkg:gem/rbi#lib/rbi/printer.rb:767 sig { params(node: ::RBI::Sig).void } def print_sig_as_block(node); end - # pkg:gem/rbi#lib/rbi/printer.rb:749 + # pkg:gem/rbi#lib/rbi/printer.rb:737 sig { params(node: ::RBI::Sig).void } def print_sig_as_line(node); end - # pkg:gem/rbi#lib/rbi/printer.rb:712 + # pkg:gem/rbi#lib/rbi/printer.rb:700 sig { params(node: ::RBI::SigParam, last: T::Boolean).void } def print_sig_param_comment_leading_space(node, last:); end - # pkg:gem/rbi#lib/rbi/printer.rb:849 + # pkg:gem/rbi#lib/rbi/printer.rb:837 sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } def sig_modifiers(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:489 + # pkg:gem/rbi#lib/rbi/printer.rb:487 sig { override.params(node: ::RBI::Arg).void } def visit_arg(node); end @@ -1766,7 +1913,7 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:408 + # pkg:gem/rbi#lib/rbi/printer.rb:407 sig { override.params(node: ::RBI::BlockParam).void } def visit_block_param(node); end @@ -1784,7 +1931,7 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:654 + # pkg:gem/rbi#lib/rbi/printer.rb:652 sig { override.params(node: ::RBI::ConflictTree).void } def visit_conflict_tree(node); end @@ -1796,49 +1943,49 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:421 + # pkg:gem/rbi#lib/rbi/printer.rb:419 sig { override.params(node: ::RBI::Extend).void } def visit_extend(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:623 + # pkg:gem/rbi#lib/rbi/printer.rb:621 sig { override.params(node: ::RBI::Group).void } def visit_group(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:607 + # pkg:gem/rbi#lib/rbi/printer.rb:605 sig { override.params(node: ::RBI::Helper).void } def visit_helper(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:415 + # pkg:gem/rbi#lib/rbi/printer.rb:413 sig { override.params(node: ::RBI::Include).void } def visit_include(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:495 + # pkg:gem/rbi#lib/rbi/printer.rb:493 sig { override.params(node: ::RBI::KwArg).void } def visit_kw_arg(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:393 + # pkg:gem/rbi#lib/rbi/printer.rb:389 sig { override.params(node: ::RBI::KwOptParam).void } def visit_kw_opt_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:386 + # pkg:gem/rbi#lib/rbi/printer.rb:383 sig { override.params(node: ::RBI::KwParam).void } def visit_kw_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:401 + # pkg:gem/rbi#lib/rbi/printer.rb:395 sig { override.params(node: ::RBI::KwRestParam).void } def visit_kw_rest_param(node); end @@ -1850,11 +1997,11 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:617 + # pkg:gem/rbi#lib/rbi/printer.rb:615 sig { override.params(node: ::RBI::MixesInClassMethods).void } def visit_mixes_in_class_methods(node); end - # pkg:gem/rbi#lib/rbi/printer.rb:426 + # pkg:gem/rbi#lib/rbi/printer.rb:424 sig { params(node: ::RBI::Mixin).void } def visit_mixin(node); end @@ -1864,6 +2011,12 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::Module).void } def visit_module(node); end + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:401 + sig { override.params(node: ::RBI::NoKwParam).void } + def visit_no_kw_param(node); end + # @override # # pkg:gem/rbi#lib/rbi/printer.rb:371 @@ -1872,19 +2025,19 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:456 + # pkg:gem/rbi#lib/rbi/printer.rb:454 sig { override.params(node: ::RBI::Private).void } def visit_private(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:450 + # pkg:gem/rbi#lib/rbi/printer.rb:448 sig { override.params(node: ::RBI::Protected).void } def visit_protected(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:444 + # pkg:gem/rbi#lib/rbi/printer.rb:442 sig { override.params(node: ::RBI::Public).void } def visit_public(node); end @@ -1902,13 +2055,13 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:644 + # pkg:gem/rbi#lib/rbi/printer.rb:642 sig { override.params(node: ::RBI::RequiresAncestor).void } def visit_requires_ancestor(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:379 + # pkg:gem/rbi#lib/rbi/printer.rb:377 sig { override.params(node: ::RBI::RestParam).void } def visit_rest_param(node); end @@ -1922,7 +2075,7 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:664 + # pkg:gem/rbi#lib/rbi/printer.rb:662 sig { override.params(node: ::RBI::ScopeConflict).void } def visit_scope_conflict(node); end @@ -1932,19 +2085,19 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:471 + # pkg:gem/rbi#lib/rbi/printer.rb:469 sig { override.params(node: ::RBI::Send).void } def visit_send(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:503 + # pkg:gem/rbi#lib/rbi/printer.rb:501 sig { override.params(node: ::RBI::Sig).void } def visit_sig(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:524 + # pkg:gem/rbi#lib/rbi/printer.rb:522 sig { override.params(node: ::RBI::SigParam).void } def visit_sig_param(node); end @@ -1960,25 +2113,25 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::Struct).void } def visit_struct(node); end - # pkg:gem/rbi#lib/rbi/printer.rb:549 + # pkg:gem/rbi#lib/rbi/printer.rb:547 sig { params(node: ::RBI::TStructField).void } def visit_t_struct_field(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:568 + # pkg:gem/rbi#lib/rbi/printer.rb:566 sig { override.params(node: ::RBI::TEnum).void } def visit_tenum(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:574 + # pkg:gem/rbi#lib/rbi/printer.rb:572 sig { override.params(node: ::RBI::TEnumBlock).void } def visit_tenum_block(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:587 + # pkg:gem/rbi#lib/rbi/printer.rb:585 sig { override.params(node: ::RBI::TEnumValue).void } def visit_tenum_value(node); end @@ -1990,40 +2143,40 @@ class RBI::Printer < ::RBI::Visitor # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:532 + # pkg:gem/rbi#lib/rbi/printer.rb:530 sig { override.params(node: ::RBI::TStruct).void } def visit_tstruct(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:538 + # pkg:gem/rbi#lib/rbi/printer.rb:536 sig { override.params(node: ::RBI::TStructConst).void } def visit_tstruct_const(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:544 + # pkg:gem/rbi#lib/rbi/printer.rb:542 sig { override.params(node: ::RBI::TStructProp).void } def visit_tstruct_prop(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:597 + # pkg:gem/rbi#lib/rbi/printer.rb:595 sig { override.params(node: ::RBI::TypeMember).void } def visit_type_member(node); end - # pkg:gem/rbi#lib/rbi/printer.rb:461 + # pkg:gem/rbi#lib/rbi/printer.rb:459 sig { params(node: ::RBI::Visibility).void } def visit_visibility(node); end # @override # - # pkg:gem/rbi#lib/rbi/printer.rb:630 + # pkg:gem/rbi#lib/rbi/printer.rb:628 sig { override.params(node: ::RBI::VisibilityGroup).void } def visit_visibility_group(node); end end -# pkg:gem/rbi#lib/rbi/printer.rb:846 +# pkg:gem/rbi#lib/rbi/printer.rb:834 RBI::Printer::EMPTY_MODIFIERS = T.let(T.unsafe(nil), Array) # pkg:gem/rbi#lib/rbi/printer.rb:10 @@ -2037,9 +2190,9 @@ RBI::Printer::MAX_CACHED_INDENT = T.let(T.unsafe(nil), Integer) # pkg:gem/rbi#lib/rbi/printer.rb:5 class RBI::PrinterError < ::RBI::Error; end -# pkg:gem/rbi#lib/rbi/model.rb:821 +# pkg:gem/rbi#lib/rbi/model.rb:970 class RBI::Private < ::RBI::Visibility - # pkg:gem/rbi#lib/rbi/model.rb:823 + # pkg:gem/rbi#lib/rbi/model.rb:972 sig do params( loc: T.nilable(::RBI::Loc), @@ -2050,9 +2203,9 @@ class RBI::Private < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# pkg:gem/rbi#lib/rbi/model.rb:813 +# pkg:gem/rbi#lib/rbi/model.rb:962 class RBI::Protected < ::RBI::Visibility - # pkg:gem/rbi#lib/rbi/model.rb:815 + # pkg:gem/rbi#lib/rbi/model.rb:964 sig do params( loc: T.nilable(::RBI::Loc), @@ -2063,9 +2216,9 @@ class RBI::Protected < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# pkg:gem/rbi#lib/rbi/model.rb:802 +# pkg:gem/rbi#lib/rbi/model.rb:951 class RBI::Public < ::RBI::Visibility - # pkg:gem/rbi#lib/rbi/model.rb:804 + # pkg:gem/rbi#lib/rbi/model.rb:953 sig do params( loc: T.nilable(::RBI::Loc), @@ -2078,7 +2231,7 @@ end # Shared default instance to avoid allocating a new Public on every Method/Attr creation. # -# pkg:gem/rbi#lib/rbi/model.rb:810 +# pkg:gem/rbi#lib/rbi/model.rb:959 RBI::Public::DEFAULT = T.let(T.unsafe(nil), RBI::Public) # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:5 @@ -2086,33 +2239,37 @@ module RBI::RBS; end # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:6 class RBI::RBS::MethodTypeTranslator - # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:22 - sig { params(method: ::RBI::Method).void } - def initialize(method); end + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:38 + sig { params(method: ::RBI::Method, options: ::RBI::RBS::MethodTypeTranslator::Options).void } + def initialize(method, options: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:19 + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:35 sig { returns(::RBI::Sig) } def result; end - # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:29 + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:47 sig { params(type: ::RBS::MethodType).void } def visit(type); end private - # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:101 + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:136 + sig { params(param: ::RBI::Param).returns(T.nilable(::String)) } + def anonymous_param_name(param); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:121 sig { params(param: ::RBS::Types::Function::Param, index: ::Integer).returns(::RBI::SigParam) } def translate_function_param(param, index); end - # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:116 + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:148 sig { params(type: T.untyped).returns(::RBI::Type) } def translate_type(type); end - # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:43 + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:63 sig { params(type: ::RBS::Types::Block).void } def visit_block_type(type); end - # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:58 + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:78 sig { params(type: ::RBS::Types::Function).void } def visit_function_type(type); end @@ -2126,9 +2283,30 @@ end # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:7 class RBI::RBS::MethodTypeTranslator::Error < ::RBI::Error; end +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:18 +class RBI::RBS::MethodTypeTranslator::Options + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:23 + sig { params(erase_generic_types: T::Boolean).void } + def initialize(erase_generic_types: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:20 + sig { returns(T::Boolean) } + def erase_generic_types; end + + class << self + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:30 + sig { returns(::RBI::RBS::MethodTypeTranslator::Options) } + def default; end + end +end + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:6 class RBI::RBS::TypeTranslator - # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:39 + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:41 + sig { params(options: ::RBI::RBS::MethodTypeTranslator::Options).void } + def initialize(options: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:46 sig do params( type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) @@ -2138,19 +2316,23 @@ class RBI::RBS::TypeTranslator private - # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:123 + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:225 + sig { params(type_name: ::String).returns(::String) } + def erase_t_generic_type(type_name); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:138 sig { params(type: ::RBS::Types::ClassInstance).returns(::RBI::Type) } def translate_class_instance(type); end - # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:131 + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:152 sig { params(type: ::RBS::Types::Function).returns(::RBI::Type) } def translate_function(type); end - # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:178 + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:220 sig { params(type_name: ::String).returns(::String) } def translate_t_generic_type(type_name); end - # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:111 + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:126 sig { params(type: ::RBS::Types::Alias).returns(::RBI::Type) } def translate_type_alias(type); end @@ -2165,8 +2347,20 @@ class RBI::RBS::TypeTranslator end end +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:211 +RBI::RBS::TypeTranslator::GENERIC_TYPE_TO_SORBET_GENERIC_TYPE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:38 +RBI::RBS::TypeTranslator::Options = RBI::RBS::MethodTypeTranslator::Options + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:198 +RBI::RBS::TypeTranslator::RUNTIME_GENERIC_TYPES = T.let(T.unsafe(nil), Array) + RBI::RBS::TypeTranslator::RbsType = T.type_alias { T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) } +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:215 +RBI::RBS::TypeTranslator::SORBET_GENERIC_TYPE_TO_GENERIC_TYPE = T.let(T.unsafe(nil), Hash) + # A comment representing a RBS type prefixed with `#:` # # pkg:gem/rbi#lib/rbi/model.rb:78 @@ -2178,23 +2372,24 @@ end # pkg:gem/rbi#lib/rbi/rbs_printer.rb:5 class RBI::RBSPrinter < ::RBI::Visitor - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:30 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:31 sig do params( out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean, positional_names: T::Boolean, - max_line_length: T.nilable(::Integer) + max_line_length: T.nilable(::Integer), + force_multiline_signatures: T::Boolean ).void end - def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil), force_multiline_signatures: T.unsafe(nil)); end # pkg:gem/rbi#lib/rbi/rbs_printer.rb:15 sig { returns(::Integer) } def current_indent; end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:49 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:58 sig { void } def dedent; end @@ -2204,7 +2399,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 def in_visibility_group=(_arg0); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:44 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:53 sig { void } def indent; end @@ -2225,11 +2420,11 @@ class RBI::RBSPrinter < ::RBI::Visitor # Print a string without indentation nor `\n` at the end. # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:55 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:64 sig { params(string: ::String).void } def print(string); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:302 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:311 sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } def print_attr_sig(node, sig); end @@ -2240,329 +2435,335 @@ class RBI::RBSPrinter < ::RBI::Visitor # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 def print_locs=(_arg0); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:400 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:409 sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } def print_method_sig(node, sig); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:417 - sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } - def print_method_sig_inline(node, sig); end + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:491 + sig { params(sig_param: T.nilable(::RBI::SigParam)).void } + def print_method_sig_block(sig_param); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:479 - sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } - def print_method_sig_multiline(node, sig); end + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:426 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig, multiline: T::Boolean).void } + def print_method_sig_content(node, sig, multiline:); end # Print a string with indentation and `\n` at the end. # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:75 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:84 sig { params(string: ::String).void } def printl(string); end # Print a string without indentation but with a `\n` at the end. # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:61 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:70 sig { params(string: T.nilable(::String)).void } def printn(string = T.unsafe(nil)); end # Print a string with indentation but without a `\n` at the end. # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:68 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:77 sig { params(string: T.nilable(::String)).void } def printt(string = T.unsafe(nil)); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:82 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:91 sig { override.params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:680 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:662 sig { override.params(node: ::RBI::Arg).void } def visit_arg(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:270 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:279 sig { params(node: ::RBI::Attr).void } def visit_attr(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:253 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:262 sig { override.params(node: ::RBI::AttrAccessor).void } def visit_attr_accessor(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:259 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:268 sig { override.params(node: ::RBI::AttrReader).void } def visit_attr_reader(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:265 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:274 sig { override.params(node: ::RBI::AttrWriter).void } def visit_attr_writer(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:124 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:133 sig { override.params(node: ::RBI::BlankLine).void } def visit_blank_line(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:612 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:594 sig { override.params(node: ::RBI::BlockParam).void } def visit_block_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:144 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:153 sig { override.params(node: ::RBI::Class).void } def visit_class(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:107 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:116 sig { override.params(node: ::RBI::Comment).void } def visit_comment(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:816 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:798 sig { override.params(node: ::RBI::ConflictTree).void } def visit_conflict_tree(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:237 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:246 sig { override.params(node: ::RBI::Const).void } def visit_const(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:624 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:606 sig { override.params(node: ::RBI::Extend).void } def visit_extend(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:94 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:103 sig { override.params(file: ::RBI::File).void } def visit_file(file); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:789 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:771 sig { override.params(node: ::RBI::Group).void } def visit_group(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:777 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:759 sig { override.params(node: ::RBI::Helper).void } def visit_helper(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:618 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:600 sig { override.params(node: ::RBI::Include).void } def visit_include(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:686 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:668 sig { override.params(node: ::RBI::KwArg).void } def visit_kw_arg(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:600 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:575 sig { override.params(node: ::RBI::KwOptParam).void } def visit_kw_opt_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:594 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:569 sig { override.params(node: ::RBI::KwParam).void } def visit_kw_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:606 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:581 sig { override.params(node: ::RBI::KwRestParam).void } def visit_kw_rest_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:325 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:334 sig { override.params(node: ::RBI::Method).void } def visit_method(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:783 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:765 sig { override.params(node: ::RBI::MixesInClassMethods).void } def visit_mixes_in_class_methods(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:629 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:611 sig { params(node: ::RBI::Mixin).void } def visit_mixin(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:138 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:147 sig { override.params(node: ::RBI::Module).void } def visit_module(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:574 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:588 + sig { override.params(node: ::RBI::NoKwParam).void } + def visit_no_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:552 sig { override.params(node: ::RBI::OptParam).void } def visit_opt_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:659 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:641 sig { override.params(node: ::RBI::Private).void } def visit_private(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:653 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:635 sig { override.params(node: ::RBI::Protected).void } def visit_protected(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:647 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:629 sig { override.params(node: ::RBI::Public).void } def visit_public(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:564 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:542 sig { override.params(node: ::RBI::ReqParam).void } def visit_req_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:810 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:792 sig { override.params(node: ::RBI::RequiresAncestor).void } def visit_requires_ancestor(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:584 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:562 sig { override.params(node: ::RBI::RestParam).void } def visit_rest_param(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:161 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:170 sig { params(node: ::RBI::Scope).void } def visit_scope(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:224 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:233 sig { params(node: ::RBI::Scope).void } def visit_scope_body(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:826 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:808 sig { override.params(node: ::RBI::ScopeConflict).void } def visit_scope_conflict(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:171 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:180 sig { params(node: ::RBI::Scope).void } def visit_scope_header(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:674 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:656 sig { override.params(node: ::RBI::Send).void } def visit_send(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:545 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:523 sig { params(node: ::RBI::Sig).void } def visit_sig(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:558 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:536 sig { params(node: ::RBI::SigParam).void } def visit_sig_param(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:156 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:165 sig { override.params(node: ::RBI::SingletonClass).void } def visit_singleton_class(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:150 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:159 sig { override.params(node: ::RBI::Struct).void } def visit_struct(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:743 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:725 sig { override.params(node: ::RBI::TEnum).void } def visit_tenum(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:749 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:731 sig { override.params(node: ::RBI::TEnumBlock).void } def visit_tenum_block(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:755 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:737 sig { override.params(node: ::RBI::TEnumValue).void } def visit_tenum_value(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:130 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:139 sig { override.params(node: ::RBI::Tree).void } def visit_tree(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:692 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:674 sig { override.params(node: ::RBI::TStruct).void } def visit_tstruct(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:727 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:709 sig { override.params(node: ::RBI::TStructConst).void } def visit_tstruct_const(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:735 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:717 sig { override.params(node: ::RBI::TStructProp).void } def visit_tstruct_prop(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:771 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:753 sig { override.params(node: ::RBI::TypeMember).void } def visit_type_member(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:664 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:646 sig { params(node: ::RBI::Visibility).void } def visit_visibility(node); end # @override # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:796 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:778 sig { override.params(node: ::RBI::VisibilityGroup).void } def visit_visibility_group(node); end private - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:929 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:908 sig { params(node: ::RBI::Node).returns(T::Boolean) } def oneline?(node); end @@ -2570,31 +2771,31 @@ class RBI::RBSPrinter < ::RBI::Visitor # # Returns `nil` is the string is not a `T.let`. # - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:963 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:942 sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } def parse_t_let(code); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:951 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:930 sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } def parse_type(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:842 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:824 sig { params(node: ::RBI::Node).void } def print_blank_line_before(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:861 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:843 sig { params(node: ::RBI::Node).void } def print_loc(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:903 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:892 sig { params(node: ::RBI::Param, last: T::Boolean).void } def print_param_comment_leading_space(node, last:); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:867 - sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } - def print_sig_param(node, param); end + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:849 + sig { params(sig_param: ::RBI::SigParam, method_param: ::RBI::Param).void } + def print_sig_param(sig_param, method_param); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:921 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:900 sig { params(node: ::RBI::SigParam, last: T::Boolean).void } def print_sig_param_comment_leading_space(node, last:); end end @@ -2607,7 +2808,7 @@ class RBI::ReplaceNodeError < ::RBI::Error; end # pkg:gem/rbi#lib/rbi/model.rb:630 class RBI::ReqParam < ::RBI::Param - # pkg:gem/rbi#lib/rbi/model.rb:632 + # pkg:gem/rbi#lib/rbi/model.rb:636 sig do params( name: ::String, @@ -2617,13 +2818,35 @@ class RBI::ReqParam < ::RBI::Param ).void end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:655 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:650 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:633 + sig { override.returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:644 + sig { override.returns(::String) } + def to_s; end end -# pkg:gem/rbi#lib/rbi/model.rb:1250 +# pkg:gem/rbi#lib/rbi/model.rb:1412 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:1255 + # pkg:gem/rbi#lib/rbi/model.rb:1417 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end @@ -2633,23 +2856,23 @@ class RBI::RequiresAncestor < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # pkg:gem/rbi#lib/rbi/model.rb:1252 + # pkg:gem/rbi#lib/rbi/model.rb:1414 sig { returns(::String) } def name; end # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1262 + # pkg:gem/rbi#lib/rbi/model.rb:1424 sig { override.returns(::String) } def to_s; end end -# pkg:gem/rbi#lib/rbi/model.rb:650 +# pkg:gem/rbi#lib/rbi/model.rb:694 class RBI::RestParam < ::RBI::Param - # pkg:gem/rbi#lib/rbi/model.rb:652 + # pkg:gem/rbi#lib/rbi/model.rb:700 sig do params( - name: ::String, + name: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment]), block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) @@ -2657,9 +2880,25 @@ class RBI::RestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # pkg:gem/rbi#lib/rbi/model.rb:719 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + # @override # - # pkg:gem/rbi#lib/rbi/model.rb:659 + # pkg:gem/rbi#lib/rbi/model.rb:714 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:697 + sig { override.returns(T.nilable(::String)) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:708 sig { override.returns(::String) } def to_s; end end @@ -2689,7 +2928,7 @@ class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor sig { params(method: ::RBI::Method).void } def add_method_sig(method); end - # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:55 + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:71 sig { params(node: ::RBI::NodeWithComments).void } def add_todo_comment(node); end end @@ -3376,34 +3615,34 @@ end # end # ~~~ # -# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:622 +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:665 class RBI::ScopeConflict < ::RBI::Tree - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:630 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:673 sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:624 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:667 sig { returns(::RBI::Scope) } def left; end - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:627 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:670 sig { returns(::String) } def left_name; end - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:624 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:667 def right; end - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:627 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:670 def right_name; end end # Sends # -# pkg:gem/rbi#lib/rbi/model.rb:831 +# pkg:gem/rbi#lib/rbi/model.rb:980 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:839 + # pkg:gem/rbi#lib/rbi/model.rb:988 sig do params( method: ::String, @@ -3415,21 +3654,21 @@ class RBI::Send < ::RBI::NodeWithComments end def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # pkg:gem/rbi#lib/rbi/model.rb:847 + # pkg:gem/rbi#lib/rbi/model.rb:996 sig { params(arg: ::RBI::Arg).void } def <<(arg); end - # pkg:gem/rbi#lib/rbi/model.rb:852 + # pkg:gem/rbi#lib/rbi/model.rb:1001 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # pkg:gem/rbi#lib/rbi/model.rb:836 + # pkg:gem/rbi#lib/rbi/model.rb:985 sig { returns(T::Array[::RBI::Arg]) } def args; end # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:548 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:591 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -3439,24 +3678,25 @@ class RBI::Send < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # pkg:gem/rbi#lib/rbi/model.rb:833 + # pkg:gem/rbi#lib/rbi/model.rb:982 sig { returns(::String) } def method; end - # pkg:gem/rbi#lib/rbi/model.rb:857 + # pkg:gem/rbi#lib/rbi/model.rb:1006 sig { returns(::String) } def to_s; end end # Sorbet's sigs # -# pkg:gem/rbi#lib/rbi/model.rb:906 +# pkg:gem/rbi#lib/rbi/model.rb:1055 class RBI::Sig < ::RBI::NodeWithComments - # pkg:gem/rbi#lib/rbi/model.rb:964 + # pkg:gem/rbi#lib/rbi/model.rb:1117 sig do params( params: T.nilable(T::Array[::RBI::SigParam]), return_type: T.any(::RBI::Type, ::String), + bind_type: T.nilable(T.any(::RBI::Type, ::String)), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, @@ -3471,99 +3711,106 @@ class RBI::Sig < ::RBI::NodeWithComments block: T.nilable(T.proc.params(node: ::RBI::Sig).void) ).void end - def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), allow_incompatible_override: T.unsafe(nil), allow_incompatible_override_visibility: T.unsafe(nil), without_runtime: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), bind_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), allow_incompatible_override: T.unsafe(nil), allow_incompatible_override_visibility: T.unsafe(nil), without_runtime: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # pkg:gem/rbi#lib/rbi/model.rb:996 + # pkg:gem/rbi#lib/rbi/model.rb:1151 sig { params(param: ::RBI::SigParam).void } def <<(param); end - # pkg:gem/rbi#lib/rbi/model.rb:1006 + # pkg:gem/rbi#lib/rbi/model.rb:1161 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # pkg:gem/rbi#lib/rbi/model.rb:1001 + # pkg:gem/rbi#lib/rbi/model.rb:1156 sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } def add_param(name, type); end - # pkg:gem/rbi#lib/rbi/model.rb:928 + # pkg:gem/rbi#lib/rbi/model.rb:1080 sig { returns(T::Boolean) } def allow_incompatible_override; end - # pkg:gem/rbi#lib/rbi/model.rb:928 + # pkg:gem/rbi#lib/rbi/model.rb:1080 def allow_incompatible_override=(_arg0); end - # pkg:gem/rbi#lib/rbi/model.rb:931 + # pkg:gem/rbi#lib/rbi/model.rb:1083 sig { returns(T::Boolean) } def allow_incompatible_override_visibility; end - # pkg:gem/rbi#lib/rbi/model.rb:931 + # pkg:gem/rbi#lib/rbi/model.rb:1083 def allow_incompatible_override_visibility=(_arg0); end - # pkg:gem/rbi#lib/rbi/model.rb:947 + # pkg:gem/rbi#lib/rbi/model.rb:1065 + sig { returns(T.nilable(T.any(::RBI::Type, ::String))) } + def bind_type; end + + # pkg:gem/rbi#lib/rbi/model.rb:1065 + def bind_type=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:1099 sig { returns(T.nilable(::Symbol)) } def checked; end - # pkg:gem/rbi#lib/rbi/model.rb:947 + # pkg:gem/rbi#lib/rbi/model.rb:1099 def checked=(_arg0); end - # pkg:gem/rbi#lib/rbi/model.rb:916 + # pkg:gem/rbi#lib/rbi/model.rb:1068 sig { returns(T::Boolean) } def is_abstract; end - # pkg:gem/rbi#lib/rbi/model.rb:916 + # pkg:gem/rbi#lib/rbi/model.rb:1068 def is_abstract=(_arg0); end - # pkg:gem/rbi#lib/rbi/model.rb:925 + # pkg:gem/rbi#lib/rbi/model.rb:1077 sig { returns(T::Boolean) } def is_final; end - # pkg:gem/rbi#lib/rbi/model.rb:925 + # pkg:gem/rbi#lib/rbi/model.rb:1077 def is_final=(_arg0); end - # pkg:gem/rbi#lib/rbi/model.rb:922 + # pkg:gem/rbi#lib/rbi/model.rb:1074 sig { returns(T::Boolean) } def is_overridable; end - # pkg:gem/rbi#lib/rbi/model.rb:922 + # pkg:gem/rbi#lib/rbi/model.rb:1074 def is_overridable=(_arg0); end - # pkg:gem/rbi#lib/rbi/model.rb:919 + # pkg:gem/rbi#lib/rbi/model.rb:1071 sig { returns(T::Boolean) } def is_override; end - # pkg:gem/rbi#lib/rbi/model.rb:919 + # pkg:gem/rbi#lib/rbi/model.rb:1071 def is_override=(_arg0); end - # pkg:gem/rbi#lib/rbi/model.rb:908 + # pkg:gem/rbi#lib/rbi/model.rb:1057 sig { returns(T::Array[::RBI::SigParam]) } def params; end - # pkg:gem/rbi#lib/rbi/model.rb:913 + # pkg:gem/rbi#lib/rbi/model.rb:1062 sig { returns(T.any(::RBI::Type, ::String)) } def return_type; end - # pkg:gem/rbi#lib/rbi/model.rb:913 + # pkg:gem/rbi#lib/rbi/model.rb:1062 def return_type=(_arg0); end - # pkg:gem/rbi#lib/rbi/model.rb:937 + # pkg:gem/rbi#lib/rbi/model.rb:1089 sig { returns(T::Array[::String]) } def type_params; end - # pkg:gem/rbi#lib/rbi/model.rb:942 + # pkg:gem/rbi#lib/rbi/model.rb:1094 sig { returns(T::Boolean) } def type_params?; end - # pkg:gem/rbi#lib/rbi/model.rb:934 + # pkg:gem/rbi#lib/rbi/model.rb:1086 sig { returns(T::Boolean) } def without_runtime; end - # pkg:gem/rbi#lib/rbi/model.rb:934 + # pkg:gem/rbi#lib/rbi/model.rb:1086 def without_runtime=(_arg0); end end -# pkg:gem/rbi#lib/rbi/model.rb:1015 +# pkg:gem/rbi#lib/rbi/model.rb:1171 class RBI::SigParam < ::RBI::NodeWithComments - # pkg:gem/rbi#lib/rbi/model.rb:1023 + # pkg:gem/rbi#lib/rbi/model.rb:1179 sig do params( name: ::String, @@ -3575,19 +3822,25 @@ class RBI::SigParam < ::RBI::NodeWithComments end def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # pkg:gem/rbi#lib/rbi/model.rb:1037 + # pkg:gem/rbi#lib/rbi/model.rb:1199 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # pkg:gem/rbi#lib/rbi/model.rb:1032 + # pkg:gem/rbi#lib/rbi/model.rb:1194 sig { returns(T::Boolean) } def anonymous?; end - # pkg:gem/rbi#lib/rbi/model.rb:1017 + # pkg:gem/rbi#lib/rbi/model.rb:1173 sig { returns(::String) } def name; end - # pkg:gem/rbi#lib/rbi/model.rb:1020 + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1189 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:1176 sig { returns(T.any(::RBI::Type, ::String)) } def type; end end @@ -3659,9 +3912,9 @@ end # Sorbet's T::Enum # -# pkg:gem/rbi#lib/rbi/model.rb:1134 +# pkg:gem/rbi#lib/rbi/model.rb:1296 class RBI::TEnum < ::RBI::Class - # pkg:gem/rbi#lib/rbi/model.rb:1136 + # pkg:gem/rbi#lib/rbi/model.rb:1298 sig do params( name: ::String, @@ -3673,9 +3926,9 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# pkg:gem/rbi#lib/rbi/model.rb:1142 +# pkg:gem/rbi#lib/rbi/model.rb:1304 class RBI::TEnumBlock < ::RBI::Scope - # pkg:gem/rbi#lib/rbi/model.rb:1144 + # pkg:gem/rbi#lib/rbi/model.rb:1306 sig do params( loc: T.nilable(::RBI::Loc), @@ -3687,7 +3940,7 @@ class RBI::TEnumBlock < ::RBI::Scope # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1151 + # pkg:gem/rbi#lib/rbi/model.rb:1313 sig { override.returns(::String) } def fully_qualified_name; end @@ -3699,16 +3952,16 @@ class RBI::TEnumBlock < ::RBI::Scope # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1157 + # pkg:gem/rbi#lib/rbi/model.rb:1319 sig { override.returns(::String) } def to_s; end end -# pkg:gem/rbi#lib/rbi/model.rb:1162 +# pkg:gem/rbi#lib/rbi/model.rb:1324 class RBI::TEnumValue < ::RBI::NodeWithComments include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:1167 + # pkg:gem/rbi#lib/rbi/model.rb:1329 sig do params( name: ::String, @@ -3719,7 +3972,7 @@ class RBI::TEnumValue < ::RBI::NodeWithComments end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # pkg:gem/rbi#lib/rbi/model.rb:1174 + # pkg:gem/rbi#lib/rbi/model.rb:1336 sig { returns(::String) } def fully_qualified_name; end @@ -3729,22 +3982,22 @@ class RBI::TEnumValue < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # pkg:gem/rbi#lib/rbi/model.rb:1164 + # pkg:gem/rbi#lib/rbi/model.rb:1326 sig { returns(::String) } def name; end # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1180 + # pkg:gem/rbi#lib/rbi/model.rb:1342 sig { override.returns(::String) } def to_s; end end # Sorbet's T::Struct # -# pkg:gem/rbi#lib/rbi/model.rb:1046 +# pkg:gem/rbi#lib/rbi/model.rb:1208 class RBI::TStruct < ::RBI::Class - # pkg:gem/rbi#lib/rbi/model.rb:1048 + # pkg:gem/rbi#lib/rbi/model.rb:1210 sig do params( name: ::String, @@ -3756,11 +4009,11 @@ class RBI::TStruct < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# pkg:gem/rbi#lib/rbi/model.rb:1078 +# pkg:gem/rbi#lib/rbi/model.rb:1240 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:1086 + # pkg:gem/rbi#lib/rbi/model.rb:1248 sig do params( name: ::String, @@ -3775,13 +4028,13 @@ class RBI::TStructConst < ::RBI::TStructField # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:564 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:607 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1093 + # pkg:gem/rbi#lib/rbi/model.rb:1255 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -3793,18 +4046,18 @@ class RBI::TStructConst < ::RBI::TStructField # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1100 + # pkg:gem/rbi#lib/rbi/model.rb:1262 sig { override.returns(::String) } def to_s; end end # @abstract # -# pkg:gem/rbi#lib/rbi/model.rb:1055 +# pkg:gem/rbi#lib/rbi/model.rb:1217 class RBI::TStructField < ::RBI::NodeWithComments abstract! - # pkg:gem/rbi#lib/rbi/model.rb:1066 + # pkg:gem/rbi#lib/rbi/model.rb:1228 sig do params( name: ::String, @@ -3818,40 +4071,40 @@ class RBI::TStructField < ::RBI::NodeWithComments # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:556 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:599 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # pkg:gem/rbi#lib/rbi/model.rb:1063 + # pkg:gem/rbi#lib/rbi/model.rb:1225 sig { returns(T.nilable(::String)) } def default; end - # pkg:gem/rbi#lib/rbi/model.rb:1063 + # pkg:gem/rbi#lib/rbi/model.rb:1225 def default=(_arg0); end # @abstract # - # pkg:gem/rbi#lib/rbi/model.rb:1075 + # pkg:gem/rbi#lib/rbi/model.rb:1237 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # pkg:gem/rbi#lib/rbi/model.rb:1057 + # pkg:gem/rbi#lib/rbi/model.rb:1219 sig { returns(::String) } def name; end - # pkg:gem/rbi#lib/rbi/model.rb:1060 + # pkg:gem/rbi#lib/rbi/model.rb:1222 sig { returns(T.any(::RBI::Type, ::String)) } def type; end - # pkg:gem/rbi#lib/rbi/model.rb:1060 + # pkg:gem/rbi#lib/rbi/model.rb:1222 def type=(_arg0); end end -# pkg:gem/rbi#lib/rbi/model.rb:1105 +# pkg:gem/rbi#lib/rbi/model.rb:1267 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:1113 + # pkg:gem/rbi#lib/rbi/model.rb:1275 sig do params( name: ::String, @@ -3866,13 +4119,13 @@ class RBI::TStructProp < ::RBI::TStructField # @override # - # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:572 + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:615 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1120 + # pkg:gem/rbi#lib/rbi/model.rb:1282 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -3884,7 +4137,7 @@ class RBI::TStructProp < ::RBI::TStructField # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1127 + # pkg:gem/rbi#lib/rbi/model.rb:1289 sig { override.returns(::String) } def to_s; end end @@ -3905,7 +4158,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(node: ::RBI::Node).void } def <<(node); end - # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:63 + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:79 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end @@ -3988,23 +4241,23 @@ end class RBI::Type abstract! - # pkg:gem/rbi#lib/rbi/type.rb:993 + # pkg:gem/rbi#lib/rbi/type.rb:1000 sig { void } def initialize; end # @abstract # - # pkg:gem/rbi#lib/rbi/type.rb:1064 + # pkg:gem/rbi#lib/rbi/type.rb:1071 sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # pkg:gem/rbi#lib/rbi/type.rb:1067 + # pkg:gem/rbi#lib/rbi/type.rb:1074 sig { params(other: ::BasicObject).returns(T::Boolean) } def eql?(other); end # @override # - # pkg:gem/rbi#lib/rbi/type.rb:1073 + # pkg:gem/rbi#lib/rbi/type.rb:1080 sig { override.returns(::Integer) } def hash; end @@ -4018,13 +4271,13 @@ class RBI::Type # type.nilable.nilable.to_rbi # => "::T.nilable(String)" # ``` # - # pkg:gem/rbi#lib/rbi/type.rb:1007 + # pkg:gem/rbi#lib/rbi/type.rb:1014 sig { returns(::RBI::Type) } def nilable; end # Returns whether the type is nilable. # - # pkg:gem/rbi#lib/rbi/type.rb:1034 + # pkg:gem/rbi#lib/rbi/type.rb:1041 sig { returns(T::Boolean) } def nilable?; end @@ -4039,7 +4292,7 @@ class RBI::Type # type.non_nilable.non_nilable.to_rbi # => "String" # ``` # - # pkg:gem/rbi#lib/rbi/type.rb:1022 + # pkg:gem/rbi#lib/rbi/type.rb:1029 sig { returns(::RBI::Type) } def non_nilable; end @@ -4053,11 +4306,11 @@ class RBI::Type # # @abstract # - # pkg:gem/rbi#lib/rbi/type.rb:1048 + # pkg:gem/rbi#lib/rbi/type.rb:1055 sig { abstract.returns(::RBI::Type) } def normalize; end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1266 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1248 sig { returns(::String) } def rbs_string; end @@ -4071,19 +4324,19 @@ class RBI::Type # # @abstract # - # pkg:gem/rbi#lib/rbi/type.rb:1060 + # pkg:gem/rbi#lib/rbi/type.rb:1067 sig { abstract.returns(::RBI::Type) } def simplify; end # @abstract # - # pkg:gem/rbi#lib/rbi/type.rb:1079 + # pkg:gem/rbi#lib/rbi/type.rb:1086 sig { abstract.returns(::String) } def to_rbi; end # @override # - # pkg:gem/rbi#lib/rbi/type.rb:1083 + # pkg:gem/rbi#lib/rbi/type.rb:1090 sig { override.returns(::String) } def to_s; end @@ -4093,7 +4346,7 @@ class RBI::Type # Note that this method transforms types such as `T.all(String, String)` into `String`, so # it may return something other than a `All`. # - # pkg:gem/rbi#lib/rbi/type.rb:929 + # pkg:gem/rbi#lib/rbi/type.rb:936 sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } def all(type1, type2, *types); end @@ -4102,37 +4355,42 @@ class RBI::Type # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so # it may return something other than a `Any`. # - # pkg:gem/rbi#lib/rbi/type.rb:938 + # pkg:gem/rbi#lib/rbi/type.rb:945 sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } def any(type1, type2, *types); end # Builds a type that represents `T.anything`. # - # pkg:gem/rbi#lib/rbi/type.rb:854 + # pkg:gem/rbi#lib/rbi/type.rb:861 sig { returns(::RBI::Type::Anything) } def anything; end # Builds a type that represents `T.attached_class`. # - # pkg:gem/rbi#lib/rbi/type.rb:860 + # pkg:gem/rbi#lib/rbi/type.rb:867 sig { returns(::RBI::Type::AttachedClass) } def attached_class; end # Builds a type that represents `T::Boolean`. # - # pkg:gem/rbi#lib/rbi/type.rb:866 + # pkg:gem/rbi#lib/rbi/type.rb:873 sig { returns(::RBI::Type::Boolean) } def boolean; end # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. # - # pkg:gem/rbi#lib/rbi/type.rb:910 - sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } - def class_of(type, type_parameter = T.unsafe(nil)); end + # pkg:gem/rbi#lib/rbi/type.rb:917 + sig do + params( + type: ::RBI::Type::Simple, + type_parameters: T.any(::RBI::Type, T::Array[::RBI::Type]) + ).returns(::RBI::Type::ClassOf) + end + def class_of(type, *type_parameters); end # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. # - # pkg:gem/rbi#lib/rbi/type.rb:946 + # pkg:gem/rbi#lib/rbi/type.rb:953 sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } def generic(name, *params); end @@ -4141,13 +4399,13 @@ class RBI::Type # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so # it may return something other than a `RBI::Type::Nilable`. # - # pkg:gem/rbi#lib/rbi/type.rb:919 + # pkg:gem/rbi#lib/rbi/type.rb:926 sig { params(type: ::RBI::Type).returns(::RBI::Type) } def nilable(type); end # Builds a type that represents `T.noreturn`. # - # pkg:gem/rbi#lib/rbi/type.rb:872 + # pkg:gem/rbi#lib/rbi/type.rb:879 sig { returns(::RBI::Type::NoReturn) } def noreturn; end @@ -4161,19 +4419,19 @@ class RBI::Type # Builds a type that represents a proc type like `T.proc.void`. # - # pkg:gem/rbi#lib/rbi/type.rb:980 + # pkg:gem/rbi#lib/rbi/type.rb:987 sig { returns(::RBI::Type::Proc) } def proc; end # Builds a type that represents `T.self_type`. # - # pkg:gem/rbi#lib/rbi/type.rb:878 + # pkg:gem/rbi#lib/rbi/type.rb:885 sig { returns(::RBI::Type::SelfType) } def self_type; end # Builds a type that represents a shape type like `{name: String, age: Integer}`. # - # pkg:gem/rbi#lib/rbi/type.rb:972 + # pkg:gem/rbi#lib/rbi/type.rb:979 sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } def shape(types = T.unsafe(nil)); end @@ -4181,63 +4439,63 @@ class RBI::Type # # It raises a `NameError` if the name is not a valid Ruby class identifier. # - # pkg:gem/rbi#lib/rbi/type.rb:843 + # pkg:gem/rbi#lib/rbi/type.rb:850 sig { params(name: ::String).returns(::RBI::Type::Simple) } def simple(name); end # Builds a type that represents the class of another type like `T::Class[Foo]`. # - # pkg:gem/rbi#lib/rbi/type.rb:898 + # pkg:gem/rbi#lib/rbi/type.rb:905 sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } def t_class(type); end # Builds a type that represents the module of another type like `T::Module[Foo]`. # - # pkg:gem/rbi#lib/rbi/type.rb:904 + # pkg:gem/rbi#lib/rbi/type.rb:911 sig { params(type: ::RBI::Type).returns(::RBI::Type::Module) } def t_module(type); end # Builds a type that represents a tuple type like `[String, Integer]`. # - # pkg:gem/rbi#lib/rbi/type.rb:966 + # pkg:gem/rbi#lib/rbi/type.rb:973 sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } def tuple(*types); end # Builds a type that represents a type alias like `MyTypeAlias`. # - # pkg:gem/rbi#lib/rbi/type.rb:958 + # pkg:gem/rbi#lib/rbi/type.rb:965 sig { params(name: ::String, aliased_type: ::RBI::Type).returns(::RBI::Type::TypeAlias) } def type_alias(name, aliased_type); end # Builds a type that represents a type parameter like `T.type_parameter(:U)`. # - # pkg:gem/rbi#lib/rbi/type.rb:952 + # pkg:gem/rbi#lib/rbi/type.rb:959 sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } def type_parameter(name); end # Builds a type that represents `T.untyped`. # - # pkg:gem/rbi#lib/rbi/type.rb:884 + # pkg:gem/rbi#lib/rbi/type.rb:891 sig { returns(::RBI::Type::Untyped) } def untyped; end # Builds a type that represents `void`. # - # pkg:gem/rbi#lib/rbi/type.rb:890 + # pkg:gem/rbi#lib/rbi/type.rb:897 sig { returns(::RBI::Type::Void) } def void; end private - # pkg:gem/rbi#lib/rbi/type_parser.rb:322 + # pkg:gem/rbi#lib/rbi/type_parser.rb:320 sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } def call_chain(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:309 + # pkg:gem/rbi#lib/rbi/type_parser.rb:307 sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } def check_arguments_at_least!(node, count); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:294 + # pkg:gem/rbi#lib/rbi/type_parser.rb:292 sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } def check_arguments_exactly!(node, count); end @@ -4253,47 +4511,47 @@ class RBI::Type sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).returns(::RBI::Type) } def parse_constant_assignment(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:244 + # pkg:gem/rbi#lib/rbi/type_parser.rb:242 sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } def parse_proc(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:223 + # pkg:gem/rbi#lib/rbi/type_parser.rb:221 sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } def parse_shape(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:218 + # pkg:gem/rbi#lib/rbi/type_parser.rb:216 sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } def parse_tuple(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:335 + # pkg:gem/rbi#lib/rbi/type_parser.rb:333 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t?(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:354 + # pkg:gem/rbi#lib/rbi/type_parser.rb:352 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t_boolean?(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:361 + # pkg:gem/rbi#lib/rbi/type_parser.rb:359 sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } def t_class?(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:371 + # pkg:gem/rbi#lib/rbi/type_parser.rb:369 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t_class_of?(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:366 + # pkg:gem/rbi#lib/rbi/type_parser.rb:364 sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } def t_module?(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:378 + # pkg:gem/rbi#lib/rbi/type_parser.rb:376 sig { params(node: ::Prism::CallNode).returns(T::Boolean) } def t_proc?(node); end - # pkg:gem/rbi#lib/rbi/type_parser.rb:347 + # pkg:gem/rbi#lib/rbi/type_parser.rb:345 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t_type_alias?(node); end - # pkg:gem/rbi#lib/rbi/type.rb:987 + # pkg:gem/rbi#lib/rbi/type.rb:994 sig { params(name: ::String).returns(T::Boolean) } def valid_identifier?(name); end end @@ -4478,8 +4736,8 @@ end # pkg:gem/rbi#lib/rbi/type.rb:314 class RBI::Type::ClassOf < ::RBI::Type # pkg:gem/rbi#lib/rbi/type.rb:322 - sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } - def initialize(type, type_parameter = T.unsafe(nil)); end + sig { params(type: ::RBI::Type::Simple, type_parameters: ::RBI::Type).void } + def initialize(type, *type_parameters); end # @override # @@ -4510,8 +4768,8 @@ class RBI::Type::ClassOf < ::RBI::Type def type; end # pkg:gem/rbi#lib/rbi/type.rb:319 - sig { returns(T.nilable(::RBI::Type)) } - def type_parameter; end + sig { returns(T::Array[::RBI::Type]) } + def type_parameters; end end # A type that is composed of multiple types like `T.all(String, Integer)`. @@ -4685,61 +4943,61 @@ end # A proc type like `T.proc.void`. # -# pkg:gem/rbi#lib/rbi/type.rb:743 +# pkg:gem/rbi#lib/rbi/type.rb:750 class RBI::Type::Proc < ::RBI::Type - # pkg:gem/rbi#lib/rbi/type.rb:754 + # pkg:gem/rbi#lib/rbi/type.rb:761 sig { void } def initialize; end # @override # - # pkg:gem/rbi#lib/rbi/type.rb:763 + # pkg:gem/rbi#lib/rbi/type.rb:770 sig { override.params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # pkg:gem/rbi#lib/rbi/type.rb:791 + # pkg:gem/rbi#lib/rbi/type.rb:798 sig { params(type: T.untyped).returns(T.self_type) } def bind(type); end # @override # - # pkg:gem/rbi#lib/rbi/type.rb:823 + # pkg:gem/rbi#lib/rbi/type.rb:830 sig { override.returns(::RBI::Type) } def normalize; end - # pkg:gem/rbi#lib/rbi/type.rb:773 + # pkg:gem/rbi#lib/rbi/type.rb:780 sig { params(params: ::RBI::Type).returns(T.self_type) } def params(**params); end - # pkg:gem/rbi#lib/rbi/type.rb:751 + # pkg:gem/rbi#lib/rbi/type.rb:758 sig { returns(T.nilable(::RBI::Type)) } def proc_bind; end - # pkg:gem/rbi#lib/rbi/type.rb:745 + # pkg:gem/rbi#lib/rbi/type.rb:752 sig { returns(T::Hash[::Symbol, ::RBI::Type]) } def proc_params; end - # pkg:gem/rbi#lib/rbi/type.rb:748 + # pkg:gem/rbi#lib/rbi/type.rb:755 sig { returns(::RBI::Type) } def proc_returns; end - # pkg:gem/rbi#lib/rbi/type.rb:779 + # pkg:gem/rbi#lib/rbi/type.rb:786 sig { params(type: T.untyped).returns(T.self_type) } def returns(type); end # @override # - # pkg:gem/rbi#lib/rbi/type.rb:829 + # pkg:gem/rbi#lib/rbi/type.rb:836 sig { override.returns(::RBI::Type) } def simplify; end # @override # - # pkg:gem/rbi#lib/rbi/type.rb:798 + # pkg:gem/rbi#lib/rbi/type.rb:805 sig { override.returns(::String) } def to_rbi; end - # pkg:gem/rbi#lib/rbi/type.rb:785 + # pkg:gem/rbi#lib/rbi/type.rb:792 sig { returns(T.self_type) } def void; end end @@ -4789,13 +5047,13 @@ class RBI::Type::Shape < ::RBI::Type # @override # - # pkg:gem/rbi#lib/rbi/type.rb:729 + # pkg:gem/rbi#lib/rbi/type.rb:736 sig { override.returns(::RBI::Type) } def normalize; end # @override # - # pkg:gem/rbi#lib/rbi/type.rb:735 + # pkg:gem/rbi#lib/rbi/type.rb:742 sig { override.returns(::RBI::Type) } def simplify; end @@ -5110,11 +5368,11 @@ class RBI::Type::Void < ::RBI::Type def to_rbi; end end -# pkg:gem/rbi#lib/rbi/model.rb:1205 +# pkg:gem/rbi#lib/rbi/model.rb:1367 class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable - # pkg:gem/rbi#lib/rbi/model.rb:1210 + # pkg:gem/rbi#lib/rbi/model.rb:1372 sig do params( name: ::String, @@ -5126,7 +5384,7 @@ class RBI::TypeMember < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # pkg:gem/rbi#lib/rbi/model.rb:1218 + # pkg:gem/rbi#lib/rbi/model.rb:1380 sig { returns(::String) } def fully_qualified_name; end @@ -5136,113 +5394,113 @@ class RBI::TypeMember < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # pkg:gem/rbi#lib/rbi/model.rb:1207 + # pkg:gem/rbi#lib/rbi/model.rb:1369 sig { returns(::String) } def name; end # @override # - # pkg:gem/rbi#lib/rbi/model.rb:1226 + # pkg:gem/rbi#lib/rbi/model.rb:1388 sig { override.returns(::String) } def to_s; end - # pkg:gem/rbi#lib/rbi/model.rb:1207 + # pkg:gem/rbi#lib/rbi/model.rb:1369 def value; end end -# pkg:gem/rbi#lib/rbi/rbs_printer.rb:984 +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:963 class RBI::TypePrinter - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:989 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:968 sig { params(max_line_length: T.nilable(::Integer)).void } def initialize(max_line_length: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:986 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:965 sig { returns(::String) } def string; end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:995 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:974 sig { params(node: ::RBI::Type).void } def visit(node); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1117 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1099 sig { params(type: ::RBI::Type::All).void } def visit_all(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1127 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1109 sig { params(type: ::RBI::Type::Any).void } def visit_any(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1062 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1041 sig { params(type: ::RBI::Type::Anything).void } def visit_anything(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1087 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1066 sig { params(type: ::RBI::Type::AttachedClass).void } def visit_attached_class(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1046 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1025 sig { params(type: ::RBI::Type::Boolean).void } def visit_boolean(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1194 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1176 sig { params(type: ::RBI::Type::Class).void } def visit_class(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1105 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1084 sig { params(type: ::RBI::Type::ClassOf).void } def visit_class_of(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1051 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1030 sig { params(type: ::RBI::Type::Generic).void } def visit_generic(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1201 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1183 sig { params(type: ::RBI::Type::Module).void } def visit_module(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1092 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1071 sig { params(type: ::RBI::Type::Nilable).void } def visit_nilable(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1072 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1051 sig { params(type: ::RBI::Type::NoReturn).void } def visit_no_return(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1167 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1149 sig { params(type: ::RBI::Type::Proc).void } def visit_proc(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1082 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1061 sig { params(type: ::RBI::Type::SelfType).void } def visit_self_type(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1147 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1129 sig { params(type: ::RBI::Type::Shape).void } def visit_shape(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1041 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1020 sig { params(type: ::RBI::Type::Simple).void } def visit_simple(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1137 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1119 sig { params(type: ::RBI::Type::Tuple).void } def visit_tuple(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1189 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1171 sig { params(type: ::RBI::Type::TypeParameter).void } def visit_type_parameter(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1077 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1056 sig { params(type: ::RBI::Type::Untyped).void } def visit_untyped(type); end - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1067 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1046 sig { params(type: ::RBI::Type::Void).void } def visit_void(type); end private - # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1210 + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1192 sig { params(type_name: ::String).returns(::String) } def translate_t_type(type_name); end end @@ -5278,31 +5536,31 @@ RBI::VERSION = T.let(T.unsafe(nil), String) # @abstract # -# pkg:gem/rbi#lib/rbi/model.rb:769 +# pkg:gem/rbi#lib/rbi/model.rb:918 class RBI::Visibility < ::RBI::NodeWithComments abstract! - # pkg:gem/rbi#lib/rbi/model.rb:774 + # pkg:gem/rbi#lib/rbi/model.rb:923 sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # pkg:gem/rbi#lib/rbi/model.rb:780 + # pkg:gem/rbi#lib/rbi/model.rb:929 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # pkg:gem/rbi#lib/rbi/model.rb:797 + # pkg:gem/rbi#lib/rbi/model.rb:946 sig { returns(T::Boolean) } def private?; end - # pkg:gem/rbi#lib/rbi/model.rb:792 + # pkg:gem/rbi#lib/rbi/model.rb:941 sig { returns(T::Boolean) } def protected?; end - # pkg:gem/rbi#lib/rbi/model.rb:787 + # pkg:gem/rbi#lib/rbi/model.rb:936 sig { returns(T::Boolean) } def public?; end - # pkg:gem/rbi#lib/rbi/model.rb:771 + # pkg:gem/rbi#lib/rbi/model.rb:920 sig { returns(::Symbol) } def visibility; end end @@ -5328,189 +5586,193 @@ class RBI::Visitor sig { params(node: T.nilable(::RBI::Node)).void } def visit(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:108 + # pkg:gem/rbi#lib/rbi/visitor.rb:110 sig { params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end - # pkg:gem/rbi#lib/rbi/visitor.rb:113 + # pkg:gem/rbi#lib/rbi/visitor.rb:115 sig { params(file: ::RBI::File).void } def visit_file(file); end private - # pkg:gem/rbi#lib/rbi/visitor.rb:198 + # pkg:gem/rbi#lib/rbi/visitor.rb:203 sig { params(node: ::RBI::Arg).void } def visit_arg(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:147 + # pkg:gem/rbi#lib/rbi/visitor.rb:149 sig { params(node: ::RBI::AttrAccessor).void } def visit_attr_accessor(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:150 + # pkg:gem/rbi#lib/rbi/visitor.rb:152 sig { params(node: ::RBI::AttrReader).void } def visit_attr_reader(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:153 + # pkg:gem/rbi#lib/rbi/visitor.rb:155 sig { params(node: ::RBI::AttrWriter).void } def visit_attr_writer(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:126 + # pkg:gem/rbi#lib/rbi/visitor.rb:128 sig { params(node: ::RBI::BlankLine).void } def visit_blank_line(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:177 + # pkg:gem/rbi#lib/rbi/visitor.rb:182 sig { params(node: ::RBI::BlockParam).void } def visit_block_param(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:132 + # pkg:gem/rbi#lib/rbi/visitor.rb:134 sig { params(node: ::RBI::Class).void } def visit_class(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:120 + # pkg:gem/rbi#lib/rbi/visitor.rb:122 sig { params(node: ::RBI::Comment).void } def visit_comment(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:246 + # pkg:gem/rbi#lib/rbi/visitor.rb:251 sig { params(node: ::RBI::ConflictTree).void } def visit_conflict_tree(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:144 + # pkg:gem/rbi#lib/rbi/visitor.rb:146 sig { params(node: ::RBI::Const).void } def visit_const(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:183 + # pkg:gem/rbi#lib/rbi/visitor.rb:188 sig { params(node: ::RBI::Extend).void } def visit_extend(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:240 + # pkg:gem/rbi#lib/rbi/visitor.rb:245 sig { params(node: ::RBI::Group).void } def visit_group(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:228 + # pkg:gem/rbi#lib/rbi/visitor.rb:233 sig { params(node: ::RBI::Helper).void } def visit_helper(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:180 + # pkg:gem/rbi#lib/rbi/visitor.rb:185 sig { params(node: ::RBI::Include).void } def visit_include(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:201 + # pkg:gem/rbi#lib/rbi/visitor.rb:206 sig { params(node: ::RBI::KwArg).void } def visit_kw_arg(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:171 + # pkg:gem/rbi#lib/rbi/visitor.rb:173 sig { params(node: ::RBI::KwOptParam).void } def visit_kw_opt_param(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:168 + # pkg:gem/rbi#lib/rbi/visitor.rb:170 sig { params(node: ::RBI::KwParam).void } def visit_kw_param(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:174 + # pkg:gem/rbi#lib/rbi/visitor.rb:176 sig { params(node: ::RBI::KwRestParam).void } def visit_kw_rest_param(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:156 + # pkg:gem/rbi#lib/rbi/visitor.rb:158 sig { params(node: ::RBI::Method).void } def visit_method(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:234 + # pkg:gem/rbi#lib/rbi/visitor.rb:239 sig { params(node: ::RBI::MixesInClassMethods).void } def visit_mixes_in_class_methods(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:129 + # pkg:gem/rbi#lib/rbi/visitor.rb:131 sig { params(node: ::RBI::Module).void } def visit_module(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:162 + # pkg:gem/rbi#lib/rbi/visitor.rb:179 + sig { params(node: ::RBI::NoKwParam).void } + def visit_no_kw_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:164 sig { params(node: ::RBI::OptParam).void } def visit_opt_param(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:192 + # pkg:gem/rbi#lib/rbi/visitor.rb:197 sig { params(node: ::RBI::Private).void } def visit_private(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:189 + # pkg:gem/rbi#lib/rbi/visitor.rb:194 sig { params(node: ::RBI::Protected).void } def visit_protected(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:186 + # pkg:gem/rbi#lib/rbi/visitor.rb:191 sig { params(node: ::RBI::Public).void } def visit_public(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:123 + # pkg:gem/rbi#lib/rbi/visitor.rb:125 sig { params(node: ::RBI::RBSComment).void } def visit_rbs_comment(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:159 + # pkg:gem/rbi#lib/rbi/visitor.rb:161 sig { params(node: ::RBI::ReqParam).void } def visit_req_param(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:237 + # pkg:gem/rbi#lib/rbi/visitor.rb:242 sig { params(node: ::RBI::RequiresAncestor).void } def visit_requires_ancestor(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:165 + # pkg:gem/rbi#lib/rbi/visitor.rb:167 sig { params(node: ::RBI::RestParam).void } def visit_rest_param(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:249 + # pkg:gem/rbi#lib/rbi/visitor.rb:254 sig { params(node: ::RBI::ScopeConflict).void } def visit_scope_conflict(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:195 + # pkg:gem/rbi#lib/rbi/visitor.rb:200 sig { params(node: ::RBI::Send).void } def visit_send(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:204 + # pkg:gem/rbi#lib/rbi/visitor.rb:209 sig { params(node: ::RBI::Sig).void } def visit_sig(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:207 + # pkg:gem/rbi#lib/rbi/visitor.rb:212 sig { params(node: ::RBI::SigParam).void } def visit_sig_param(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:135 + # pkg:gem/rbi#lib/rbi/visitor.rb:137 sig { params(node: ::RBI::SingletonClass).void } def visit_singleton_class(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:138 + # pkg:gem/rbi#lib/rbi/visitor.rb:140 sig { params(node: ::RBI::Struct).void } def visit_struct(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:219 + # pkg:gem/rbi#lib/rbi/visitor.rb:224 sig { params(node: ::RBI::TEnum).void } def visit_tenum(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:222 + # pkg:gem/rbi#lib/rbi/visitor.rb:227 sig { params(node: ::RBI::TEnumBlock).void } def visit_tenum_block(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:225 + # pkg:gem/rbi#lib/rbi/visitor.rb:230 sig { params(node: ::RBI::TEnumValue).void } def visit_tenum_value(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:141 + # pkg:gem/rbi#lib/rbi/visitor.rb:143 sig { params(node: ::RBI::Tree).void } def visit_tree(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:210 + # pkg:gem/rbi#lib/rbi/visitor.rb:215 sig { params(node: ::RBI::TStruct).void } def visit_tstruct(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:213 + # pkg:gem/rbi#lib/rbi/visitor.rb:218 sig { params(node: ::RBI::TStructConst).void } def visit_tstruct_const(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:216 + # pkg:gem/rbi#lib/rbi/visitor.rb:221 sig { params(node: ::RBI::TStructProp).void } def visit_tstruct_prop(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:231 + # pkg:gem/rbi#lib/rbi/visitor.rb:236 sig { params(node: ::RBI::TypeMember).void } def visit_type_member(node); end - # pkg:gem/rbi#lib/rbi/visitor.rb:243 + # pkg:gem/rbi#lib/rbi/visitor.rb:248 sig { params(node: ::RBI::VisibilityGroup).void } def visit_visibility_group(node); end end diff --git a/sorbet/rbi/gems/rbs@4.1.0.pre.2.rbi b/sorbet/rbi/gems/rbs@4.2.1.pre.1.rbi similarity index 95% rename from sorbet/rbi/gems/rbs@4.1.0.pre.2.rbi rename to sorbet/rbi/gems/rbs@4.2.1.pre.1.rbi index 09d136d..1c72dca 100644 --- a/sorbet/rbi/gems/rbs@4.1.0.pre.2.rbi +++ b/sorbet/rbi/gems/rbs@4.2.1.pre.1.rbi @@ -2176,7 +2176,7 @@ class RBS::CLI::ColoredIO def initialize(stdout:); end # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:28 - def puts(*_arg0, **_arg1, &_arg2); end + def puts(*, **, &); end # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:20 def puts_green(string); end @@ -2971,18 +2971,18 @@ class RBS::DefinitionBuilder # pkg:gem/rbs#lib/rbs/definition_builder.rb:6 def ancestor_builder; end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:195 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:198 def build_instance(type_name); end # pkg:gem/rbs#lib/rbs/definition_builder.rb:43 def build_interface(type_name); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:327 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:330 def build_singleton(type_name); end # Builds a definition for singleton without .new method. # - # pkg:gem/rbs#lib/rbs/definition_builder.rb:257 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:260 def build_singleton0(type_name); end # pkg:gem/rbs#lib/rbs/definition_builder.rb:85 @@ -2991,7 +2991,7 @@ class RBS::DefinitionBuilder # pkg:gem/rbs#lib/rbs/definition_builder.rb:33 def define_interface(definition, type_name, subst); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:695 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:698 def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end # pkg:gem/rbs#lib/rbs/definition_builder.rb:25 @@ -3000,19 +3000,19 @@ class RBS::DefinitionBuilder # pkg:gem/rbs#lib/rbs/definition_builder.rb:5 def env; end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:983 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:986 def expand_alias(type_name); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:987 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:990 def expand_alias1(type_name); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:994 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:997 def expand_alias2(type_name, args); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:634 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:637 def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:583 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:586 def insert_variable(type_name, variables, name:, type:, source:); end # pkg:gem/rbs#lib/rbs/definition_builder.rb:9 @@ -3021,7 +3021,7 @@ class RBS::DefinitionBuilder # pkg:gem/rbs#lib/rbs/definition_builder.rb:12 def interface_cache; end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:453 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:456 def interface_methods(interface_ancestors); end # pkg:gem/rbs#lib/rbs/definition_builder.rb:7 @@ -3033,34 +3033,34 @@ class RBS::DefinitionBuilder # pkg:gem/rbs#lib/rbs/definition_builder.rb:10 def singleton_cache; end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:483 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:486 def source_location(source, decl); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:973 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:976 def special_accessibility(is_instance, method_name); end # pkg:gem/rbs#lib/rbs/definition_builder.rb:66 def tapp_subst(name, args); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:979 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:982 def try_cache(type_name, cache:); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:1018 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1021 def update(env:, except:, ancestor_builder:); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:473 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:476 def validate_params_with(type_params, result:); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:1047 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1050 def validate_type_name(name, location); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:501 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:504 def validate_type_params(definition, ancestors:, methods:); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:1036 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1039 def validate_type_presence(type); end - # pkg:gem/rbs#lib/rbs/definition_builder.rb:594 + # pkg:gem/rbs#lib/rbs/definition_builder.rb:597 def validate_variable(var); end end @@ -3072,46 +3072,46 @@ class RBS::DefinitionBuilder::AncestorBuilder # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:151 def env; end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:664 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:667 def fill_ancestor_source(ancestor, name:, source:, &block); end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:492 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:495 def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:154 def instance_ancestors_cache; end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:628 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:631 def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:160 def interface_ancestors_cache; end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:474 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:480 def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:350 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:356 def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:192 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:198 def one_instance_ancestors(type_name); end # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:153 def one_instance_ancestors_cache; end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:331 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:337 def one_interface_ancestors(type_name); end # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:159 def one_interface_ancestors_cache; end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:277 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:283 def one_singleton_ancestors(type_name); end # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:156 def one_singleton_ancestors_cache; end - # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:573 + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:576 def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:157 @@ -3291,7 +3291,7 @@ class RBS::DefinitionError < ::RBS::BaseError; end # pkg:gem/rbs#lib/rbs/errors.rb:23 module RBS::DetailedMessageable # pkg:gem/rbs#lib/rbs/errors.rb:24 - def detailed_message(highlight: T.unsafe(nil), **_arg1); end + def detailed_message(highlight: T.unsafe(nil), **); end end # pkg:gem/rbs#lib/rbs/diff.rb:4 @@ -3582,6 +3582,9 @@ class RBS::Environment::ClassEntry # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:15 def <<(context_decl); end + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:68 + def align_params(decl); end + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:8 def context_decls; end @@ -3624,6 +3627,9 @@ class RBS::Environment::ModuleEntry # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:15 def <<(context_decl); end + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:62 + def align_params(decl); end + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:8 def context_decls; end @@ -3645,7 +3651,7 @@ class RBS::Environment::ModuleEntry # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:38 def type_params; end - # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:49 + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:74 def validate_type_params; end end @@ -4680,16 +4686,16 @@ class RBS::Parser def _parse_inline_trailing_annotation(_arg0, _arg1, _arg2, _arg3); end # pkg:gem/rbs#lib/rbs.rb:82 - def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end # pkg:gem/rbs#lib/rbs.rb:82 - def _parse_method_type_to_bytes(_arg0, _arg1, _arg2, _arg3, _arg4); end + def _parse_method_type_to_bytes(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end # pkg:gem/rbs#lib/rbs.rb:82 - def _parse_signature(_arg0, _arg1, _arg2); end + def _parse_signature(_arg0, _arg1, _arg2, _arg3); end # pkg:gem/rbs#lib/rbs.rb:82 - def _parse_signature_to_bytes(_arg0, _arg1, _arg2); end + def _parse_signature_to_bytes(_arg0, _arg1, _arg2, _arg3); end # pkg:gem/rbs#lib/rbs.rb:82 def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); end @@ -4703,7 +4709,7 @@ class RBS::Parser # pkg:gem/rbs#lib/rbs/parser_aux.rb:79 def buffer(source); end - # pkg:gem/rbs#lib/rbs/parser_aux.rb:132 + # pkg:gem/rbs#lib/rbs/parser_aux.rb:134 def byte_range(char_range, content); end # pkg:gem/rbs#lib/rbs/parser_aux.rb:70 @@ -4715,7 +4721,7 @@ class RBS::Parser # pkg:gem/rbs#lib/rbs/parser_aux.rb:122 def parse_inline_leading_annotation(source, range, variables: T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/parser_aux.rb:127 + # pkg:gem/rbs#lib/rbs/parser_aux.rb:128 def parse_inline_trailing_annotation(source, range, variables: T.unsafe(nil)); end # pkg:gem/rbs#lib/rbs/parser_aux.rb:14 @@ -4789,34 +4795,34 @@ module RBS::Prototype; end module RBS::Prototype::Helpers private - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:153 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:120 def any_node?(node, nodes: T.unsafe(nil), &block); end # NOTE: args_node may be a nil by a bug # https://bugs.ruby-lang.org/issues/17495 # - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:177 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:144 def args_from_node(args_node); end - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:65 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:32 def block_from_body(node); end - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:141 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:108 def each_child(node, &block); end - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:145 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:112 def each_node(nodes); end - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:165 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:132 def keyword_hash?(node); end - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:10 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:8 def parse_comments(string, include_trailing:); end - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:181 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:148 def symbol_literal_node?(node); end - # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:192 + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:159 def untyped; end end @@ -4951,82 +4957,122 @@ end class RBS::Prototype::RBI include ::RBS::Prototype::Helpers - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:12 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:22 def initialize; end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:545 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:35 + def append_decl(decl); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:394 + def attribute_type(kind, sigs); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:713 def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:549 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:717 def const_to_name(node); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:71 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:95 + def current_context; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:99 + def current_context!; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:87 def current_module; end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:75 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:91 def current_module!; end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:27 - def current_namespace; end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:8 def decls; end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:585 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:753 def each_arg(array, &block); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:599 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:767 def each_child(node); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:93 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:150 def join_comments(nodes, comments); end # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:10 def last_sig; end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:262 + # Visibility of a member, given as `private def ...` in RBS + # + # Returns `nil` for members in a visibility _section_, which `sync_visibility` emits instead. + # + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:106 + def member_visibility(context); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:423 def method_type(args_node, type_node, variables:, overloads:); end # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:9 def modules; end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:23 - def nested_name(name); end - - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:607 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:775 def node_to_hash(node); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:18 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:30 def parse(string); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:335 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:496 def parse_params(args_node, args, method_type, variables:, overloads:); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:87 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:144 def pop_sig; end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:537 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:705 def proc_type?(type_node); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:98 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:155 def process(node, comments:, outer: T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:33 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:359 + def process_attribute(node, comments:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:336 + def process_visibility(node, outer:, comments:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:43 def push_class(name, super_class, comment:); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:52 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:65 def push_module(name, comment:); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:79 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:136 def push_sig(node); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:460 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:113 + def sync_visibility(visibility); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:621 def type_of(type_node, variables:); end - # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:473 + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:636 def type_of0(type_node, variables:); end end +# pkg:gem/rbs#lib/rbs/prototype/rbi.rb:12 +class RBS::Prototype::RBI::Context + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:16 + def initialize(singleton:, visibility:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:13 + def singleton; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:13 + def singleton=(_arg0); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:14 + def visibility; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:14 + def visibility=(_arg0); end +end + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:5 class RBS::Prototype::Runtime include ::RBS::Prototype::Helpers @@ -5126,24 +5172,24 @@ class RBS::Prototype::Runtime def each_mixined_module_one(type_name, mod); end end -# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:213 +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:204 class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueObjectBase private - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:229 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:219 def add_decl_members(decl); end # def self.new: (untyped foo, untyped bar) -> instance # | (foo: untyped, bar: untyped) -> instance # - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:237 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:227 def build_s_new; end - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:225 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:215 def build_super_class; end class << self - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:214 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:205 def generatable?(target); end end end @@ -5185,27 +5231,27 @@ end class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::ValueObjectBase private - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:108 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:106 def add_decl_members(decl); end - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:165 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:158 def build_overload_for_keyword_arguments; end - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:151 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:144 def build_overload_for_positional_arguments; end # def self.keyword_init?: () -> bool? # - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:180 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:173 def build_s_keyword_init_p; end # def self.new: (?untyped foo, ?untyped bar) -> instance # | (?foo: untyped, ?bar: untyped) -> instance # - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:117 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:115 def build_s_new; end - # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:104 + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:102 def build_super_class; end class << self @@ -5214,9 +5260,6 @@ class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::Valu end end -# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:102 -RBS::Prototype::Runtime::StructGenerator::CAN_CALL_KEYWORD_INIT_P = T.let(T.unsafe(nil), TrueClass) - # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:10 class RBS::Prototype::Runtime::Todo # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:11 @@ -6048,33 +6091,33 @@ class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end # pkg:gem/rbs#lib/rbs/types.rb:108 class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end -# pkg:gem/rbs#lib/rbs/types.rb:1348 +# pkg:gem/rbs#lib/rbs/types.rb:1390 class RBS::Types::Block - # pkg:gem/rbs#lib/rbs/types.rb:1354 + # pkg:gem/rbs#lib/rbs/types.rb:1396 def initialize(type:, required:, location: T.unsafe(nil), self_type: T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1361 + # pkg:gem/rbs#lib/rbs/types.rb:1403 def ==(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1352 + # pkg:gem/rbs#lib/rbs/types.rb:1394 def location; end - # pkg:gem/rbs#lib/rbs/types.rb:1386 + # pkg:gem/rbs#lib/rbs/types.rb:1428 def map_type(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1350 + # pkg:gem/rbs#lib/rbs/types.rb:1392 def required; end - # pkg:gem/rbs#lib/rbs/types.rb:1351 + # pkg:gem/rbs#lib/rbs/types.rb:1393 def self_type; end - # pkg:gem/rbs#lib/rbs/types.rb:1376 + # pkg:gem/rbs#lib/rbs/types.rb:1418 def sub(s); end - # pkg:gem/rbs#lib/rbs/types.rb:1368 + # pkg:gem/rbs#lib/rbs/types.rb:1410 def to_json(state = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1349 + # pkg:gem/rbs#lib/rbs/types.rb:1391 def type; end end @@ -6147,108 +6190,138 @@ end # pkg:gem/rbs#lib/rbs/types.rb:915 class RBS::Types::Function - # pkg:gem/rbs#lib/rbs/types.rb:971 - def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:); end + # pkg:gem/rbs#lib/rbs/types.rb:999 + def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:, forwarding: T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:982 + # pkg:gem/rbs#lib/rbs/types.rb:1011 def ==(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1053 + # pkg:gem/rbs#lib/rbs/types.rb:1085 def amap(array, &block); end - # pkg:gem/rbs#lib/rbs/types.rb:1192 + # pkg:gem/rbs#lib/rbs/types.rb:1234 def drop_head; end - # pkg:gem/rbs#lib/rbs/types.rb:1209 + # pkg:gem/rbs#lib/rbs/types.rb:1251 def drop_tail; end - # pkg:gem/rbs#lib/rbs/types.rb:1090 + # pkg:gem/rbs#lib/rbs/types.rb:1122 def each_param(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1075 + # pkg:gem/rbs#lib/rbs/types.rb:1107 def each_type; end - # pkg:gem/rbs#lib/rbs/types.rb:1163 + # pkg:gem/rbs#lib/rbs/types.rb:1199 def empty?; end - # pkg:gem/rbs#lib/rbs/types.rb:994 + # pkg:gem/rbs#lib/rbs/types.rb:1024 def eql?(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1008 + # pkg:gem/rbs#lib/rbs/types.rb:996 + def forwarding; end + + # pkg:gem/rbs#lib/rbs/types.rb:1226 + def forwarding?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1039 def free_variables(set = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1234 + # pkg:gem/rbs#lib/rbs/types.rb:1276 def has_classish_type?; end - # pkg:gem/rbs#lib/rbs/types.rb:1222 + # pkg:gem/rbs#lib/rbs/types.rb:1264 def has_keyword?; end - # pkg:gem/rbs#lib/rbs/types.rb:1230 + # pkg:gem/rbs#lib/rbs/types.rb:1272 def has_self_type?; end - # pkg:gem/rbs#lib/rbs/types.rb:996 + # pkg:gem/rbs#lib/rbs/types.rb:1026 def hash; end - # pkg:gem/rbs#lib/rbs/types.rb:1061 + # pkg:gem/rbs#lib/rbs/types.rb:1093 def hmapv(hash, &block); end - # pkg:gem/rbs#lib/rbs/types.rb:1036 + # pkg:gem/rbs#lib/rbs/types.rb:1067 def map_type(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1069 + # pkg:gem/rbs#lib/rbs/types.rb:1101 def map_type_name(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:967 + # pkg:gem/rbs#lib/rbs/types.rb:994 def optional_keywords; end - # pkg:gem/rbs#lib/rbs/types.rb:963 + # pkg:gem/rbs#lib/rbs/types.rb:990 def optional_positionals; end - # pkg:gem/rbs#lib/rbs/types.rb:1173 + # pkg:gem/rbs#lib/rbs/types.rb:1210 def param_to_s; end - # pkg:gem/rbs#lib/rbs/types.rb:966 + # pkg:gem/rbs#lib/rbs/types.rb:993 def required_keywords; end - # pkg:gem/rbs#lib/rbs/types.rb:962 + # pkg:gem/rbs#lib/rbs/types.rb:989 def required_positionals; end - # pkg:gem/rbs#lib/rbs/types.rb:968 + # pkg:gem/rbs#lib/rbs/types.rb:995 def rest_keywords; end - # pkg:gem/rbs#lib/rbs/types.rb:964 + # pkg:gem/rbs#lib/rbs/types.rb:991 def rest_positionals; end - # pkg:gem/rbs#lib/rbs/types.rb:1188 + # pkg:gem/rbs#lib/rbs/types.rb:1230 def return_to_s; end - # pkg:gem/rbs#lib/rbs/types.rb:969 + # pkg:gem/rbs#lib/rbs/types.rb:997 def return_type; end - # pkg:gem/rbs#lib/rbs/types.rb:1117 + # pkg:gem/rbs#lib/rbs/types.rb:1150 def sub(s); end - # pkg:gem/rbs#lib/rbs/types.rb:1104 + # pkg:gem/rbs#lib/rbs/types.rb:1136 def to_json(state = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:965 + # pkg:gem/rbs#lib/rbs/types.rb:992 def trailing_positionals; end - # pkg:gem/rbs#lib/rbs/types.rb:1149 - def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), return_type: T.unsafe(nil)); end + # pkg:gem/rbs#lib/rbs/types.rb:1184 + def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), forwarding: T.unsafe(nil), return_type: T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1238 + # pkg:gem/rbs#lib/rbs/types.rb:1280 def with_nonreturn_void?; end - # pkg:gem/rbs#lib/rbs/types.rb:1136 + # pkg:gem/rbs#lib/rbs/types.rb:1170 def with_return_type(type); end class << self - # pkg:gem/rbs#lib/rbs/types.rb:1123 + # pkg:gem/rbs#lib/rbs/types.rb:1156 def empty(return_type); end end end +# pkg:gem/rbs#lib/rbs/types.rb:962 +class RBS::Types::Function::ForwardingParam + # pkg:gem/rbs#lib/rbs/types.rb:965 + def initialize(location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:969 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:973 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:975 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:963 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:979 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:984 + def to_s; end +end + # pkg:gem/rbs#lib/rbs/types.rb:916 class RBS::Types::Function::Param # pkg:gem/rbs#lib/rbs/types.rb:921 @@ -6356,53 +6429,53 @@ class RBS::Types::Intersection def with_nonreturn_void?; end end -# pkg:gem/rbs#lib/rbs/types.rb:1530 +# pkg:gem/rbs#lib/rbs/types.rb:1572 class RBS::Types::Literal include ::RBS::Types::NoFreeVariables include ::RBS::Types::NoSubst include ::RBS::Types::EmptyEachType include ::RBS::Types::NoTypeName - # pkg:gem/rbs#lib/rbs/types.rb:1534 + # pkg:gem/rbs#lib/rbs/types.rb:1576 def initialize(literal:, location:); end - # pkg:gem/rbs#lib/rbs/types.rb:1539 + # pkg:gem/rbs#lib/rbs/types.rb:1581 def ==(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1543 + # pkg:gem/rbs#lib/rbs/types.rb:1585 def eql?(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1566 + # pkg:gem/rbs#lib/rbs/types.rb:1608 def has_classish_type?; end - # pkg:gem/rbs#lib/rbs/types.rb:1562 + # pkg:gem/rbs#lib/rbs/types.rb:1604 def has_self_type?; end - # pkg:gem/rbs#lib/rbs/types.rb:1545 + # pkg:gem/rbs#lib/rbs/types.rb:1587 def hash; end - # pkg:gem/rbs#lib/rbs/types.rb:1531 + # pkg:gem/rbs#lib/rbs/types.rb:1573 def literal; end - # pkg:gem/rbs#lib/rbs/types.rb:1532 + # pkg:gem/rbs#lib/rbs/types.rb:1574 def location; end - # pkg:gem/rbs#lib/rbs/types.rb:1554 + # pkg:gem/rbs#lib/rbs/types.rb:1596 def to_json(state = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1558 + # pkg:gem/rbs#lib/rbs/types.rb:1600 def to_s(level = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1570 + # pkg:gem/rbs#lib/rbs/types.rb:1612 def with_nonreturn_void?; end class << self - # pkg:gem/rbs#lib/rbs/types.rb:1590 + # pkg:gem/rbs#lib/rbs/types.rb:1632 def unescape_string(string, is_double_quote); end end end -# pkg:gem/rbs#lib/rbs/types.rb:1574 +# pkg:gem/rbs#lib/rbs/types.rb:1616 RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) # pkg:gem/rbs#lib/rbs/types.rb:5 @@ -6420,7 +6493,7 @@ end # pkg:gem/rbs#lib/rbs/types.rb:17 module RBS::Types::NoTypeName # pkg:gem/rbs#lib/rbs/types.rb:18 - def map_type_name(&_arg0); end + def map_type_name(&); end end # pkg:gem/rbs#lib/rbs/types.rb:655 @@ -6474,60 +6547,60 @@ class RBS::Types::Optional def with_nonreturn_void?; end end -# pkg:gem/rbs#lib/rbs/types.rb:1407 +# pkg:gem/rbs#lib/rbs/types.rb:1449 class RBS::Types::Proc - # pkg:gem/rbs#lib/rbs/types.rb:1413 + # pkg:gem/rbs#lib/rbs/types.rb:1455 def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1420 + # pkg:gem/rbs#lib/rbs/types.rb:1462 def ==(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1409 + # pkg:gem/rbs#lib/rbs/types.rb:1451 def block; end - # pkg:gem/rbs#lib/rbs/types.rb:1474 + # pkg:gem/rbs#lib/rbs/types.rb:1516 def each_type(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1424 + # pkg:gem/rbs#lib/rbs/types.rb:1466 def eql?(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1430 + # pkg:gem/rbs#lib/rbs/types.rb:1472 def free_variables(set = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1513 + # pkg:gem/rbs#lib/rbs/types.rb:1555 def has_classish_type?; end - # pkg:gem/rbs#lib/rbs/types.rb:1509 + # pkg:gem/rbs#lib/rbs/types.rb:1551 def has_self_type?; end - # pkg:gem/rbs#lib/rbs/types.rb:1426 + # pkg:gem/rbs#lib/rbs/types.rb:1468 def hash; end - # pkg:gem/rbs#lib/rbs/types.rb:1411 + # pkg:gem/rbs#lib/rbs/types.rb:1453 def location; end - # pkg:gem/rbs#lib/rbs/types.rb:1496 + # pkg:gem/rbs#lib/rbs/types.rb:1538 def map_type(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1487 + # pkg:gem/rbs#lib/rbs/types.rb:1529 def map_type_name(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1410 + # pkg:gem/rbs#lib/rbs/types.rb:1452 def self_type; end - # pkg:gem/rbs#lib/rbs/types.rb:1447 + # pkg:gem/rbs#lib/rbs/types.rb:1489 def sub(s); end - # pkg:gem/rbs#lib/rbs/types.rb:1437 + # pkg:gem/rbs#lib/rbs/types.rb:1479 def to_json(state = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1458 + # pkg:gem/rbs#lib/rbs/types.rb:1500 def to_s(level = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1408 + # pkg:gem/rbs#lib/rbs/types.rb:1450 def type; end - # pkg:gem/rbs#lib/rbs/types.rb:1517 + # pkg:gem/rbs#lib/rbs/types.rb:1559 def with_nonreturn_void?; end end @@ -6588,15 +6661,15 @@ class RBS::Types::Record def with_nonreturn_void?; end end -# pkg:gem/rbs#lib/rbs/types.rb:1395 +# pkg:gem/rbs#lib/rbs/types.rb:1437 module RBS::Types::SelfTypeBindingHelper private - # pkg:gem/rbs#lib/rbs/types.rb:1398 + # pkg:gem/rbs#lib/rbs/types.rb:1440 def self_type_binding_to_s(t); end class << self - # pkg:gem/rbs#lib/rbs/types.rb:1398 + # pkg:gem/rbs#lib/rbs/types.rb:1440 def self_type_binding_to_s(t); end end end @@ -6703,66 +6776,66 @@ class RBS::Types::Union def with_nonreturn_void?; end end -# pkg:gem/rbs#lib/rbs/types.rb:1251 +# pkg:gem/rbs#lib/rbs/types.rb:1293 class RBS::Types::UntypedFunction - # pkg:gem/rbs#lib/rbs/types.rb:1254 + # pkg:gem/rbs#lib/rbs/types.rb:1296 def initialize(return_type:); end - # pkg:gem/rbs#lib/rbs/types.rb:1336 + # pkg:gem/rbs#lib/rbs/types.rb:1378 def ==(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1284 + # pkg:gem/rbs#lib/rbs/types.rb:1326 def each_param(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1276 + # pkg:gem/rbs#lib/rbs/types.rb:1318 def each_type(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1312 + # pkg:gem/rbs#lib/rbs/types.rb:1354 def empty?; end - # pkg:gem/rbs#lib/rbs/types.rb:1340 + # pkg:gem/rbs#lib/rbs/types.rb:1382 def eql?(other); end - # pkg:gem/rbs#lib/rbs/types.rb:1258 + # pkg:gem/rbs#lib/rbs/types.rb:1300 def free_variables(acc = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1320 + # pkg:gem/rbs#lib/rbs/types.rb:1362 def has_classish_type?; end - # pkg:gem/rbs#lib/rbs/types.rb:1316 + # pkg:gem/rbs#lib/rbs/types.rb:1358 def has_self_type?; end - # pkg:gem/rbs#lib/rbs/types.rb:1342 + # pkg:gem/rbs#lib/rbs/types.rb:1384 def hash; end - # pkg:gem/rbs#lib/rbs/types.rb:1262 + # pkg:gem/rbs#lib/rbs/types.rb:1304 def map_type(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1270 + # pkg:gem/rbs#lib/rbs/types.rb:1312 def map_type_name(&block); end - # pkg:gem/rbs#lib/rbs/types.rb:1328 + # pkg:gem/rbs#lib/rbs/types.rb:1370 def param_to_s; end - # pkg:gem/rbs#lib/rbs/types.rb:1332 + # pkg:gem/rbs#lib/rbs/types.rb:1374 def return_to_s; end - # pkg:gem/rbs#lib/rbs/types.rb:1252 + # pkg:gem/rbs#lib/rbs/types.rb:1294 def return_type; end - # pkg:gem/rbs#lib/rbs/types.rb:1298 + # pkg:gem/rbs#lib/rbs/types.rb:1340 def sub(subst); end - # pkg:gem/rbs#lib/rbs/types.rb:1292 + # pkg:gem/rbs#lib/rbs/types.rb:1334 def to_json(state = T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1308 + # pkg:gem/rbs#lib/rbs/types.rb:1350 def update(return_type: T.unsafe(nil)); end - # pkg:gem/rbs#lib/rbs/types.rb:1324 + # pkg:gem/rbs#lib/rbs/types.rb:1366 def with_nonreturn_void?; end - # pkg:gem/rbs#lib/rbs/types.rb:1304 + # pkg:gem/rbs#lib/rbs/types.rb:1346 def with_return_type(ty); end end diff --git a/sorbet/rbi/gems/regexp_parser@2.12.0.rbi b/sorbet/rbi/gems/regexp_parser@2.13.1.rbi similarity index 91% rename from sorbet/rbi/gems/regexp_parser@2.12.0.rbi rename to sorbet/rbi/gems/regexp_parser@2.13.1.rbi index 20c5398..49cabbf 100644 --- a/sorbet/rbi/gems/regexp_parser@2.12.0.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.13.1.rbi @@ -5,6 +5,11 @@ # Please instead update this file by running `bin/tapioca gem regexp_parser`. +# This file implements several tree traversal methods. +# +# Note: The methods are optimized for performance and avoid stack overflows on +# large trees. Check tasks/benchmark/traversal.rb when working in here. +# # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:3 module Regexp::Expression; end @@ -159,7 +164,7 @@ class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base def match_length; end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:142 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:158 def referential?; end end end @@ -263,7 +268,14 @@ class Regexp::Expression::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:27 def ascii_classes?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:76 + # Assigns referenced expressions to referring expressions, e.g. if there is + # an instance of Backreference::Number, its #referenced_expression is set to + # the instance of Group::Capture that it refers to via its number. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:92 + def assign_referenced_expressions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:69 def attributes; end # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:10 @@ -293,7 +305,7 @@ class Regexp::Expression::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:16 def free_spacing?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:49 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:42 def greedy?; end # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:13 @@ -302,7 +314,7 @@ class Regexp::Expression::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:14 def ignore_case?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:56 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:49 def lazy?; end # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 @@ -329,6 +341,9 @@ class Regexp::Expression::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 def nesting_level; end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def nesting_level=(_arg0); end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 def options; end @@ -341,7 +356,7 @@ class Regexp::Expression::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 def parent=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:51 def possessive?; end # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 @@ -353,6 +368,9 @@ class Regexp::Expression::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 def quantifier; end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def quantifier=(_arg0); end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:19 def quantify(*args); end @@ -361,10 +379,18 @@ class Regexp::Expression::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:28 def quantity; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:53 + # Recalculates the nesting_level for this node and children, which reflects + # how deep a node is in the tree. Do this at the end of parsing to account + # for tree rewrites. + # This must be safe against overflows and performant - check the benchmarks. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:75 + def recursively_update_nesting_levels(base = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:46 def reluctant?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:33 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:34 def repetitions; end # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 @@ -424,7 +450,7 @@ class Regexp::Expression::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 def text=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:62 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:55 def to_h; end # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:11 @@ -593,7 +619,7 @@ class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace def human_name; end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:132 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:148 def comment?; end end end @@ -622,7 +648,7 @@ class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base def reference; end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:143 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:159 def referential?; end end end @@ -660,7 +686,7 @@ class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexp def reference; end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:144 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:160 def referential?; end end end @@ -747,7 +773,7 @@ class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression:: # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:40 def codepoints; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:166 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:174 def match_length; end end @@ -854,7 +880,7 @@ class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base def quantify(*_args); end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:137 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:153 def decorative?; end end end @@ -867,7 +893,7 @@ module Regexp::Expression::Group; end # # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:21 class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:174 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:182 def match_length; end end @@ -901,7 +927,7 @@ class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base def number_at_level=(_arg0); end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:128 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:144 def capturing?; end end end @@ -912,10 +938,10 @@ class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base def parts; end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:133 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:149 def comment?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:138 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:154 def decorative?; end end end @@ -963,7 +989,7 @@ end # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:8 class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:11 - def initialize(*_arg0); end + def initialize(*); end # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:9 def implicit=(_arg0); end @@ -1079,6 +1105,9 @@ class Regexp::Expression::Quantifier # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 def nesting_level; end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def nesting_level=(_arg0); end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 def options; end @@ -1103,6 +1132,9 @@ class Regexp::Expression::Quantifier # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 def quantifier; end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def quantifier=(_arg0); end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:32 def reluctant?; end @@ -1249,31 +1281,31 @@ module Regexp::Expression::Shared # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:103 def ==(other); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:110 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:118 def ===(other); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:53 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:51 def base_length; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:126 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:142 def capturing?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:99 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:112 def coded_offset; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:130 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:146 def comment?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:135 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:151 def decorative?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:49 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:47 def ends_at(include_quantifier = T.unsafe(nil)); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:111 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:119 def eql?(other); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:57 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:55 def full_length; end # default implementation, e.g. "atomic group", "hex escape", "word type", .. @@ -1313,10 +1345,7 @@ module Regexp::Expression::Shared # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:5 def negative?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:103 - def nesting_level=(lvl); end - - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:95 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:108 def offset; end # Test if this expression matches an entry in the given scope spec. @@ -1356,7 +1385,7 @@ module Regexp::Expression::Shared # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:77 def one_of?(scope, top = T.unsafe(nil)); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:113 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:129 def optional?; end # default implementation @@ -1364,7 +1393,7 @@ module Regexp::Expression::Shared # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:6 def parts; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:87 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:100 def pre_quantifier_decoration(expression_format = T.unsafe(nil)); end # Make pretty-print work despite #inspect implementation. @@ -1377,22 +1406,24 @@ module Regexp::Expression::Shared # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/printing.rb:19 def pretty_print_instance_variables; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:117 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:133 def quantified?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:109 - def quantifier=(qtf); end - - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:91 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:104 def quantifier_affix(expression_format = T.unsafe(nil)); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:140 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:156 def referential?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:45 + # Compares two expressions without considering their subexpressions. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:122 + def shallow_equal?(other); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:43 def starts_at; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:122 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:138 def terminal?; end # #to_s reproduces the original source, as an unparser would. @@ -1408,10 +1439,10 @@ module Regexp::Expression::Shared # lit.to_s(:base) # => 'a' # without quantifier # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations # - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:74 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:72 def to_s(format = T.unsafe(nil)); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:85 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:98 def to_str(format = T.unsafe(nil)); end # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:39 @@ -1431,10 +1462,10 @@ module Regexp::Expression::Shared private - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:20 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:18 def init_from_token_and_options(token, options = T.unsafe(nil)); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:34 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:32 def initialize_copy(orig); end # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:12 @@ -1450,10 +1481,10 @@ end # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:5 module Regexp::Expression::Shared::ClassMethods - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:127 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:143 def capturing?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:131 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:147 def comment?; end # Convenience method to init a valid Expression without a Regexp::Token @@ -1464,13 +1495,13 @@ module Regexp::Expression::Shared::ClassMethods # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:17 def construct_defaults; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:136 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:152 def decorative?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:141 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:157 def referential?; end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:123 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:139 def terminal?; end # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:27 @@ -1504,7 +1535,7 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # If the block takes two arguments, the indices of the children within # their parents are also passed to it. # - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:10 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:14 def each_expression(include_self = T.unsafe(nil), &block); end # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 @@ -1526,7 +1557,7 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # for every expression. If a block is not given, returns an array with # each expression and its level index as an array. # - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:78 def flat_map(include_self = T.unsafe(nil), &block); end # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 @@ -1575,21 +1606,24 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # # Returns self. # - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:34 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:38 def traverse(include_self = T.unsafe(nil), &block); end # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 def values_at(*args, &block); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:53 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:73 def walk(include_self = T.unsafe(nil), &block); end + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def zip(*args, &block); end + protected - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:68 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:88 def each_expression_with_index(&block); end - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:75 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:110 def each_expression_without_index(&block); end private @@ -1600,7 +1634,7 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base def initialize_copy(orig); end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:124 + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:140 def terminal?; end end end @@ -1873,103 +1907,100 @@ class Regexp::Lexer # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:73 def emit(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:22 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:20 def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end private - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:93 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 def ascend(type, token); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def block; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def block=(_arg0); end # if a codepoint list is followed by a quantifier, that quantifier applies # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' - # c.f. #break_literal. + # c.f. #break_literal_run. # - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:145 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:141 def break_codepoint_list(token); end # called by scan to break a literal run that is longer than one character # into two separate tokens when it is followed by a quantifier # - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:125 - def break_literal(token); end + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:121 + def break_literal_run(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def collect_tokens; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def collect_tokens=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def conditional_nesting; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def conditional_nesting=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:108 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:104 def descend(type, token); end # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:164 def merge_condition(current, last); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def nesting; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def nesting=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def preprev_token; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def preprev_token=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def prev_token; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def prev_token=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def set_nesting; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def set_nesting=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def shift; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def shift=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def tokens; end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 def tokens=(_arg0); end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:18 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:15 def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:84 + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:18 def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end end end -# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:14 -Regexp::Lexer::CLOSING_TOKENS = T.let(T.unsafe(nil), Array) - -# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:16 +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:13 Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:9 +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:8 Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:3 @@ -2064,158 +2095,154 @@ class Regexp::Parser private - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:577 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:575 def active_opts; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:101 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:100 def anchor(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:264 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:260 def assign_effective_number(exp); end - # Assigns referenced expressions to referring expressions, e.g. if there is - # an instance of Backreference::Number, its #referenced_expression is set to - # the instance of Group::Capture that it refers to via its number. - # - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:584 - def assign_referenced_expressions; end - - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:229 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:225 def backref(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:204 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:199 def captured_group_count_at_level; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def captured_group_counts; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def captured_group_counts=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:573 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:571 def close_completed_character_set_range; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:212 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:208 def close_group; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:541 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:539 def close_set; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:271 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:267 def conditional(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def conditional_nesting; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def conditional_nesting=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:208 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:203 def count_captured_group; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:218 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:214 def decrease_nesting; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:307 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:303 def escape(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:62 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:61 def extract_options(input, options); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:352 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:348 def free_space(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:116 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:115 def group(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:512 - def increase_group_level(exp); end + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:511 + def increment_group_level(exp); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:552 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:550 def intersection(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:363 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:359 def keep(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:367 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:363 def literal(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:371 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:367 def meta(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:537 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:535 def negate_set; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:301 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:297 def nest(exp); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:296 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:292 def nest_conditional(exp); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def nesting; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def nesting=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def node; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def node=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:167 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:166 def open_group(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:530 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:528 def open_set(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:132 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:131 def options_group(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def options_stack; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def options_stack=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:78 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:77 def parse_token(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:393 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:389 def posixclass(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:400 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:396 def property(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:482 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:478 def quantifier(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:545 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:543 def range(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def root; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def root=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:382 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:378 def sequence_operation(klass, token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:518 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:516 def set(token); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def switching_options; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:58 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def switching_options=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:200 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 def total_captured_group_count; end - # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:556 + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def total_captured_group_count=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:554 def type(token); end class << self @@ -2224,7 +2251,7 @@ class Regexp::Parser end end -# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:130 +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:129 Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) # base class for all gem-specific errors @@ -2232,16 +2259,16 @@ Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) # pkg:gem/regexp_parser#lib/regexp_parser/error.rb:5 class Regexp::Parser::Error < ::StandardError; end -# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:129 +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:128 Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:9 class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end -# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:397 +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:393 Regexp::Parser::UP = Regexp::Expression::UnicodeProperty -# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:398 +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:394 Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:17 @@ -2261,24 +2288,24 @@ Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/scanner_error.rb:5 class Regexp::Scanner - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2509 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2485 def capturing_group_count; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2509 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2485 def capturing_group_count=(_arg0); end # Emits an array with the details of the scanned pattern # - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2484 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2460 def emit(type, token, text); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2509 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2485 def literal_run; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2509 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2485 def literal_run=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:24 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:963 def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end private @@ -2286,108 +2313,111 @@ class Regexp::Scanner # Appends one or more characters to the literal buffer, to be emitted later # by a call to emit_literal. # - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2555 - def append_literal(data, ts, te); end + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2544 + def append_literal(source, ts, te); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def block; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def block=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def char_pos; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def char_pos=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def collect_tokens; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def collect_tokens=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def conditional_stack; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def conditional_stack=(_arg0); end - # Copy from ts to te from data as text + # Ragel offsets are bytes; emitted token positions are characters. # - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2549 - def copy(data, ts, te); end + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2525 + def copy(source, ts, te); end # Emits the literal run collected by calls to the append_literal method. # - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2560 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2549 def emit_literal; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2595 - def emit_meta_control_sequence(data, ts, te, token); end + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2584 + def emit_meta_control_sequence(data, source, ts, te, token); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2566 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2555 def emit_options(text); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2520 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2529 + def error_text(source, ts, position); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2496 def extract_encoding(input_object, options); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def free_spacing; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def free_spacing=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2528 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2504 def free_spacing?(input_object, options); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def group_depth; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def group_depth=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2540 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2516 def in_group?; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2544 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2520 def in_set?; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def prev_token; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def prev_token=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def regexp_encoding; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def regexp_encoding=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def set_depth; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def set_depth=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def spacing_stack; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def spacing_stack=(_arg0); end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def tokens; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2513 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 def tokens=(_arg0); end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2469 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2445 def long_prop_map; end - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2473 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2449 def parse_prop_map(name); end # Scans the given regular expression text, or Regexp object and collects the @@ -2397,12 +2427,12 @@ class Regexp::Scanner # This method may raise errors if a syntax error is encountered. # -------------------------------------------------------------------------- # - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:20 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:959 def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end # lazy-load property maps when first needed # - # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2465 + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2441 def short_prop_map; end end end @@ -2442,7 +2472,7 @@ end # Use each_with_object for required_ruby_version >= 2.2,or #to_h for >= 2.6 # -# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2478 +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2454 Regexp::Scanner::POSIX_CLASSES = T.let(T.unsafe(nil), Hash) # Unexpected end of pattern @@ -2453,6 +2483,69 @@ class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError def initialize(where = T.unsafe(nil)); end end +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:947 +Regexp::Scanner::RE_SCANNER_EN_CHARACTER_SET = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:945 +Regexp::Scanner::RE_SCANNER_EN_CHAR_TYPE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:950 +Regexp::Scanner::RE_SCANNER_EN_CONDITIONAL_EXPRESSION = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:949 +Regexp::Scanner::RE_SCANNER_EN_ESCAPE_SEQUENCE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:951 +Regexp::Scanner::RE_SCANNER_EN_MAIN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:948 +Regexp::Scanner::RE_SCANNER_EN_SET_ESCAPE_SEQUENCE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:946 +Regexp::Scanner::RE_SCANNER_EN_UNICODE_PROPERTY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:901 +Regexp::Scanner::RE_SCANNER_EOF_ACTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:921 +Regexp::Scanner::RE_SCANNER_EOF_TRANS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:943 +Regexp::Scanner::RE_SCANNER_ERROR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:942 +Regexp::Scanner::RE_SCANNER_FIRST_FINAL = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:881 +Regexp::Scanner::RE_SCANNER_FROM_STATE_ACTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:90 +Regexp::Scanner::RE_SCANNER_INDEX_OFFSETS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:110 +Regexp::Scanner::RE_SCANNER_INDICIES = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:70 +Regexp::Scanner::RE_SCANNER_KEY_SPANS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:941 +Regexp::Scanner::RE_SCANNER_START = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:861 +Regexp::Scanner::RE_SCANNER_TO_STATE_ACTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:831 +Regexp::Scanner::RE_SCANNER_TRANS_ACTIONS = T.let(T.unsafe(nil), Array) + +# Emit fixed machine data once. The ragel task converts its generated +# accessors and tables to constants with frozen values. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:17 +Regexp::Scanner::RE_SCANNER_TRANS_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:801 +Regexp::Scanner::RE_SCANNER_TRANS_TARGS = T.let(T.unsafe(nil), Array) + # General scanner error (catch all) # # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/scanner_error.rb:7 @@ -2497,13 +2590,13 @@ end module Regexp::Syntax private - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:63 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:78 def comparable(name); end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:46 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:48 def const_missing(const_name); end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:53 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:68 def fallback_version_class(version); end # Returns the syntax specification class for the given syntax @@ -2512,26 +2605,29 @@ module Regexp::Syntax # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:24 def for(name); end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:28 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:32 def new(name); end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:59 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:56 + def set_fallback_version_class(const_name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:74 def specified_versions; end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:34 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:44 def supported?(name); end # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:38 - def version_class(version); end + def version_class(name); end class << self - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:63 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:78 def comparable(name); end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:46 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:48 def const_missing(const_name); end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:53 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:68 def fallback_version_class(version); end # Returns the syntax specification class for the given syntax @@ -2540,17 +2636,20 @@ module Regexp::Syntax # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:24 def for(name); end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:28 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:32 def new(name); end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:59 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:56 + def set_fallback_version_class(const_name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:74 def specified_versions; end - # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:34 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:44 def supported?(name); end # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:38 - def version_class(version); end + def version_class(name); end end end @@ -3293,6 +3392,9 @@ class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end # pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.2.0.rb:3 class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:64 +Regexp::Syntax::V3_4_11 = Regexp::Syntax::V3_2_0 + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.5.0.rb:1 class Regexp::Syntax::V3_5_0 < ::Regexp::Syntax::V3_2_0; end diff --git a/sorbet/rbi/gems/require-hooks@0.4.0.rbi b/sorbet/rbi/gems/require-hooks@0.5.1.rbi similarity index 100% rename from sorbet/rbi/gems/require-hooks@0.4.0.rbi rename to sorbet/rbi/gems/require-hooks@0.5.1.rbi diff --git a/sorbet/rbi/gems/rubocop-gusto@11.3.0.rbi b/sorbet/rbi/gems/rubocop-gusto@11.8.1.rbi similarity index 64% rename from sorbet/rbi/gems/rubocop-gusto@11.3.0.rbi rename to sorbet/rbi/gems/rubocop-gusto@11.8.1.rbi index 6518dd4..4fa3647 100644 --- a/sorbet/rbi/gems/rubocop-gusto@11.3.0.rbi +++ b/sorbet/rbi/gems/rubocop-gusto@11.8.1.rbi @@ -63,6 +63,38 @@ RuboCop::Cop::Gusto::BootsnapLoadFile::PROHIBITED_CONSTANTS = T.let(T.unsafe(nil # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/bootsnap_load_file.rb:19 RuboCop::Cop::Gusto::BootsnapLoadFile::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Flags safe navigation (`&.`) called on a constant, covering both +# class/module constants (`Model&.find`) and SCREAMING_CASE constants +# (`CONST&.each`). +# +# A constant reference is never `nil`, an undefined constant raises +# `NameError` before the call is even attempted, so the safe navigation +# operator is always redundant. Use the plain `.` operator instead. +# +# @example +# # bad +# Model&.find(id) +# ENTITY_TYPES&.each { |type| type.to_s } +# Foo::Bar&.call +# ::Foo&.call +# +# # good +# Model.find(id) +# ENTITY_TYPES.each { |type| type.to_s } +# Foo::Bar.call +# ::Foo.call +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/constant_safety.rb:26 +class RuboCop::Cop::Gusto::ConstantSafety < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/constant_safety.rb:31 + def on_csend(node); end +end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/constant_safety.rb:29 +RuboCop::Cop::Gusto::ConstantSafety::MSG = T.let(T.unsafe(nil), String) + # Disallow referencing the `Datadog` constant directly. Calls should go # through an approved wrapper library so instrumentation stays consistent # and swappable. @@ -309,6 +341,401 @@ RuboCop::Cop::Gusto::FeatureFlagConstants::MSG = T.let(T.unsafe(nil), String) # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/feature_flag_constants.rb:22 RuboCop::Cop::Gusto::FeatureFlagConstants::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:6 +module RuboCop::Cop::Gusto::Graphql; end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:7 +module RuboCop::Cop::Gusto::Graphql::IdDescriptionConcerns + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:32 + def argument_call?(node, &block); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:28 + def field_call?(node, &block); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:46 + def array_id_type?(type_node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:78 + def description_from_block(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:68 + def description_from_keyword_argument(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:64 + def description_from_positional_argument(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:58 + def extract_description(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:139 + def find_graphql_name_call(nodes); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:119 + def find_graphql_name_declaration(type_node); end + + # Find the GraphQL type name for the enclosing class or module + # Prefers graphql_name declaration over Ruby class/module name + # Returns nil if the name cannot be determined + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:94 + def find_graphql_type_name(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:38 + def id_type?(type_node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:143 + def in_mutation_or_input_object?(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:115 + def strip_graphql_suffix(name); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:131 + def type_body_nodes(type_body); end +end + +# Matches a GraphQL argument declaration capturing name and type node. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:17 +RuboCop::Cop::Gusto::Graphql::IdDescriptionConcerns::ARGUMENT_CALL_PATTERN = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# Matches a GraphQL field declaration capturing name and type node. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:12 +RuboCop::Cop::Gusto::Graphql::IdDescriptionConcerns::FIELD_CALL_PATTERN = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# Mutation / input-object base classes conventionally end in one of these final +# segments (e.g. `Base::PermissionedMutation`, `Gusto::GraphQL::Objects::BaseInputObject`, +# `Base::Input`). We match on the base class's final name segment rather than a substring +# of its source, so unrelated bases that merely *contain* the word (e.g. +# `GraphQLMutationTool`, `MutationHelper`) are not misclassified. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:26 +RuboCop::Cop::Gusto::Graphql::IdDescriptionConcerns::MUTATION_OR_INPUT_BASE_SUFFIXES = T.let(T.unsafe(nil), Array) + +# analytics_id is intentionally excluded +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_description_concerns.rb:9 +RuboCop::Cop::Gusto::Graphql::IdDescriptionConcerns::PRIMARY_ID_FIELDS = T.let(T.unsafe(nil), Array) + +# Ensures ID type arguments on query fields follow the standardized description template: +# "The identifier of the (``) to filter by" +# "The identifiers of each (``) to filter by" (for arrays) +# +# This cop only applies to arguments on regular GraphQL objects/queries, +# NOT on mutations or input objects (see IdInputArgumentDescription for those). +# +# @example Bad +# argument :employee_id, ID, 'Employee ID', required: true +# +# @example Good +# argument :employee_id, ID, 'The identifier of the Employee (`Employee.id`) to filter by', required: true +# argument :employee_ids, [ID], 'The identifiers of each Employee (`Employee.id`) to filter by', required: true +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_argument_description.rb:23 +class RuboCop::Cop::Gusto::Graphql::IdFieldArgumentDescription < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Gusto::Graphql::IdDescriptionConcerns + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_argument_description.rb:41 + def on_send(node); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_argument_description.rb:59 + def valid_argument_description?(desc, is_array); end +end + +# Array: "The identifiers of each (``) to filter by" +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_argument_description.rb:39 +RuboCop::Cop::Gusto::Graphql::IdFieldArgumentDescription::ARRAY_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_argument_description.rb:26 +RuboCop::Cop::Gusto::Graphql::IdFieldArgumentDescription::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_argument_description.rb:29 +RuboCop::Cop::Gusto::Graphql::IdFieldArgumentDescription::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Single: "The identifier of the (``) to filter by" +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_argument_description.rb:36 +RuboCop::Cop::Gusto::Graphql::IdFieldArgumentDescription::SINGLE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# A single " (``)" reference. Multiple may be joined +# with " or " for arguments that accept an id from more than one entity. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_argument_description.rb:33 +RuboCop::Cop::Gusto::Graphql::IdFieldArgumentDescription::TYPE_REF = T.let(T.unsafe(nil), Regexp) + +# Ensures ID type fields follow the standardized description template: +# "The identifier" +# +# This applies to fields named :id or :uuid with type ID. +# +# @example Bad +# field :id, ID, 'Unique identifier', null: false +# field :id, ID, null: false, description: 'The unique identifier' +# +# @example Good +# field :id, ID, 'The Employee identifier', null: false +# field :id, ID, null: false, description: 'The Employee identifier' +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_description.rb:22 +class RuboCop::Cop::Gusto::Graphql::IdFieldDescription < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Gusto::Graphql::IdDescriptionConcerns + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_description.rb:29 + def on_send(node); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_description.rb:44 + def expected_description(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_description.rb:58 + def report_offense(node, suggested); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_description.rb:51 + def valid_field_description?(desc, node); end +end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_description.rb:25 +RuboCop::Cop::Gusto::Graphql::IdFieldDescription::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_field_description.rb:27 +RuboCop::Cop::Gusto::Graphql::IdFieldDescription::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensures ID type arguments on mutations and input objects follow the standardized description template: +# "The identifier of the (``) to " +# "The identifiers of each (``) to " (for arrays) +# +# This cop only applies to arguments on mutations and input objects, +# NOT on regular GraphQL objects/queries (see IdFieldArgumentDescription for those). +# +# @example Bad +# class UpdateEmployeeMutation < BaseMutation +# argument :employee_id, ID, 'Employee ID', required: true +# end +# +# @example Good +# class UpdateEmployeeMutation < BaseMutation +# argument :employee_id, ID, 'The identifier of the Employee (`Employee.id`) to update', required: true +# end +# +# class DeleteEmployeeInput < BaseInputObject +# argument :employee_ids, [ID], 'The identifiers of each Employee (`Employee.id`) to delete', required: true +# end +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_input_argument_description.rb:30 +class RuboCop::Cop::Gusto::Graphql::IdInputArgumentDescription < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Gusto::Graphql::IdDescriptionConcerns + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_input_argument_description.rb:48 + def on_send(node); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_input_argument_description.rb:66 + def valid_argument_description?(desc, is_array); end +end + +# Array: "The identifiers of each (``) to " +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_input_argument_description.rb:46 +RuboCop::Cop::Gusto::Graphql::IdInputArgumentDescription::ARRAY_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_input_argument_description.rb:33 +RuboCop::Cop::Gusto::Graphql::IdInputArgumentDescription::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_input_argument_description.rb:36 +RuboCop::Cop::Gusto::Graphql::IdInputArgumentDescription::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_input_argument_description.rb:43 +RuboCop::Cop::Gusto::Graphql::IdInputArgumentDescription::SINGLE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Single: "The identifier of the (``) to " +# Also supports multiple types joined by " or ": +# "The identifier of the Employee (`Employee.id`) or Contractor (`Contractor.id`) to " +# The action can be any verb phrase (update, delete, add items to, etc.) +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/id_input_argument_description.rb:42 +RuboCop::Cop::Gusto::Graphql::IdInputArgumentDescription::TYPE_REF = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/paginate_arrays.rb:7 +class RuboCop::Cop::Gusto::Graphql::PaginateArrays < ::RuboCop::Cop::Base + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/paginate_arrays.rb:16 + def on_send(node); end +end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/paginate_arrays.rb:12 +RuboCop::Cop::Gusto::Graphql::PaginateArrays::ARRAY_FIELD = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/paginate_arrays.rb:8 +RuboCop::Cop::Gusto::Graphql::PaginateArrays::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/paginate_arrays.rb:10 +RuboCop::Cop::Gusto::Graphql::PaginateArrays::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows direct hash access on GraphQL context. +# Use typed context methods instead for better type safety. +# +# @example +# # bad +# context[:user_id] | context["user_id"] +# ctx[:user_id] | ctx["user_id"] +# @context[:user_id] | @context["user_id"] +# @ctx[:user_id] | @ctx["user_id"] +# do |ctx| ctx[:user_id] end +# def resolve(context) context[:user_id] end +# +# # ok +# ctx.user_id | @context.user_id | @ctx.user_id +# +# # preferred +# context.user_id +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_context_hash_access.rb:25 +class RuboCop::Cop::Gusto::Graphql::PreventContextHashAccess < ::RuboCop::Cop::Base + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_context_hash_access.rb:49 + def on_send(node); end +end + +# Keys allowed to use hash access on context. +# +# current_arguments: +# A runtime metadata key added during field resolution as part of graphql-ruby's API. +# It contains all arguments passed to the current field, providing access to args that are otherwise not available to resolvers, +# for example pagination args (first, last, after, before) that are not directly accessible to resolver via the resolver signature. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_context_hash_access.rb:37 +RuboCop::Cop::Gusto::Graphql::PreventContextHashAccess::ALLOWED_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_context_hash_access.rb:41 +RuboCop::Cop::Gusto::Graphql::PreventContextHashAccess::CONTEXT_BRACKET_ACCESS = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_context_hash_access.rb:45 +RuboCop::Cop::Gusto::Graphql::PreventContextHashAccess::LITERAL_KEY = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_context_hash_access.rb:26 +RuboCop::Cop::Gusto::Graphql::PreventContextHashAccess::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_context_hash_access.rb:29 +RuboCop::Cop::Gusto::Graphql::PreventContextHashAccess::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_field_can_can_action.rb:7 +class RuboCop::Cop::Gusto::Graphql::PreventFieldCanCanAction < ::RuboCop::Cop::Base + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_field_can_can_action.rb:17 + def on_send(node); end +end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_field_can_can_action.rb:13 +RuboCop::Cop::Gusto::Graphql::PreventFieldCanCanAction::FIELD_WITH_CAN_CAN_ACTION = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_field_can_can_action.rb:8 +RuboCop::Cop::Gusto::Graphql::PreventFieldCanCanAction::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/prevent_field_can_can_action.rb:11 +RuboCop::Cop::Gusto::Graphql::PreventFieldCanCanAction::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Flags a field whose resolver cannot reach the node it hangs off: the method body never +# reads `object` or `@object`, and no helper it calls in the same class does either. The +# value is then identical for every node, so the field does not belong on this type. +# +# @example Bad - the value does not depend on the node +# field :eor_coming_soon_countries, [String], null: false +# def eor_coming_soon_countries +# BusinessValues::BusinessValueService.get_value_for("eor.coming_soon_countries", nil) +# end +# +# @example Good - the value depends on the node +# field :eor_coming_soon_countries, [String], null: false +# def eor_coming_soon_countries +# object.eor_coming_soon_countries +# end +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:22 +class RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject < ::RuboCop::Cop::Base + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:61 + def on_class(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:105 + def on_module(node); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:109 + def delegated_names(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:158 + def node_accessors; end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:145 + def propagate(direct, callers_of); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:115 + def scan_resolver(def_node, accessors, resolvers, direct, callers_of); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:162 + def walk(node, boundary, &block); end +end + +# Fields are never declared inside a `def`, so stopping there loses nothing. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:59 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::BODY_BOUNDARY = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:44 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::DELEGATE_TO_OBJECT = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:40 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::EPHEMERAL_BACKING = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:28 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::FIELD_NAME_NODE = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:23 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::MSG = T.let(T.unsafe(nil), String) + +# A concern that `requires_ancestor` reaches the node through `T.bind(self, ...).object`, +# since Sorbet cannot see `object` on the module itself. That reads the node exactly as a +# bare `object` does, so the receiver form has to count too. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:51 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::NODE_READ_THROUGH_RECEIVER = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:30 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::RESOLUTION_ELSEWHERE = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# `resolver_method:` redirects the lookup on the type instance; `method:` names a method on +# the backing object, which this cop does not read. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:36 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::RESOLVER_METHOD = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + +# A nested class gets its own `on_class`, so the walk must not cross into one. +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/resolver_ignores_object.rb:56 +RuboCop::Cop::Gusto::Graphql::ResolverIgnoresObject::SCOPE_BOUNDARY = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/type_variables.rb:7 +class RuboCop::Cop::Gusto::Graphql::TypeVariables < ::RuboCop::Cop::Base + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/type_variables.rb:15 + def on_block(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/type_variables.rb:21 + def on_itblock(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/type_variables.rb:20 + def on_numblock(node); end +end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/type_variables.rb:8 +RuboCop::Cop::Gusto::Graphql::TypeVariables::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/graphql/type_variables.rb:11 +RuboCop::Cop::Gusto::Graphql::TypeVariables::UNTYPED_OBJECT = T.let(T.unsafe(nil), RuboCop::AST::NodePattern) + # Checks for the use of `min` or `max` with a proc. Corrects to `min_by` or `max_by`. # # @safety This cop is unsafe because it will change the behavior of the code. @@ -793,6 +1220,102 @@ end # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rake_constants.rb:31 RuboCop::Cop::Gusto::RakeConstants::MSG = T.let(T.unsafe(nil), String) +# Flags an inline `require 'spec_helper'` / `require 'rails_helper'` (or the +# `require_relative` equivalent) that the governing `.rspec` already loads via +# `--require`, making the inline require a redundant no-op. +# +# Correctness is per file: the cop resolves the `.rspec` that governs the file by walking +# up to the nearest ancestor `.rspec`, but stops at a project boundary (a directory holding +# a `*.gemspec` or `Gemfile`). A project with no `.rspec` of its own is therefore never +# attributed a parent project's `.rspec` -- e.g. a standalone gem/engine that boots its own +# test environment keeps its inline require. Packs (no gemspec/Gemfile) still resolve to the +# repo-root `.rspec`. +# +# `spec_helper.rb` / `rails_helper.rb` themselves are never edited (they are the definitions +# and the `rails_helper` -> `spec_helper` shim). +# +# `rails_helper` is treated as redundant only when the governing `.rspec` auto-requires it +# directly, or auto-requires `spec_helper` AND the project's `spec/rails_helper.rb` is a pure +# shim (nothing but `require 'spec_helper'`). Otherwise it is kept, since a `rails_helper` +# that does real setup (e.g. boots Rails) is not covered by `spec_helper`. +# +# @example +# # bad (the governing .rspec already `--require`s it) +# require 'spec_helper' +# RSpec.describe Foo do +# end +# +# # good +# RSpec.describe Foo do +# end +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:35 +class RuboCop::Cop::Gusto::RedundantSpecHelperRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:60 + def on_csend(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:48 + def on_send(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:44 + def require_path(param0 = T.unsafe(nil)); end + + private + + # Helper basenames the `.rspec` auto-requires via `--require`/`-r`. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:116 + def auto_required_helpers(rspec_path); end + + # The `.rspec` that governs this file: nearest ancestor `.rspec`, not crossing a project + # boundary (a dir with a `*.gemspec` or `Gemfile`). Returns nil when the file's project + # has no `.rspec` of its own. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:95 + def governing_rspec; end + + # Never edit the helper/shim files themselves. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:72 + def helper_definition_file?; end + + # 'spec_helper' | 'rails_helper' | nil, from 'spec_helper', 'rails_helper', + # 'rails_helper.rb', or a require_relative path such as '../spec_helper'. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:66 + def helper_name(path); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:109 + def project_boundary?(dir); end + + # True when /spec/rails_helper.rb exists and is a pure shim whose only executable + # line is `require 'spec_helper'` (magic comments / blank lines / comments ignored). + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:127 + def rails_helper_shim?(root_dir); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:76 + def redundant?(name); end + + # Remove the require line, absorbing one immediately-following blank line so the fix does + # not leave a stray/duplicate blank. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:137 + def removal_range(node); end +end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:40 +RuboCop::Cop::Gusto::RedundantSpecHelperRequire::HELPERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:39 +RuboCop::Cop::Gusto::RedundantSpecHelperRequire::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/redundant_spec_helper_require.rb:41 +RuboCop::Cop::Gusto::RedundantSpecHelperRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Ensures that regular expressions use `\A` and `\z` anchors instead # of `^` and `$` when matching the start or end of a string. This is # critical for security validations as `^` and `$` will match the start/end @@ -949,6 +1472,204 @@ end # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/smart_todo_team.rb:26 RuboCop::Cop::Gusto::SmartTodoTeam::TEAM_HELP = T.let(T.unsafe(nil), String) +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:6 +module RuboCop::Cop::Gusto::Sorbet; end + +# Checks that predicate methods (methods ending with ?) in Sorbet-typed files +# return boolean values (T::Boolean or true/false literals). +# +# This cop categorizes offenses into: +# - Methods returning nil +# - Methods returning other non-boolean values +# +# A `sig { void }` predicate is left alone. `void` is an explicit declaration that +# the return value is not meaningful, which is how validator-style methods that only +# call `errors.add` are annotated. +# +# It also provides an unsafe autocorrect feature to change the signature +# to `returns(T::Boolean)` and coerce the return value to a boolean. +# +# @safety +# This cop's autocorrect is unsafe because it changes method signatures +# and coerces return values using `!!()`, which may alter the behavior +# of the code in subtle ways. +# +# @example +# # bad (returns nil) +# sig { returns(T.nilable(String)) } +# def valid? +# nil +# end +# +# # bad (returns non-boolean) +# sig { returns(String) } +# def valid? +# 'yes' +# end +# +# # good +# sig { returns(T::Boolean) } +# def valid? +# true +# end +# +# # good (also acceptable) +# sig { returns(T.any(TrueClass, FalseClass)) } +# def valid? +# true +# end +# +# # good (void declares the return value meaningless) +# sig { void } +# def valid_state? +# errors.add(:state, 'is invalid') unless state_ok? +# end +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:56 +class RuboCop::Cop::Gusto::Sorbet::PredicateBooleanReturn < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:68 + def on_def(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:74 + def on_defs(node); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:137 + def already_boolean_coerced?(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:110 + def autocorrect(corrector, node, return_type_node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:209 + def boolean_type?(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:82 + def check_predicate_method(node); end + + # An expression that is already negated (`!foo` / `!!foo`) is boolean, so it needs + # no coercion. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:119 + def coerce_last_expression(corrector, method_body); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:230 + def extract_const_name(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:169 + def extract_return_type(sig_node); end + + # Walks left siblings past `private` modifiers to find the method's `sig` block. + # A `private_class_method def self.foo?` wrapper shifts the starting point to the + # wrapping send. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:145 + def find_sig_node(method_node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:244 + def format_send_type(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:238 + def format_type(return_node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:257 + def format_type_arg(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:128 + def last_expression_in_body(body_node); end + + # `private_class_method def self.foo?` still reads as a plain definition; any other + # wrapping send (e.g. a custom decorator) hides the real return type. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:270 + def method_has_non_private_class_method_wrapper?(method_node); end + + # `T.untyped` can be nil but is reported as non-boolean rather than nilable. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:205 + def nil_type?(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:189 + def nilable_type?(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:183 + def returns_boolean?(return_node); end + + # `void` is filtered out before this point, so the node is always `returns(...)`. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:176 + def returns_nil?(return_node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:165 + def sig_block?(node); end + + # `T.any(TrueClass, FalseClass)` is the only `T.` send that is boolean. + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:221 + def t_boolean_union?(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:78 + def typed_file?; end +end + +# Guards `find_sig_node`'s left-sibling walk against a pathological node list +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:66 +RuboCop::Cop::Gusto::Sorbet::PredicateBooleanReturn::MAX_SIBLING_LOOKBACK = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:59 +RuboCop::Cop::Gusto::Sorbet::PredicateBooleanReturn::MSG_RETURNS_NIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:60 +RuboCop::Cop::Gusto::Sorbet::PredicateBooleanReturn::MSG_RETURNS_NON_BOOLEAN = T.let(T.unsafe(nil), String) + +# Starts with `!` or `!!` but not `!=` / `!==` +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:64 +RuboCop::Cop::Gusto::Sorbet::PredicateBooleanReturn::NEGATION_PREFIX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sorbet/predicate_boolean_return.rb:62 +RuboCop::Cop::Gusto::Sorbet::PredicateBooleanReturn::TYPED_SIGIL = T.let(T.unsafe(nil), Regexp) + +# Detects Rails association definitions called on other classes from outside their class bodies. +# This kind of sudden monkey-patching can lead to unexpected behavior. +# +# @example +# # bad +# Company.has_one :onboarding_benefits_survey +# User.belongs_to :company +# Post.has_many :comments +# Student.has_and_belongs_to_many :courses +# +# # good +# class Company +# has_one :onboarding_benefits_survey +# end +# +# class User +# belongs_to :company +# end +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sudden_associations.rb:24 +class RuboCop::Cop::Gusto::SuddenAssociations < ::RuboCop::Cop::Base + # Matches association method calls on a class constant + # Examples matched: + # Company.has_one :onboarding_benefits_survey + # User.belongs_to :company + # ::Company.has_many :users + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sudden_associations.rb:38 + def on_send(node); end +end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sudden_associations.rb:25 +RuboCop::Cop::Gusto::SuddenAssociations::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sudden_associations.rb:26 +RuboCop::Cop::Gusto::SuddenAssociations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks that no top-level constants (excluding classes and modules) # are defined. This rule exists to prevent accidental pollution of the # global namespace as well as cases where application code has @@ -1038,32 +1759,32 @@ RuboCop::Cop::Gusto::ToplevelConstants::MSG = T.let(T.unsafe(nil), String) # let(:thing) { create(:thing) } # it { expect(thing).to be_present } # -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:54 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:53 class RuboCop::Cop::Gusto::UnreferencedLet < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:83 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:79 def definition_name(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:133 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:115 def on_send(node); end private - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:193 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:175 def absorbable_comment?(source_line); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:198 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:180 def blank_line?(source_line); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:218 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:200 def consumes_shared_examples?; end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:277 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:259 def definition_name_argument?(sym_node); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:243 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:225 def definitions_by_name; end # True when the file reflectively dispatches through a name we cannot resolve statically -- @@ -1071,7 +1792,7 @@ class RuboCop::Cop::Gusto::UnreferencedLet < ::RuboCop::Cop::RSpec::Base # first argument (most commonly an interpolated string, `send("expected_#{type}")`). In # that case any `let` in the file could be the dispatch target, so none are deleted. # - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:228 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:210 def dynamic_dispatch?; end # A lazy `let` is exempt from deletion whenever file-scoped analysis cannot prove its name @@ -1081,19 +1802,19 @@ class RuboCop::Cop::Gusto::UnreferencedLet < ::RuboCop::Cop::RSpec::Base # framework contract, it is overridden by another definition of the same name, or it is # referenced somewhere in the file. # - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:158 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:140 def exempt_from_deletion?(name, block); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:202 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:184 def let_or_subject_line?(source_line); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:239 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:221 def overridden?(name); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:206 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:188 def preceding_sig(node); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:250 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:232 def referenced?(name); end # A name is "referenced" if it is called as a bare method (`foo`), appears as a symbol @@ -1106,7 +1827,7 @@ class RuboCop::Cop::Gusto::UnreferencedLet < ::RuboCop::Cop::RSpec::Base # inside a multi-word heredoc from being deleted.) Interpolated-string *dispatch* is handled # separately by `dynamic_dispatch?`, which exempts the whole file. # - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:263 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:245 def referenced_names; end # Delete the `let` block, plus: @@ -1116,87 +1837,73 @@ class RuboCop::Cop::Gusto::UnreferencedLet < ::RuboCop::Cop::RSpec::Base # blank -- unless the line above is a `let`/`subject`, where that blank is the required # separator after the now-final let and must stay. # - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:174 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:156 def removal_range(node); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:214 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:196 def within_shared_definition?(node); end class << self - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:121 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:103 def extract_let_names(source, names); end # Names defined as `let`/`subject` anywhere under `spec/support/**`. Computed once per # process (lazily, after boot) and shared across every file the cop inspects. # - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:90 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:86 def framework_let_names; end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:106 - def git_tracked_support_files; end - - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:126 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:108 def read_source(path); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:115 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:97 def scan_framework_let_names(paths); end - # Enumerate `spec/support/**/*.rb`. Prefer `git ls-files` (reads the git index, skipping - # untracked trees like `node_modules`): a leading-`**` `Dir.glob` walks the entire - # repository and costs seconds, while reading the index costs tens of milliseconds. Fall - # back to `Dir.glob` when not in a git work tree or `git` is unavailable. - # - # Tradeoff: an untracked (brand-new, uncommitted) `spec/support/*.rb` override is invisible - # to `git ls-files`. In that narrow window its contract names are not exempted; once - # committed it is seen like any other support file. + # Enumerate `spec/support/**/*.rb`. No git dependency: some environments (e.g. a build + # step's working directory) are not a git work tree at all, and shelling out to `git` + # there is unreliable and noisy. # - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:102 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:93 def support_file_paths; end end end -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:58 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:57 RuboCop::Cop::Gusto::UnreferencedLet::DEFINITION_METHODS = T.let(T.unsafe(nil), Set) # Reflective dispatch methods whose target is the first argument. When that argument is not # a statically-resolvable name (a `sym` or plain `str`) -- e.g. `send("expected_#{type}")` -- # the called name cannot be known, so the whole file is left untouched. # -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:66 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:65 RuboCop::Cop::Gusto::UnreferencedLet::DYNAMIC_DISPATCH_METHODS = T.let(T.unsafe(nil), Array) -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:67 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:66 RuboCop::Cop::Gusto::UnreferencedLet::FRAMEWORK_LET_PATTERN = T.let(T.unsafe(nil), Regexp) # `let`s consumed by a test framework rather than by a reference in the spec file. The # rubocop-rspec `:config` shared context reads `cop_config`, so it is live even though the # spec never names it. # -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:62 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:61 RuboCop::Cop::Gusto::UnreferencedLet::FRAMEWORK_RESERVED_NAMES = T.let(T.unsafe(nil), Array) # Identifier-shaped tokens inside a string/heredoc literal. A `let` whose name appears only # inside string text -- e.g. a binding or column referenced in raw SQL/GraphQL the spec # later executes -- counts as referenced, so it is not deleted. # -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:71 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:70 RuboCop::Cop::Gusto::UnreferencedLet::IDENTIFIER_IN_STRING = T.let(T.unsafe(nil), Regexp) -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:72 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:71 RuboCop::Cop::Gusto::UnreferencedLet::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:73 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:72 RuboCop::Cop::Gusto::UnreferencedLet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# The glob and the pathspec encode the SAME set of files two ways: `Dir.glob` (fallback) and -# a regexp filter over `git ls-files` output. Keep them in sync if either changes. -# -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:76 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:73 RuboCop::Cop::Gusto::UnreferencedLet::SUPPORT_FILES_GLOB = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/unreferenced_let.rb:77 -RuboCop::Cop::Gusto::UnreferencedLet::SUPPORT_FILES_PATHSPEC = T.let(T.unsafe(nil), Regexp) - # Requires the use of the `paint` gem for terminal color methods on strings # # @safety diff --git a/sorbet/rbi/gems/rubocop-performance@1.26.1.rbi b/sorbet/rbi/gems/rubocop-performance@1.27.0.rbi similarity index 100% rename from sorbet/rbi/gems/rubocop-performance@1.26.1.rbi rename to sorbet/rbi/gems/rubocop-performance@1.27.0.rbi diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.16.0.rbi similarity index 100% rename from sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.16.0.rbi diff --git a/sorbet/rbi/gems/rubocop@1.90.0.rbi b/sorbet/rbi/gems/rubocop@1.91.0.rbi similarity index 96% rename from sorbet/rbi/gems/rubocop@1.90.0.rbi rename to sorbet/rbi/gems/rubocop@1.91.0.rbi index bee3ba3..928e3d8 100644 --- a/sorbet/rbi/gems/rubocop@1.90.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.91.0.rbi @@ -49,204 +49,6 @@ end # https://github.com/standardrb/standard/blob/main/LICENSE.txt # # -# This code is based on https://github.com/standardrb/standard. -# -# Copyright (c) 2023 Test Double, Inc. -# -# The MIT License (MIT) -# -# https://github.com/standardrb/standard/blob/main/LICENSE.txt -# -# -# This code is based on https://github.com/standardrb/standard. -# -# Copyright (c) 2023 Test Double, Inc. -# -# The MIT License (MIT) -# -# https://github.com/standardrb/standard/blob/main/LICENSE.txt -# -# -# This code is based on https://github.com/standardrb/standard. -# -# Copyright (c) 2023 Test Double, Inc. -# -# The MIT License (MIT) -# -# https://github.com/standardrb/standard/blob/main/LICENSE.txt -# -# -# This code is based on https://github.com/standardrb/standard. -# -# Copyright (c) 2023 Test Double, Inc. -# -# The MIT License (MIT) -# -# https://github.com/standardrb/standard/blob/main/LICENSE.txt -# -# -# This code is based on https://github.com/standardrb/standard. -# -# Copyright (c) 2023 Test Double, Inc. -# -# The MIT License (MIT) -# -# https://github.com/standardrb/standard/blob/main/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# -# This code is based on https://github.com/fohte/rubocop-daemon. -# -# Copyright (c) 2018 Hayato Kawai -# -# The MIT License (MIT) -# -# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt -# -# # This code is based on https://github.com/fohte/rubocop-daemon. # # Copyright (c) 2018 Hayato Kawai @@ -320,16 +122,16 @@ class RuboCop::CLI # pkg:gem/rubocop#lib/rubocop/cli.rb:162 def act_on_options; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:213 + # pkg:gem/rubocop#lib/rubocop/cli.rb:219 def apply_default_formatter; end # pkg:gem/rubocop#lib/rubocop/cli.rb:131 def execute_runners; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:199 + # pkg:gem/rubocop#lib/rubocop/cli.rb:205 def handle_editor_mode; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:203 + # pkg:gem/rubocop#lib/rubocop/cli.rb:209 def handle_exiting_options; end # pkg:gem/rubocop#lib/rubocop/cli.rb:150 @@ -338,7 +140,7 @@ class RuboCop::CLI # pkg:gem/rubocop#lib/rubocop/cli.rb:87 def profile_if_needed; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:227 + # pkg:gem/rubocop#lib/rubocop/cli.rb:233 def report_pending_cops; end # pkg:gem/rubocop#lib/rubocop/cli.rb:119 @@ -347,10 +149,15 @@ class RuboCop::CLI # pkg:gem/rubocop#lib/rubocop/cli.rb:127 def run_command(name); end + # Options that decide which cops run, as opposed to how configuration is loaded. + # + # pkg:gem/rubocop#lib/rubocop/cli.rb:192 + def set_cop_selection_options_to_config_loader; end + # pkg:gem/rubocop#lib/rubocop/cli.rb:184 def set_options_to_config_loader; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:194 + # pkg:gem/rubocop#lib/rubocop/cli.rb:200 def set_options_to_pending_cops_reporter; end # pkg:gem/rubocop#lib/rubocop/cli.rb:139 @@ -359,7 +166,7 @@ class RuboCop::CLI # pkg:gem/rubocop#lib/rubocop/cli.rb:143 def validate_options_vs_config; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:231 + # pkg:gem/rubocop#lib/rubocop/cli.rb:237 def warn_if_cache_root_changed(early, desired); end end @@ -521,37 +328,40 @@ class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base private - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:116 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:125 def bug_tracker_uri; end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:100 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:109 def display_error_summary(errors); end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:87 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:96 def display_summary(runner); end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:92 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:101 def display_warning_summary(warnings); end # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:22 def execute_runner(paths); end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:122 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:142 def maybe_print_corrected_source; end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:46 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:55 def merge_todo_audit_status(status); end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:67 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:131 + def print_diffs(diffs); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:76 def print_unused_todo_entries(todo_file, unused); end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:53 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:62 def report_unused_todo_entries; end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:36 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:45 def runner_status(runner, all_pass_or_excluded); end - # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:73 + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:82 def with_redirect; end end @@ -894,26 +704,97 @@ class RuboCop::CachedData def source_buffer; end end +# Lists the files that differ from a git revision, for `--changed`. +# +# Shelling out to `git` keeps RuboCop free of a version control dependency, +# and means the answer is exactly what git would give on the command line. +# +# @api private +# +# pkg:gem/rubocop#lib/rubocop/changed_files.rb:12 +class RuboCop::ChangedFiles + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:16 + def initialize(revision = T.unsafe(nil)); end + + # Files that were added or modified since the revision, as absolute paths. + # Deleted files are left out - there is nothing left to inspect - and + # untracked files are included, since a file that is new to the working + # tree has changed as surely as one git already knows about. + # + # @return [Set] + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:26 + def paths; end + + private + + # git hands back bytes, which Ruby tags with the encoding the process + # happens to have been started in - splitting those bytes as US-ASCII raises + # on any path that is not. They have to end up in the encoding `Dir.glob` + # uses, or a path with a non-ASCII character in it never matches the file + # list it is compared against. + # + # On POSIX those bytes are already the filesystem's own, so the encoding is + # simply corrected. Windows is the exception: git converts paths to UTF-8 on + # the way out, while Ruby reports file names in the local code page, so the + # two have to be reconciled. + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:83 + def filesystem_path(path); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:95 + def git(*args); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:105 + def git_error_message(stderr); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:38 + def modified_paths; end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:34 + def repository_root; end + + # The `-z` above is what makes these usable: without it git wraps any path + # that is not plain ASCII in quotes and octal escapes, and those files drop + # out of the comparison without a word. + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:69 + def split_paths(output); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:53 + def unborn_head?; end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:60 + def untracked_paths; end +end + +# pkg:gem/rubocop#lib/rubocop/changed_files.rb:13 +RuboCop::ChangedFiles::DEFAULT_REVISION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/changed_files.rb:14 +RuboCop::ChangedFiles::FILESYSTEM_ENCODING = T.let(T.unsafe(nil), Encoding) + # and provides a way to check if each cop is enabled at arbitrary line. # # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:4 class RuboCop::CommentConfig include ::RuboCop::CommentConfig::DisableNext + include ::RuboCop::CommentConfig::PushPop extend ::RuboCop::SimpleForwardable - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:33 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:34 def initialize(processed_source); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:74 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:75 def comment_only_line?(line_number); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:31 - def config(*_arg0, **_arg1, &_arg2); end + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:32 + def config(*, **, &); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:62 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:63 def cop_disabled_line_ranges; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:40 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:41 def cop_enabled_at_line?(cop, line_number); end # Whether the cop is enabled for all of the given line span. The cop @@ -921,172 +802,161 @@ class RuboCop::CommentConfig # overlaps it, so that a directive on any line of a multi-line offense # suppresses the offense. # - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:48 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:49 def cop_enabled_at_lines?(cop, first_line, last_line); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:58 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:59 def cop_opted_in?(cop); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:66 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:67 def extra_enabled_comments; end - # The names of the cops that are opted in by an `enable` comment directive, - # used to mobilize cops disabled in the config on demand. + # The names of the cops that are opted in by an `enable` comment directive + # or a `+` argument of a `push`/`next` directive, used to mobilize cops + # disabled in the config on demand. # # @api private # @return [Set] # - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:83 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:85 def opt_in_cops; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:29 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:30 def processed_source; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:31 - def registry(*_arg0, **_arg1, &_arg2); end + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:32 + def registry(*, **, &); end private - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:116 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:117 def analyze; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:198 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:161 def analyze_cop(analysis, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:218 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:181 def analyze_disabled(analysis, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:222 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:185 def analyze_rest(analysis, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:209 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:172 def analyze_single_line(analysis, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:165 - def apply_cop_op(analyses, operation, cop, directive); end - - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:159 - def apply_push(analyses, resolved_cops, directive); end - - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:226 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:189 def cop_line_ranges(analysis); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:230 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:193 def each_directive; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:153 - def expand_cop_name(name); end - - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:98 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:101 def extra_enabled_comments_with_names(extras:, names:); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:264 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:234 def handle_enable_all(directive, names, extras); end # Collect cops that have been disabled or enabled by name in a directive comment # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. # - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:278 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:248 def handle_switch(directive, names, extras); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:189 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:152 def inject_disabled_cops_directives(analyses); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:257 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:227 def non_comment_token_line_numbers; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:175 - def pop_state(analyses, line); end - - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:182 - def popped_analysis(current, restored, line); end - # `Style/DisableCopsWithinSourceCodeDirective` cannot be disabled via # directive comments when it is explicitly enabled with `Enabled: true`. # This prevents users from bypassing the cop by writing a disable # directive that targets this cop itself. # - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:252 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:222 def prevent_directive_disabling?(cop_name); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:239 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:209 def qualified_cop_name(cop_name); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:147 - def resolve_push_cops(directive); end + # Push/pop and next-statement directives close themselves, so they + # play no part in the disable/enable pairing. + # + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:204 + def self_closing_directive?(directive); end end -# pkg:gem/rubocop#lib/rubocop/comment_config.rb:10 +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:11 RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float) # This class provides an API compatible with RuboCop::DirectiveComment # to be used for cops that are disabled in the config file # -# pkg:gem/rubocop#lib/rubocop/comment_config.rb:14 +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:15 class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment include ::RuboCop::Ext::Comment - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:22 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:23 def initialize(cop_name); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:17 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 def line_number; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:17 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 def loc; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:17 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 def text; end end -# pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 def line; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 def line=(_); end class << self - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 def [](*_arg0); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 def inspect; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 def keyword_init?; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 def members; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 def new(*_arg0); end end end -# pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 def expression; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 def expression=(_); end class << self - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 def [](*_arg0); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 def inspect; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 def keyword_init?; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 def members; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:19 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 def new(*_arg0); end end end @@ -1098,7 +968,7 @@ end # # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 class RuboCop::CommentConfig::CopAnalysis < ::Struct - # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:25 + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:27 def close(line); end # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 @@ -1151,19 +1021,20 @@ class RuboCop::CommentConfig::DirectiveRange < ::Range def directive; end end -# Handling of `disable-next` directives: computing the statement scope -# they apply to and tracking directives that attached to nothing. +# Handling of next-statement directives (`disable-next`, `todo-next` and +# `next`): computing the statement scope they apply to and tracking +# directives that attached to nothing. # The scope is the whole statement starting on the next line bearing # code. Comment-only lines between the directive and the code chain (so # several directives can stack), while a blank line breaks the attachment. # @api private # -# pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:11 +# pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:12 module RuboCop::CommentConfig::DisableNext - # `disable-next` directives that suppress nothing: nothing follows + # Next-statement directives that affect nothing: nothing follows # them, or they sit at the end of a code line. # - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:14 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:15 def detached_next_directives; end # The line range of the statement a `disable-next` directive on the @@ -1172,34 +1043,86 @@ module RuboCop::CommentConfig::DisableNext # Stacked directives share the target, so the computation is memoized. # @api private # - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:24 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:25 def statement_scope_after(line); end private - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:45 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:46 def add_next_range(analyses, cop_name, range); end - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:35 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:36 def apply_disable_next(analyses, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:51 + # Applies an `enable-next` directive: every listed cop (departments + # and `all` included) has any open disable suspended for the attached + # statement. + # + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:75 + def apply_enable_next(analyses, directive); end + + # Applies a `next` directive: `-` cops are disabled for the attached + # statement (exactly like `disable-next`), `+` cops have any open + # disable suspended for it. The `resolved_cops` come pre-expanded and + # qualified, mirroring `push`. + # + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:56 + def apply_next_directive(analyses, resolved_cops, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:97 def attached_code_line(directive_line); end - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:92 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:138 def heredoc?(node); end - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:60 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:106 def statement_bounds_at(line); end - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:84 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:130 def statement_end_line(statement); end - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:69 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:115 def statement_start_line?(node, line); end - # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:77 + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:123 def statement_starting_at(line); end + + # Punches a statement-sized hole into the currently open disable of the + # cop (whether opened by a directive or injected for a config-disabled + # cop): the open range closes just above the statement and reopens + # right below it, still attributed to its opening directive. Aligned + # with `push`, a `+` for a cop that is not disabled is a no-op. + # + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:89 + def suspend_disable(analyses, cop, bounds); end +end + +# Handling of `push`/`pop` directives and their signed cop arguments: +# saving and restoring the per-cop analysis state, and resolving the +# `+`/`-` argument lists (shared with the `next` directive). +# @api private +# +# pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:9 +module RuboCop::CommentConfig::PushPop + private + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:30 + def apply_cop_op(analyses, operation, cop, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:24 + def apply_push(analyses, resolved_cops, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:18 + def expand_cop_name(name); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:40 + def pop_state(analyses, line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:47 + def popped_analysis(current, restored, line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:12 + def resolve_push_cops(directive); end end # This class represents the configuration of the RuboCop application @@ -1218,18 +1141,18 @@ class RuboCop::Config def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def [](*_arg0, **_arg1, &_arg2); end + def [](*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def []=(*_arg0, **_arg1, &_arg2); end + def []=(*, **, &); end - # pkg:gem/rubocop#lib/rubocop/config.rb:229 + # pkg:gem/rubocop#lib/rubocop/config.rb:239 def active_support_extensions_enabled?; end # pkg:gem/rubocop#lib/rubocop/config.rb:126 def add_excludes_from_higher_level(highest_config); end - # pkg:gem/rubocop#lib/rubocop/config.rb:257 + # pkg:gem/rubocop#lib/rubocop/config.rb:267 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -1238,12 +1161,12 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # pkg:gem/rubocop#lib/rubocop/config.rb:298 + # pkg:gem/rubocop#lib/rubocop/config.rb:308 def base_dir_for_path_parameters; end # @return [String, nil] # - # pkg:gem/rubocop#lib/rubocop/config.rb:328 + # pkg:gem/rubocop#lib/rubocop/config.rb:338 def bundler_lock_file_path; end # pkg:gem/rubocop#lib/rubocop/config.rb:84 @@ -1259,22 +1182,22 @@ class RuboCop::Config def cop_enabled?(name); end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def delete(*_arg0, **_arg1, &_arg2); end + def delete(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:138 def deprecation_check; end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def dig(*_arg0, **_arg1, &_arg2); end + def dig(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:207 def disabled_new_cops?; end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def each(*_arg0, **_arg1, &_arg2); end + def each(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def each_key(*_arg0, **_arg1, &_arg2); end + def each_key(*, **, &); end # Whether the given pending cop should be enabled, based on the `NewCops` setting of # its department (if any) or of `AllCops`. A department may set `NewCops` to `enable`, @@ -1288,16 +1211,16 @@ class RuboCop::Config def enabled_new_cops?; end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def fetch(*_arg0, **_arg1, &_arg2); end + def fetch(*, **, &); end - # pkg:gem/rubocop#lib/rubocop/config.rb:276 + # pkg:gem/rubocop#lib/rubocop/config.rb:286 def file_to_exclude?(file); end # Returns true if the file matches any include pattern. If a block is given, the block is called # to determine if the pattern is relevant (true returned by the block) or should be skipped # (false returned). # - # pkg:gem/rubocop#lib/rubocop/config.rb:240 + # pkg:gem/rubocop#lib/rubocop/config.rb:250 def file_to_include?(file); end # pkg:gem/rubocop#lib/rubocop/config.rb:199 @@ -1333,10 +1256,10 @@ class RuboCop::Config # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names. # - # pkg:gem/rubocop#lib/rubocop/config.rb:354 + # pkg:gem/rubocop#lib/rubocop/config.rb:364 def gem_versions_in_target; end - # pkg:gem/rubocop#lib/rubocop/config.rb:366 + # pkg:gem/rubocop#lib/rubocop/config.rb:376 def inspect; end # True if this is a config file that is shipped with RuboCop @@ -1345,10 +1268,10 @@ class RuboCop::Config def internal?; end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def key?(*_arg0, **_arg1, &_arg2); end + def key?(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def keys(*_arg0, **_arg1, &_arg2); end + def keys(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:80 def loaded_features; end @@ -1363,15 +1286,15 @@ class RuboCop::Config def make_excludes_absolute; end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def map(*_arg0, **_arg1, &_arg2); end + def map(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def merge(*_arg0, **_arg1, &_arg2); end + def merge(*, **, &); end - # pkg:gem/rubocop#lib/rubocop/config.rb:308 + # pkg:gem/rubocop#lib/rubocop/config.rb:318 def parser_engine; end - # pkg:gem/rubocop#lib/rubocop/config.rb:289 + # pkg:gem/rubocop#lib/rubocop/config.rb:299 def path_relative_to_config(path); end # Returns the names of the target's gems that are sourced from a local path @@ -1379,56 +1302,63 @@ class RuboCop::Config # uses `gemspec`), whose code therefore lives in the project itself. # @returns [Array, nil] The gem names, or nil without a lockfile. # - # pkg:gem/rubocop#lib/rubocop/config.rb:362 + # pkg:gem/rubocop#lib/rubocop/config.rb:372 def path_sourced_gems_in_target; end - # pkg:gem/rubocop#lib/rubocop/config.rb:285 + # pkg:gem/rubocop#lib/rubocop/config.rb:295 def patterns_to_exclude; end - # pkg:gem/rubocop#lib/rubocop/config.rb:281 + # pkg:gem/rubocop#lib/rubocop/config.rb:291 def patterns_to_include; end - # pkg:gem/rubocop#lib/rubocop/config.rb:339 + # pkg:gem/rubocop#lib/rubocop/config.rb:349 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden # files, false if that's definitely not possible. # - # pkg:gem/rubocop#lib/rubocop/config.rb:268 + # pkg:gem/rubocop#lib/rubocop/config.rb:278 def possibly_include_hidden?; end + # Whether preview behavior is on, for cops that gate an unstable change + # behind it and for cops that are themselves `Enabled: preview`. + # `--preview` / `--no-preview` win over `AllCops: Preview`. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:232 + def preview?(options = T.unsafe(nil)); end + # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def replace(*_arg0, **_arg1, &_arg2); end + def replace(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:104 def signature; end - # pkg:gem/rubocop#lib/rubocop/config.rb:323 + # pkg:gem/rubocop#lib/rubocop/config.rb:333 def smart_loaded_path; end - # pkg:gem/rubocop#lib/rubocop/config.rb:233 + # pkg:gem/rubocop#lib/rubocop/config.rb:243 def string_literals_frozen_by_default?; end - # pkg:gem/rubocop#lib/rubocop/config.rb:312 + # pkg:gem/rubocop#lib/rubocop/config.rb:322 def target_rails_version; end # pkg:gem/rubocop#lib/rubocop/config.rb:98 - def target_ruby_version(*_arg0, **_arg1, &_arg2); end + def target_ruby_version(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def to_h(*_arg0, **_arg1, &_arg2); end + def to_h(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def to_hash(*_arg0, **_arg1, &_arg2); end + def to_hash(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:100 def to_s; end # pkg:gem/rubocop#lib/rubocop/config.rb:96 - def transform_values(*_arg0, **_arg1, &_arg2); end + def transform_values(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:98 - def validate(*_arg0, **_arg1, &_arg2); end + def validate(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config.rb:91 def validate_after_resolution; end @@ -1438,58 +1368,58 @@ class RuboCop::Config # Returns a `Gem::Version` for values like `'1.19'` or `1.19`, and `nil` # for non-version values like `'N/A'` or `'<>'`. # - # pkg:gem/rubocop#lib/rubocop/config.rb:470 + # pkg:gem/rubocop#lib/rubocop/config.rb:480 def comparable_version(value); end - # pkg:gem/rubocop#lib/rubocop/config.rb:430 + # pkg:gem/rubocop#lib/rubocop/config.rb:440 def department_of(qualified_cop_name); end - # pkg:gem/rubocop#lib/rubocop/config.rb:418 + # pkg:gem/rubocop#lib/rubocop/config.rb:428 def enable_cop?(qualified_cop_name, cop_options); end # @param [Gem::Version] gem_version an object like `Gem::Version.new("7.1.2.3")` # @return [Float] The major and minor version, like `7.1` # - # pkg:gem/rubocop#lib/rubocop/config.rb:397 + # pkg:gem/rubocop#lib/rubocop/config.rb:407 def gem_version_to_major_minor_float(gem_version); end - # pkg:gem/rubocop#lib/rubocop/config.rb:372 + # pkg:gem/rubocop#lib/rubocop/config.rb:382 def match_relative_or_absolute_path?(pattern, relative_file_path, absolute_file_path); end # Whether the cop's pending status is resolved by a `NewCops` setting, # so that it should not appear in the pending cops warning. # Unlike `enabled_new_cop?`, `disable` counts as covered. # - # pkg:gem/rubocop#lib/rubocop/config.rb:449 + # pkg:gem/rubocop#lib/rubocop/config.rb:459 def new_cops_covered?(qualified_cop_name); end # The effective `NewCops` setting for the given cop: the department-level # setting if present, otherwise the `AllCops` setting. # - # pkg:gem/rubocop#lib/rubocop/config.rb:439 + # pkg:gem/rubocop#lib/rubocop/config.rb:449 def new_cops_setting_for(qualified_cop_name); end - # pkg:gem/rubocop#lib/rubocop/config.rb:459 + # pkg:gem/rubocop#lib/rubocop/config.rb:469 def new_cops_version_covers?(new_cops_version, qualified_cop_name); end # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names. # - # pkg:gem/rubocop#lib/rubocop/config.rb:403 + # pkg:gem/rubocop#lib/rubocop/config.rb:413 def read_gem_versions_from_target_lockfile; end # @returns [Array, nil] The names of the gems sourced from a local path. # - # pkg:gem/rubocop#lib/rubocop/config.rb:411 + # pkg:gem/rubocop#lib/rubocop/config.rb:421 def read_path_sourced_gems_from_target_lockfile; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # pkg:gem/rubocop#lib/rubocop/config.rb:384 + # pkg:gem/rubocop#lib/rubocop/config.rb:394 def read_rails_version_from_bundler_lock_file; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # pkg:gem/rubocop#lib/rubocop/config.rb:379 + # pkg:gem/rubocop#lib/rubocop/config.rb:389 def target_rails_version_from_bundler_lock_file; end class << self @@ -1604,41 +1534,44 @@ class RuboCop::ConfigLoader extend ::RuboCop::FileFinder class << self - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:139 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:141 def add_excludes_from_files(config, config_file); end # @api private # Used to add features that were required inside a config or from # the CLI using `--require`. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:217 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:225 def add_loaded_features(loaded_features); end # @api private # Used to add plugins that were required inside a config or from # the CLI using `--plugin`. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:210 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:218 def add_loaded_plugins(loaded_plugins); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:92 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:94 def add_missing_namespaces(path, hash); end # Applies CLI overrides for `AllCops/EnabledByDefault` and # `AllCops/DisabledByDefault` to the given configuration. Used when the # configuration would otherwise be returned without going through # `merge_with_default` (e.g. there is no user-supplied `.rubocop.yml`). + # Used when there is no configuration file, so the defaults are the whole + # configuration and still need the same treatment `merge_with_default` + # would have given them. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:198 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:203 def apply_default_overrides(config); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:34 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:35 def cache_root(cache_root_override = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:28 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:29 def cache_root=(_arg0); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:38 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:39 def clear_options; end # Returns the path of .rubocop.yml searching upwards in the @@ -1647,10 +1580,10 @@ class RuboCop::ConfigLoader # user's home directory is checked. If there's no .rubocop.yml # there either, the path to the default file is returned. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:120 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:122 def configuration_file_for(target_dir); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:124 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:126 def configuration_from_file(config_file, check: T.unsafe(nil)); end # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 @@ -1659,13 +1592,13 @@ class RuboCop::ConfigLoader # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 def debug=(_arg0); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:31 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:32 def debug?; end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:149 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:151 def default_configuration; end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:28 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:29 def default_configuration=(_arg0); end # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 @@ -1698,7 +1631,7 @@ class RuboCop::ConfigLoader # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 def ignore_parent_exclusion=(_arg0); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:32 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:33 def ignore_parent_exclusion?; end # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 @@ -1712,62 +1645,68 @@ class RuboCop::ConfigLoader # so this API is usually not needed. It is intended to be used only when implementing tests # that do not use `rubocop/rspec/support`. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:160 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:162 def inject_defaults!(config_yml_path); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:53 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:55 def load_file(file, check: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:77 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:79 def load_yaml_configuration(absolute_path); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:29 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:30 def loaded_features; end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:29 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:30 def loaded_plugins; end # Return a recursive merge of two hashes. That is, a normal hash merge, # with the addition that any value that is a hash, and occurs in both # arguments, will also be merged. And so on. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:111 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:113 def merge(base_hash, derived_hash); end # Merges the given configuration with the default one. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:190 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:192 def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def preview; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def preview=(_arg0); end + # Returns the path RuboCop inferred as the root of the project. No file # searches will go past this directory. # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:180 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:182 def project_root; end private - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:231 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:239 def check_duplication(yaml_code, absolute_path); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:223 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:231 def file_path(file); end # Read the specified file, or exit with a friendly, concise message on # stderr. Care is taken to use the standard OS exit code for a "file not # found" error. # - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:251 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:259 def read_file(absolute_path); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:227 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:235 def resolver; end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:257 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:265 def yaml_tree_to_hash(yaml_tree); end - # pkg:gem/rubocop#lib/rubocop/config_loader.rb:267 + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:275 def yaml_tree_to_hash!(yaml_tree); end end end @@ -1786,6 +1725,14 @@ RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) # # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:10 class RuboCop::ConfigLoaderResolver + # A cop's entry in the default configuration may carry a `Preview` section + # with the defaults it is expected to adopt in the next major release. Under + # `Preview` those replace the current defaults. The section is dropped either + # way, so the resolved configuration only ever shows what is in effect. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:176 + def apply_preview_defaults(default_configuration, preview); end + # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the # base configuration are relative to the directory where the base configuration file is. For the # derived configuration, we need to make those paths relative to where the derived configuration @@ -1798,7 +1745,7 @@ class RuboCop::ConfigLoaderResolver # with the addition that any value that is a hash, and occurs in both # arguments, will also be merged. And so on. # - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:119 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:122 def merge(base_hash, derived_hash, **opts); end # Merges the given configuration with the default one. If @@ -1815,13 +1762,13 @@ class RuboCop::ConfigLoaderResolver # An `Enabled: true` setting in user configuration for a cop overrides an # `Enabled: false` setting for its department. # - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:138 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:141 def override_department_setting_for_cops(base_hash, derived_hash); end # If a cop was previously explicitly enabled, but then superseded by the # department being disabled, disable it. # - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:155 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:158 def override_enabled_for_disabled_departments(base_hash, derived_hash); end # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:38 @@ -1838,53 +1785,71 @@ class RuboCop::ConfigLoaderResolver private - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:242 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:284 def base_configs(path, inherit_from, file); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:210 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:252 def determine_inherit_mode(hash, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:179 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:221 def disabled?(hash, department); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:183 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:225 def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:204 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:246 def duplicate_setting_warning(opts, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:301 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:343 def gem_config_path(gem_name, relative_config_path); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:279 - def handle_disabled_by_default(config, new_default_configuration); end + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:321 + def handle_disabled_by_default(config, new_default_configuration, base_defaults); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:254 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:188 + def inherit_mode_for_default(config); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:296 def inherited_file(path, inherit_from, file); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:238 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:280 def merge_hashes?(base_hash, derived_hash, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:275 + # `config` has already been through `handle_disabled_by_default` by this + # point, which returns a plain hash, so read `AllCops` directly rather than + # going through `Config#for_all_cops`. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:207 + def preview?(config); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:317 def remote_config?(file); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:171 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:213 def resolve_default_overrides(config); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:230 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:272 def should_merge?(mode, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:234 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:276 def should_override?(mode, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:216 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:258 def should_union?(derived_hash, base_hash, root_mode, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:297 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:339 def transform(config, &block); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:192 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:234 def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end + + # Under `Preview`, `Exclude` is merged rather than replaced, so that excluding + # one directory does not silently drop the excludes it would have inherited - + # from the default configuration or from a file named in `inherit_from`. An + # explicit `inherit_mode` still wins, in either direction. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:196 + def with_preview_exclude_merge(mode, config); end end # Raised when a RuboCop configuration file is not found. @@ -2020,12 +1985,13 @@ class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:8 def old_name; end - # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:28 + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:29 def violated?; end - # Cop rules currently can only be failures, not warnings + # Failure by default; rules that accept `severity: warning` say so + # themselves. # - # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:24 + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:25 def warning?; end end @@ -2130,13 +2096,19 @@ class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRu # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:18 def rule_message; end + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:30 + def warning?; end + private - # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:36 + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:44 def alternatives; end - # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:32 + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:40 def reason; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:36 + def severity; end end # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:11 @@ -2310,10 +2282,10 @@ class RuboCop::ConfigValidator def initialize(config); end # pkg:gem/rubocop#lib/rubocop/config_validator.rb:28 - def for_all_cops(*_arg0, **_arg1, &_arg2); end + def for_all_cops(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config_validator.rb:28 - def smart_loaded_path(*_arg0, **_arg1, &_arg2); end + def smart_loaded_path(*, **, &); end # pkg:gem/rubocop#lib/rubocop/config_validator.rb:67 def target_ruby_version; end @@ -2335,7 +2307,7 @@ class RuboCop::ConfigValidator # pkg:gem/rubocop#lib/rubocop/config_validator.rb:102 def alert_about_unrecognized_cops(invalid_cop_names); end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:300 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:315 def check_cop_config_value(hash, parent = T.unsafe(nil)); end # pkg:gem/rubocop#lib/rubocop/config_validator.rb:75 @@ -2344,27 +2316,27 @@ class RuboCop::ConfigValidator # pkg:gem/rubocop#lib/rubocop/config_validator.rb:82 def check_target_ruby; end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:239 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:254 def each_invalid_parameter(cop_name); end # pkg:gem/rubocop#lib/rubocop/config_validator.rb:118 def list_unknown_cops(invalid_cop_names); end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:196 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:211 def new_cops_value_for_department(name, section); end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:203 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:218 def new_cops_version_value?(value); end # FIXME: Handling colors in exception messages like this is ugly. # - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:321 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:336 def param_error_message(parent, key, value, supposed_values); end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:289 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:304 def reject_conflicting_safe_settings; end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:280 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:295 def reject_mutually_exclusive_defaults; end # pkg:gem/rubocop#lib/rubocop/config_validator.rb:141 @@ -2373,25 +2345,31 @@ class RuboCop::ConfigValidator # pkg:gem/rubocop#lib/rubocop/config_validator.rb:73 def target_ruby; end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:173 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:188 def validate_all_cops_new_cops_parameter; end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:184 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:173 + def validate_all_cops_parameters; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:199 def validate_department_new_cops_parameters; end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:254 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:269 def validate_enforced_styles(valid_cop_names); end + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:178 + def validate_fail_level_parameter; end + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:168 def validate_new_cops_parameter; end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:225 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:240 def validate_parameter_names(valid_cop_names); end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:211 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:226 def validate_parameter_shape(valid_cop_names); end - # pkg:gem/rubocop#lib/rubocop/config_validator.rb:274 + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:289 def validate_support_and_has_list(name, formats, valid); end # pkg:gem/rubocop#lib/rubocop/config_validator.rb:157 @@ -2972,16 +2950,16 @@ class RuboCop::Cop::Base extend ::RuboCop::AST::NodePattern::Macros extend ::RuboCop::ExcludeLimit - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:159 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:164 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:283 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:288 def active_support_extensions_enabled?; end # Adds an offense that has no particular location. # No correction can be applied to global offenses # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:192 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:197 def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end # Adds an offense on the specified range (or node with an expression) @@ -2989,48 +2967,48 @@ class RuboCop::Cop::Base # to provide the cop the opportunity to autocorrect the offense. # If message is not specified, the method `message` will be called. # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:204 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:209 def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:363 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:375 def always_autocorrect?; end # Called before any investigation # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:349 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:361 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:331 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:343 def callbacks_needed; end # pkg:gem/rubocop#lib/rubocop/cop/base.rb:43 def config; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:257 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:262 def config_to_allow_offenses; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:261 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:266 def config_to_allow_offenses=(hash); end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:369 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:381 def contextual_autocorrect?; end # Configuration Helpers # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:251 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:256 def cop_config; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:243 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:248 def cop_name; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:300 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:312 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -3049,53 +3027,60 @@ class RuboCop::Cop::Base # ResultCache system when those external dependencies change, # ie when the ResultCache should be invalidated. # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:239 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:244 def external_dependency_checksum; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:373 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:385 def inspect; end # Gets called if no message is specified when calling `add_offense` or # `add_global_offense` # Cops are discouraged to override this; instead pass your message directly # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:186 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:191 def message(_range = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:247 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:252 def name; end # @deprecated Make potential errors with previous API more obvious # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:322 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:334 def offenses; end # Called after all on_... have been called # When refining this method, always call `super` # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:173 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:178 def on_investigation_end; end # Called before all on_... have been called # When refining this method, always call `super` # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:167 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:172 def on_new_investigation; end # Called instead of all on_... callbacks for unrecognized files / syntax errors # When refining this method, always call `super` # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:179 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:184 def on_other_file; end # There should be very limited reasons for a Cop to do it's own parsing # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:305 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:317 def parse(source, path = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:275 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:280 def parser_engine; end + # Whether the user opted in to unstable behavior, with `--preview` or + # `AllCops: Preview`. Cops branch on this to ship a change that is not + # ready to be the default yet. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:299 + def preview?; end + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:43 def processed_source; end @@ -3108,126 +3093,126 @@ class RuboCop::Cop::Base # @api private # Called between investigations # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:311 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:323 def ready; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:291 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:303 def relevant_file?(file); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:287 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:292 def string_literals_frozen_by_default?; end # Returns a gems locked versions (i.e. from Gemfile.lock or gems.locked) # @returns [Gem::Version | nil] The locked gem version, or nil if the gem is not present. # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:271 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:276 def target_gem_version(gem_name); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:279 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:284 def target_rails_version; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:265 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:270 def target_ruby_version; end private - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:500 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:512 def annotate(message); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:391 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:403 def apply_correction(corrector); end # @return [Symbol] offense status # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:464 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:476 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:387 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:399 def callback_argument(range); end # Called to complete an investigation # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:416 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:428 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:434 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:446 def correct(range); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:552 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:564 def covering_disabled_range(range); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:405 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:417 def current_corrector; end # Reserved for Commissioner: # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:397 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:409 def current_offense_locations; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:409 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:421 def current_offenses; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:401 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:413 def currently_disabled_lines; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:567 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:579 def custom_severity; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:563 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:575 def default_severity; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:478 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:490 def disable_uncorrectable(range); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:529 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:541 def enabled_line?(line_number); end # A multi-line offense is suppressed by a directive on any line of its # range, not only its first line, matching the intuition that the # directive is attached to the offending code. # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:538 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:550 def enabled_lines?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:506 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:518 def file_name_matches_any?(file, parameter, default_result); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:496 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:508 def find_message(range, message); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:559 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:571 def find_severity(_range, severity); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:521 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:533 def matches_absolute_include_pattern?(patterns, file); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:580 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:592 def range_for_original(range); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:485 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:497 def range_from_node_or_range(node_or_range); end # Actually private methods # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:426 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:438 def reset_investigation; end # The `--` reason on the directive that suppresses offenses on this # range, or `nil` when the directive carries none. # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:547 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:559 def suppression_reason(range); end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:591 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:603 def target_satisfies_all_gem_version_requirements?; end # @return [Symbol] offense status # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:449 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:461 def use_corrector(range, corrector); end class << self @@ -3238,23 +3223,23 @@ class RuboCop::Cop::Base # # @api public # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:60 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:65 def autocorrect_incompatible_with; end # Naming # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:94 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:99 def badge; end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:336 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:348 def callbacks_needed; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:98 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:103 def cop_name; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:102 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:107 def department; end # Returns a url to view this cops documentation online. @@ -3265,32 +3250,32 @@ class RuboCop::Cop::Base # # @api public # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:71 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:76 def documentation_url(config = T.unsafe(nil)); end # Call for abstract Cop classes # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:82 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:87 def exclude_from_registry; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:141 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:146 def gem_requirements; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:75 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:80 def inherited(subclass); end # Override and return the Force class(es) you need to join # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:119 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:124 def joining_forces; end - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:106 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:111 def lint?; end # Returns true if the cop name or the cop namespace matches any of the # given names. # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:112 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:117 def match?(given_names); end # Register a version requirement for the given gem name. @@ -3305,13 +3290,13 @@ class RuboCop::Cop::Base # # @api public # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:154 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:159 def requires_gem(gem_name, *version_requirements); end # Returns if class supports autocorrect. # It is recommended to extend AutoCorrector instead of overriding # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:88 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:93 def support_autocorrect?; end # Override if your cop should be called repeatedly for multiple investigations @@ -3324,17 +3309,24 @@ class RuboCop::Cop::Base # Note that under `--parallel` each worker process has its own cop # instances, so state persists only within a worker's share of the files. # - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:132 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:137 def support_multiple_source?; end private - # pkg:gem/rubocop#lib/rubocop/cop/base.rb:381 + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:393 def restrict_on_send; end end end -# pkg:gem/rubocop#lib/rubocop/cop/base.rb:413 +# Departments whose cops report above `convention` unless a cop says +# otherwise. The exceptions live in `config/default.yml` as an explicit +# `Severity`, such as the lint-like cops in `Bundler` and `Gemspec`. +# +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:57 +RuboCop::Cop::Base::DEPARTMENT_SEVERITIES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:425 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -6703,57 +6695,57 @@ end # This is a special case that just ensures the kwsplat is aligned with the rest of the hash # since a `kwsplat` does not have a key, separator or value. # -# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:163 +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:173 class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:164 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:174 def deltas(first_pair, current_pair); end end # Handles calculation of deltas when the enforced style is 'separator'. # -# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:138 +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:148 class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:141 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:151 def deltas_for_first_pair(_first_pair); end private - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:151 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:161 def hash_rocket_delta(first_pair, current_pair); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:147 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:157 def key_delta(first_pair, current_pair); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:155 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:165 def value_delta(first_pair, current_pair); end end # Handles calculation of deltas when the enforced style is 'table'. # -# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:81 +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:91 class RuboCop::Cop::HashAlignmentStyles::TableAlignment include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:84 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:94 def deltas_for_first_pair(first_pair); end private - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:98 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:108 def hash_rocket_delta(first_pair, current_pair); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:94 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:104 def key_delta(first_pair, current_pair); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:132 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:142 def max_delimiter_width(hash_node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:128 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:138 def max_key_width(hash_node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:124 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:134 def multiline_key_end_columns(hash_node); end # The column the separator should land on: the shared key margin @@ -6762,10 +6754,10 @@ class RuboCop::Cop::HashAlignmentStyles::TableAlignment # multiline key's (newline-including) source length, so it's a # separate candidate rather than folded into `max_key_width`. # - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:114 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:124 def target_operator_column(first_pair); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:102 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:112 def value_delta(first_pair, current_pair); end end @@ -6782,7 +6774,13 @@ module RuboCop::Cop::HashAlignmentStyles::ValueAlignment private # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:71 + def alignable_values?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:81 def separator_delta(first_pair, current_pair, key_delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:77 + def value_on_later_line?(pair); end end # This module checks for Ruby 3.1's hash value omission syntax. @@ -6797,34 +6795,37 @@ module RuboCop::Cop::HashShorthandSyntax private - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:143 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:147 def brackets?(method_dispatch_node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:173 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:177 def breakdown_value_types_of_hash(hash_node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:121 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:125 def def_node_that_require_parentheses(node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:202 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:206 def each_omittable_value_pair(hash_value_type_breakdown, &block); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:198 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:202 def each_omitted_value_pair(hash_value_type_breakdown, &block); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:99 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:103 def enforced_shorthand_syntax; end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:135 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:139 def find_ancestor_method_dispatch_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:185 - def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:99 + def hash_rockets_enforced?(hash_node); end # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:189 - def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end + def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:193 + def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:197 def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:93 @@ -6833,31 +6834,31 @@ module RuboCop::Cop::HashShorthandSyntax # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:87 def ignore_mixed_hash_shorthand_syntax?(hash_node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:158 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:162 def last_expression?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:206 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:210 def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:222 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:226 def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:67 def register_offense(node, message, replacement); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:103 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:107 def require_hash_value?(hash_key_source, node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:112 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:116 def require_hash_value_for_around_hash_literal?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:166 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:170 def requires_parentheses_context?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:147 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:151 def use_element_of_hash_literal_as_receiver?(ancestor, parent); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:152 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:156 def use_modifier_form_without_parenthesized_method_call?(ancestor); end end @@ -7577,40 +7578,40 @@ class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:91 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:93 def arguments_or_first_arg_pairs(node); end # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:79 def arguments_with_last_arg_pairs(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:107 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:109 def autocorrect(corrector, node); end # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:67 def autocorrect_incompatible_with_other_cops?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:123 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:125 def base_column(node, first_argument); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:143 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:145 def enforce_hash_argument_with_separator?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:115 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:117 def fixed_indentation?; end # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:71 def flattened_arguments(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:111 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:113 def message(_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:100 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:102 def multiple_arguments?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:134 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:136 def target_method_lineno(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:119 + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:121 def with_first_argument_style?; end end @@ -8753,13 +8754,13 @@ class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:61 def autocorrect(corrector, comment); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:88 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:91 def autocorrect_one(corrector, comment); end - # Corrects all comment lines that occur immediately before the given - # comment and have the same indentation. This is to avoid a long chain - # of correcting, saving the file, parsing and inspecting again, and - # then correcting one more line, and so on. + # Corrects all preceding comment lines that have the same indentation + # and are separated from the given comment by nothing but blank lines. + # This is to avoid a long chain of correcting, saving the file, parsing + # and inspecting again, and then correcting one more line, and so on. # # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:71 def autocorrect_preceding_comments(corrector, comment); end @@ -8769,13 +8770,13 @@ class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base # keeps the regular method indentation, so a comment above it must not be pushed # one level deeper. # - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:165 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:168 def bare_access_modifier?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:92 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:95 def check(comment, comment_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:145 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:148 def correct_indentation(next_line); end # Returns true if: @@ -8783,25 +8784,25 @@ class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base # b) the currently inspected comment is aligned with the nearest preceding end-of-line # comment. # - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:121 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:124 def correctly_aligned_with_preceding_comment?(comment_index, column); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:156 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:159 def less_indented?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:140 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:143 def line_after_comment(comment); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:131 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:134 def message(column, correct_comment_indentation); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:135 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:138 def own_line_comment?(comment); end # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:82 def should_correct?(preceding_comment, reference_comment); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:169 + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:172 def two_alternatives?(line); end end @@ -9036,7 +9037,7 @@ class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:71 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:100 + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:101 def base_for_method_definition(node); end # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:80 @@ -9045,10 +9046,10 @@ class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:89 def base_range_of_rescue(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:125 + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:126 def check_alignment(base_range, else_range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:109 + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:110 def check_assignment(node, rhs); end # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:75 @@ -11207,38 +11208,41 @@ class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:91 def on_array(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:104 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:105 def on_csend(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:97 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:98 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:108 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:121 def autocorrect(corrector, node); end + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:109 + def autocorrect_incompatible_with_other_cops?(array_node, left_parenthesis); end + # Returns the description of what the correct indentation is based on. # - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:146 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:159 def base_description(indent_base_type); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:112 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:125 def brace_alignment_style; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:116 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:129 def check(array_node, left_parenthesis); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:130 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:143 def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:182 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:195 def enforce_first_argument_with_fixed_indentation?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:159 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:172 def message(base_description); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:167 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:180 def message_for_right_bracket(indent_base_type); end end @@ -11753,26 +11757,32 @@ class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:53 def on_def(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:59 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:60 def on_defs(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:63 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:69 def autocorrect(corrector, node); end + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:64 + def autocorrect_incompatible_with_other_cops?(node); end + # Returns the description of what the correct indentation is based on. # - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:83 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:89 def base_description(_); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:67 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:73 def brace_alignment_style; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:71 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:77 def check(def_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:91 + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:105 + def enforce_parameter_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:97 def message(base_description); end end @@ -11989,7 +11999,7 @@ class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:264 def add_offenses; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:370 + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:371 def adjust(corrector, delta, range); end # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:299 @@ -12014,6 +12024,9 @@ class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base def check_pairs(node); end # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:336 + def clamped_key_delta(key_delta, key); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:340 def correct_key_value(corrector, delta, key, value, separator); end # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:332 @@ -12022,16 +12035,16 @@ class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:317 def correct_node(corrector, node, delta); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:383 + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:384 def enforce_first_argument_with_fixed_indentation?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:379 + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:380 def good_alignment?(column_deltas); end # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:290 def ignore_hash_argument?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:352 + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:353 def new_alignment(key); end # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:272 @@ -12040,7 +12053,7 @@ class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:240 def reset!; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:388 + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:389 def same_line?(node1, node2); end end @@ -13454,7 +13467,7 @@ class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:93 def on_hash(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:112 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:117 def on_investigation_end; end # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:79 @@ -13477,46 +13490,49 @@ class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:400 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:418 def allow_string_split?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:463 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:481 def allowed_combination?(line, uri_range, qualified_name_range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:396 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:414 def allowed_heredoc; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:352 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:370 def allowed_line?(line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:254 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:259 def breakable_block_range(block_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:475 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:493 def breakable_dstr?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:303 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:321 def breakable_dstr_begin_position(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:120 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:125 def breakable_range; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:120 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:125 def breakable_range=(_arg0); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:262 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:267 def breakable_range_after_semicolon(semicolon_token); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:308 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:326 def breakable_range_by_line_index; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:245 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:308 + def breakable_space_position(node, substr); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:250 def breakable_string?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:316 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:334 def breakable_string_delimiters; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:275 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:280 def breakable_string_position(node); end # Locate where to break a string that is too long, ensuring that escape characters @@ -13524,96 +13540,99 @@ class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base # If the string contains spaces, use them to determine a place for a clean break; # otherwise, the string will be broken at the line length limit. # - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:287 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:292 def breakable_string_range(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:430 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:448 def check_directive_line(line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:207 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:212 def check_for_breakable_block(block_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:235 def check_for_breakable_dstr(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:186 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:191 def check_for_breakable_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:199 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:204 def check_for_breakable_semicolons(processed_source); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:218 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:223 def check_for_breakable_str(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:332 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:350 def check_line(line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:447 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:465 def check_line_for_exemptions(line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:174 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:179 def correct_endless_method_block_to_multiline(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:164 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:169 def correctable_endless_method_block?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:312 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:330 def endless_methods_by_line; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:380 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:398 def excess_range(uri_range, line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:404 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:422 def extract_heredocs(ast); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:127 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:132 def handle_endless_method_line(line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:320 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:338 def heredocs; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:324 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:342 def highlight_start(line); end # Find the largest possible substring of a string node to retain before a break # - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:491 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:509 def largest_possible_string(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:414 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:432 def line_in_permitted_heredoc?(line_number); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:391 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:409 def max; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:394 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:412 def max_line_length; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:457 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:475 def range_if_applicable(line, type); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:423 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:441 def receiver_contains_heredoc?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:140 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:145 def register_endless_method_offense(line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:362 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:380 def register_offense(loc, line, line_index, length: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:151 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:156 def register_required_endless_method_offense(line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:135 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:140 def require_endless_methods?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:358 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:376 def shebang?(line, line_index); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:480 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:315 + def string_content_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:498 def string_delimiter(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:122 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:127 def track_endless_method(node); end end @@ -15365,7 +15384,8 @@ end # Checks the spacing inside and after block parameters pipes. Line breaks # inside parameter pipes are checked by `Layout/MultilineBlockLayout` and -# not by this cop. +# not by this cop. Spaces inside a lambda's parameter parentheses are left +# to `Layout/SpaceInsideParens` when that cop enforces a conflicting style. # # @example EnforcedStyleInsidePipes: no_space (default) # # bad @@ -15385,57 +15405,60 @@ end # {}.each { | x, y | puts x } # ->( x, y ) { puts x } # -# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:27 +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:28 class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:32 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:33 def on_block(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:65 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:76 def check_after_closing_pipe(arguments); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:125 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:136 def check_arg(arg); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:103 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:114 def check_closing_pipe_space(arguments, closing_pipe); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:121 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:132 def check_each_arg(args); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:56 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:67 def check_inside_pipes(arguments); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:150 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:161 def check_no_space(space_begin_pos, space_end_pos, msg); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:73 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:84 def check_no_space_style_inside_pipes(arguments); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:92 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:103 def check_opening_pipe_space(arguments, opening_pipe); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:136 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:147 def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:85 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:96 def check_space_style_inside_pipes(arguments); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:113 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:57 + def conflicting_space_inside_parens_style?(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:124 def last_end_pos_inside_pipes(arguments, range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:44 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:45 def pipes(arguments); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:48 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:49 def pipes?(arguments); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:52 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:53 def style_parameter_name; end end @@ -15909,7 +15932,7 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:277 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:281 def align_hash_cop_config; end # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:212 @@ -15924,13 +15947,16 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:257 def excess_leading_space?(type, operator, with_space); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:272 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:276 def excess_trailing_space?(right_operand, with_space); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:298 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:302 def force_equal_sign_alignment?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:281 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:272 + def grouped_alignment_type?(type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:285 def hash_table_style?; end # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:207 @@ -15945,13 +15971,13 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:183 def regular_operator?(send_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:302 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:306 def should_not_have_surrounding_space?(operator, right_operand); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:288 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:292 def space_around_exponent_operator?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:292 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:296 def space_around_slash_operator?(right_operand); end class << self @@ -17775,7 +17801,9 @@ RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) # # Constructor calls (`Foo.new`) and keyword-argument validation are out of # scope: only positional arity of explicitly defined singleton methods is -# checked. +# checked. `new` is skipped outright, because `Class#new` is not in the +# index: any `new` the index does find sits below it in the method +# resolution order, where Ruby would never reach it. # # @example # # Given the project defines: @@ -17792,33 +17820,42 @@ RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) # # good # Report.generate(source, :pdf) # -# pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:41 +# pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:43 class RuboCop::Cop::Lint::ArgumentMismatch < ::RuboCop::Cop::Base include ::RuboCop::Cop::ProjectIndexHelp include ::RuboCop::Cop::IndexedMethodArity - # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:60 + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:61 def on_csend(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:47 + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:49 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:64 + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:65 + def checkable_call?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:69 def message(node, given, min, max); end # `[min, max, has_keywords]` for the called singleton method, or nil when # the receiver or its ancestry is not resolved. # - # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:70 + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:75 def resolved_signature_shape(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:80 + # A call with an explicit receiver cannot reach a private method, so its + # signature says nothing about the call. This matters because `Object` + # closes the singleton ancestry of every constant, and a bare `def` at + # the top level of any file — what every block-based DSL produces — is a + # private instance method of `Object`. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:90 def singleton_signature_shape(declaration, method_name); end end -# pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:45 +# pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:47 RuboCop::Cop::Lint::ArgumentMismatch::MSG = T.let(T.unsafe(nil), String) # Checks for an array literal interpolated inside a regexp. @@ -18576,7 +18613,7 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # # # good # -# # bad +# # bad - only the first directive takes effect # # # good # @@ -18597,66 +18634,113 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # # # good # -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:57 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:54 class RuboCop::Cop::Lint::CopDirectiveSyntax < ::RuboCop::Cop::Base - # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:77 + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:80 def on_new_investigation; end private - # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:91 + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:94 def check_directive(comment, directive_comment); end - # An EOL `disable-next` is not honored - it must fail loudly instead - # of silently doing nothing. + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:224 + def directive_names(directive_comment); end + + # Anything written between the directives is a `--` reason or prose, + # and merging around it would either move it or drop it. # - # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:103 - def misplaced_next_directive?(directive_comment); end + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:144 + def directives_adjacent?(comment, directives); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:120 + def filter_reason_matches(matches, directive_comment); end # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:126 + def merge_directives(corrector, comment, directives); end + + # `all` covers every cop already, so folding it into a list of names + # would be a rewrite rather than a merge. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:136 + def merged_cops(directives); end + + # `todo` is an alias of `disable`, so those two combine. Anything else + # (an `enable` beside a `disable`, or directives of different scopes) + # means different things per directive and can't be folded into one. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:154 + def merged_mode(directives); end + + # An EOL next-statement directive is not honored - it must fail + # loudly instead of silently doing nothing. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:164 + def misplaced_next_directive?(directive_comment); end + + # Everything after the first directive in a comment is trailing text as + # far as the parser is concerned, so a second directive written on the + # same line disables nothing at all. A valid `--` reason may mention a + # directive as plain text, which should not be treated as another one. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:112 + def multiple_directives(comment, directive_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:194 def near_miss_keyword(comment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:109 + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:169 + def next_statement_directive?(directive_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:175 def offense_message(directive_comment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:136 + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:204 def similar_to_rubocop?(keyword); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:156 + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:232 def unknown_cop_message(directive_comment, name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:144 + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:212 def unknown_cop_name(directive_comment); end end -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:58 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:57 RuboCop::Cop::Lint::CopDirectiveSyntax::COMMON_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:67 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:70 RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_KEYWORD_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:61 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:60 RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_MODE_NAME_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:63 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:66 +RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_SIGNED_ARGS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:64 RuboCop::Cop::Lint::CopDirectiveSyntax::MALFORMED_COP_NAMES_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:62 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:61 RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_COP_NAME_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:60 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:59 RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_MODE_NAME_MSG = T.let(T.unsafe(nil), String) +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:62 +RuboCop::Cop::Lint::CopDirectiveSyntax::MULTIPLE_DIRECTIVES_MSG = T.let(T.unsafe(nil), String) + # A comment that looks like an attempted directive: any keyword # followed by a colon and a valid mode name. # -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:72 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:75 RuboCop::Cop::Lint::CopDirectiveSyntax::NEAR_MISS_KEYWORD_REGEXP = T.let(T.unsafe(nil), Regexp) -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:65 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:68 RuboCop::Cop::Lint::CopDirectiveSyntax::NEXT_DIRECTIVE_AT_EOL_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:68 +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:71 RuboCop::Cop::Lint::CopDirectiveSyntax::UNKNOWN_COP_MSG = T.let(T.unsafe(nil), String) # Checks unexpected overrides of the `Data` built-in methods @@ -21867,34 +21951,37 @@ class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:187 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:193 def basic_literal?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:219 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:225 def check_case(case_node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:178 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:184 def check_for_literal(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:199 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:205 def check_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:228 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:234 def condition(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:243 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:249 def condition_evaluation?(node, cond); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:252 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:258 def correct_if_node(node, cond); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:209 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:215 def handle_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:195 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:201 def primitive_array?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:236 + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:178 + def void_value_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:242 def when_conditions_range(when_node); end end @@ -22114,6 +22201,120 @@ end # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:47 RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) +# Checks for magic comments placed where Ruby silently ignores them. +# +# The `encoding` magic comment is only honored on the first line of a file, +# or on the second line when the first line is a shebang. Anywhere else it +# is silently ignored - even directly below another comment or a blank line. +# +# Other magic comments (such as `frozen_string_literal`) are honored +# anywhere before the first token of code, but are ignored after any code, +# with a warning emitted only when running Ruby with `-w`. +# +# A magic comment misplaced ahead of a shebang also renders the shebang +# ineffective, since a shebang is only recognized on the first line. +# +# NOTE: An `encoding` comment that is only preceded by other magic +# comments is not flagged by this cop; that case is handled by +# `Lint/OrderedMagicComments`. `shareable_constant_value` is never +# flagged, as Ruby intentionally allows it mid-file with block scoping. +# +# @safety +# This cop's autocorrection is unsafe because moving the magic comment +# to its effective position activates it, which changes runtime +# behavior (e.g. the source encoding or string mutability). +# +# @example +# # bad +# # Documentation comment +# puts 'hello' +# +# # good +# # Documentation comment +# puts 'hello' +# +# # bad +# require 'foo' +# +# # good +# require 'foo' +# +# # bad +# #!/usr/bin/env ruby +# puts 'hello' +# +# # good +# #!/usr/bin/env ruby +# puts 'hello' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:57 +class RuboCop::Cop::Lint::MisplacedMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:66 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:75 + def check_comment(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:122 + def check_encoding_comment(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:144 + def check_magic_comment_above_shebang; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:134 + def check_top_block_comment(comment, directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:164 + def comment_starts_line?(comment); end + + # First line that may carry an effective encoding comment. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:114 + def effective_encoding_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:118 + def first_code_token; end + + # Prose that happens to open with `Encoding:` parses as an encoding + # comment (`# Encoding: force given encoding` yields `force`). Ruby + # ignores a misplaced encoding comment entirely, so a name no encoding + # answers to means the line is a comment, not a directive. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:102 + def known_encoding?(name); end + + # The Emacs and Vim regexps in `MagicComment` match anywhere inside a + # comment, which would flag documentation that merely quotes a magic + # comment (e.g. `# # -*- coding: UTF-8 -*-`). Require the magic + # comment to start right after the `#`. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:94 + def magic_comment_shaped?(text); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:168 + def move_comment(corrector, comment, target_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:157 + def preceded_only_by_magic_comments?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:109 + def shebang?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:64 +RuboCop::Cop::Lint::MisplacedMagicComment::MSG_ABOVE_SHEBANG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:63 +RuboCop::Cop::Lint::MisplacedMagicComment::MSG_AFTER_CODE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:61 +RuboCop::Cop::Lint::MisplacedMagicComment::MSG_ENCODING = T.let(T.unsafe(nil), String) + # cop disables on wide ranges of code, that later contributors to # a file wouldn't be aware of. # @@ -23666,19 +23867,28 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:56 + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:72 def chained_calls?(node); end # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:52 def compound_range?(first_arg); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:71 + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:56 + def invalid_bare_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:63 + def keyword_operator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:68 + def modifier_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:87 def space_range(expr, space_length); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:65 + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:81 def spaces_before_left_parenthesis(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:61 + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:77 def ternary_expression?(node); end # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:39 @@ -23935,28 +24145,28 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:420 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:434 def add_department_marker(department); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:321 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:335 def add_offense_for_cop_in_list(cop, range, ranges); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:282 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:294 def add_offense_for_entire_comment(comment, cops); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:311 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:325 def add_offense_for_some_cops(comment, cops); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:272 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:284 def add_offenses(redundant_cops); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:403 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:417 def all_cop_names; end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:243 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:255 def all_disabled?(comment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:330 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:344 def any_unknown_cop?(cops); end # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:69 @@ -23965,16 +24175,16 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:57 def cop_disabled_line_ranges; end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:352 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:366 def cop_range(comment, cop); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:263 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:275 def department_disabled?(cop, comment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:412 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:426 def department_marker?(department); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:390 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:404 def describe(cop); end # A range opened by a `disable-next` directive starts at the statement, @@ -23983,7 +24193,7 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:150 def directive_comment(line_range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:268 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:280 def directive_count(comment); end # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:92 @@ -23992,13 +24202,14 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:61 def disabled_ranges; end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:182 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:194 def each_already_disabled(cop, line_ranges); end - # A `disable-next` with no statement attached (or misplaced at the end - # of a code line) suppresses nothing, so it is redundant by definition. + # A next-statement directive with no statement attached (or misplaced + # at the end of a code line) affects nothing, so it is redundant by + # definition. # - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:160 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:161 def each_detached_next_directive; end # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:131 @@ -24007,40 +24218,40 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:106 def each_redundant_disable(&block); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:407 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:421 def ends_its_line?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:255 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:267 def expected_final_disable?(cop, line_range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:215 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:227 def find_redundant_all(range, next_range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:210 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:222 def find_redundant_cop(cop, range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:225 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:237 def find_redundant_department(cop, range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:171 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:183 def find_redundant_directive(cop, comment, line_range, next_range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:231 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:243 def followed_ranges?(range, next_range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:247 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:259 def ignore_offense?(line_range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:346 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:360 def leave_free_comment?(comment, range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:359 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:373 def matching_range(haystack, needle); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:399 - def message(cop_names); end + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:413 + def message(cop_names, enabling: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:334 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:348 def misplaced_next_directive?(comment); end # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:120 @@ -24049,25 +24260,25 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:65 def previous_line_blank?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:235 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:247 def range_with_offense?(range, offenses = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:416 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:430 def remove_department_marker(department); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:299 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:313 def remove_entire_comment(corrector, comment); end # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:144 def should_skip_line_range?(cop, line_range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:166 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:172 def skip_directive?(comment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:370 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:384 def trailing_range?(ranges, range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:340 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:354 def unknown_cop?(cop); end end @@ -24077,7 +24288,7 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil) # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:33 RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:378 +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:392 RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) # removed. @@ -29108,7 +29319,7 @@ RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Utility classes for `Lint` department cops. # -# pkg:gem/rubocop#lib/rubocop/cop/lint.rb:173 +# pkg:gem/rubocop#lib/rubocop/cop/lint.rb:174 module RuboCop::Cop::Lint::Utils; end # Utility class that checks if the receiver can't be nil. @@ -31135,43 +31346,43 @@ class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:68 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:71 def on_def(node); end - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:87 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:90 def on_defs(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:118 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:121 def anonymous_block_argument?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:101 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:104 def block_argument_name_matched?(block_pass_node, last_argument); end - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:150 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:153 def block_forwarding_name; end - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:91 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:94 def expected_block_forwarding_style?(node, last_argument); end - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:122 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:125 def explicit_block_argument?(node); end # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 # We disallow this also for earlier Ruby versions so that code is forwards compatible. # - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:110 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:113 def invalidates_syntax?(block_pass_node); end - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:126 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:129 def register_offense(block_argument, node); end - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:142 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:145 def use_block_argument_as_local_variable?(node, last_argument); end - # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:114 + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:117 def use_kwarg_in_method_definition?(node); end class << self @@ -33597,10 +33808,10 @@ module RuboCop::Cop::PrecedingFollowingAlignment # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:102 def aligned_words?(range, line); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:197 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:208 def alignment_line_ranges(line_number); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:188 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:199 def alignment_lines(line_number); end # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:15 @@ -33612,16 +33823,19 @@ module RuboCop::Cop::PrecedingFollowingAlignment # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:164 def assignment_tokens; end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:210 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:221 def definition_boundary_lines; end + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:190 + def interrupting_operator_lines; end + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:184 def relevant_assignment_lines(line_range); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:220 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:231 def relevant_lines(line_range, boundary_lines = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:249 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:260 def remove_equals_in_def(asgn_tokens, processed_source); end end @@ -33903,7 +34117,7 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:51 def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:298 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:304 def ==(other); end # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:138 @@ -33912,7 +34126,7 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:230 def cops; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:288 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:294 def cops_for_department(department); end # @return [Boolean] Checks if given name is department @@ -33942,7 +34156,7 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:90 def dismiss(cop); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:314 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:320 def each(&block); end # Returns the enabled cop classes, loading lazy-loaded cops only when they are enabled. @@ -33960,6 +34174,12 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:273 def enabled_pending_cop?(cop_cfg, config, cop = T.unsafe(nil)); end + # Preview cops are opt-in and stay silent otherwise, so unlike pending cops + # they are never reported as needing a decision. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:285 + def enabled_preview_cop?(cop_cfg, config); end + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:86 def enlist(cop); end @@ -33975,17 +34195,17 @@ class RuboCop::Cop::Registry # @param [String] cop_name # @return [Class, nil] # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:320 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:326 def find_by_cop_name(cop_name); end # When a cop name is given returns a single-element array with the cop class. # When a department name is given returns an array with all the cop classes # for that department. # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:331 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:337 def find_cops_by_directive(directive); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:351 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:357 def freeze; end # Registers a cop by its badge and constant name without loading the class. @@ -34007,13 +34227,13 @@ class RuboCop::Cop::Registry # # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:341 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:347 def load_all_lazy_cops; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:283 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:289 def names; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:292 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:298 def names_for_department(department); end # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:49 @@ -34064,10 +34284,10 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:186 def resolve_cop_name(badge, name, path, warn); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:310 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:316 def select(&block); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:302 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:308 def sort!; end # @return [Hash{String => Array}] @@ -34081,7 +34301,7 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:49 def warnings; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:372 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:378 def warnings?(path); end # @return [Registry] Cops for that specific department. @@ -34099,43 +34319,43 @@ class RuboCop::Cop::Registry # Adds an already-loaded cop class or a lazy-load constant name under the given badge, # used to build filtered copies. # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:380 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:386 def add_entry(badge, cop_or_name); end private - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:399 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:405 def clear_enrollment_queue; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:465 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:473 def emit_warning(path, message); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:416 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:422 def enabled_cop_name?(cop_name, config); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:387 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:393 def initialize_copy(reg); end # @return [Class, nil] the loaded cop class, or nil if the cop excluded # itself from the registry while being loaded # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:434 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:442 def load_lazy_cop(badge); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:470 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:478 def registered?(badge); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:411 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:417 def registered_badges; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:455 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:463 def resolve_badge(given_badge, real_badge, source_path, warn: T.unsafe(nil)); end class << self # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:22 def all; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:369 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:375 def global; end # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:44 @@ -34713,22 +34933,22 @@ class RuboCop::Cop::Severity # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:30 + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:42 def initialize(name_or_code); end - # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:62 + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:74 def <=>(other); end - # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:50 + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:62 def ==(other); end - # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:42 + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:54 def code; end - # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:58 + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:70 def hash; end - # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:46 + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:58 def level; end # @api public @@ -34742,11 +34962,19 @@ class RuboCop::Cop::Severity # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:22 def name; end - # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:38 + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:50 def to_s; end class << self - # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:24 + # The lowest severity that makes a run fail: `--fail-level` when given, + # otherwise `AllCops: FailLevel`. `autocorrect` is a pseudo level on the + # command line that gates on corrections instead, so it leaves the + # threshold at the configured one. + # + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:28 + def minimum_to_fail(options, config); end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:36 def name_from_code(code); end end end @@ -35163,7 +35391,7 @@ class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:248 def correctable_group_offense?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:367 + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:368 def def_source(node, def_nodes); end # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:310 @@ -35172,7 +35400,7 @@ class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:291 def find_corresponding_def_nodes(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:358 + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:359 def first_comment_or_node_start(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:255 @@ -39244,6 +39472,10 @@ RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) # Autocorrection is unsafe because it will change the inheritance # tree (e.g. return value of `Module#ancestors`) of the constant. # +# It is also unsafe because constants that the class body resolves through its +# ancestors (e.g. one provided by an included module) fall out of scope inside +# the block. +# # @example # # bad # class Person < Data.define(:first_name, :last_name) @@ -39265,28 +39497,35 @@ RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) # Person.ancestors # # => [Person, Data, (...)] # -# pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:33 +# pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:37 class RuboCop::Cop::Style::DataInheritance < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:55 + # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:60 def data_define?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:43 + # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:47 def on_class(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:62 + # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:76 def correct_parent(parent, corrector); end - # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:76 + # Constants, including nested classes and modules, are scoped to the class when they + # are defined in a class body, but leak into the enclosing namespace once moved into a + # `Data.define` block, so such a class cannot be rewritten as an assignment. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:70 + def defines_constants?(class_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:90 def range_for_empty_class_body(class_node, data_define); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:38 +# pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:42 RuboCop::Cop::Style::DataInheritance::MSG = T.let(T.unsafe(nil), String) # Checks for consistent usage of the `Time` class over the @@ -39547,10 +39786,10 @@ RuboCop::Cop::Style::DirEmpty::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::DirEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for directive scopes that can be expressed with the tighter -# `disable-next` form: a `disable`/`enable` pair wrapping exactly one -# statement, or a `push`/`pop` that only disables cops around exactly -# one statement. A statement-scoped directive cannot drift as the -# surrounding code changes and needs no closing boundary. +# next-statement forms: a `disable`/`enable` pair, an +# `enable`/`disable` pair, or a `push`/`pop` with signed arguments +# wrapping exactly one statement. A statement-scoped directive cannot +# drift as the surrounding code changes and needs no closing boundary. # # @safety # The autocorrection is unsafe because the suppression scope shrinks @@ -39574,6 +39813,14 @@ RuboCop::Cop::Style::DirEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # def foo # end # +# # bad +# def foo +# end +# +# # good +# def foo +# end +# # # good - the region spans more than one statement # def foo # end @@ -39581,55 +39828,103 @@ RuboCop::Cop::Style::DirEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # def bar # end # -# pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:49 +# pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:64 class RuboCop::Cop::Style::DirectiveScope < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:57 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:74 def on_new_investigation; end private - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:84 + # The line of the `pop` balancing this `push`, taking nesting into + # account, or `nil` when the push is never popped. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:141 + def balancing_pop_line(push_directive); end + + # An `enable`/`disable` pair around one statement inside a disabled + # region re-enables the cops for just that statement - `enable-next` + # says the same without the closing boundary. The pair only counts + # when the `enable` really closed open disables (otherwise the + # trailing `disable` opens a new region and the conversion would + # change what is covered). + # + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:194 + def check_enable_pair(directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:107 def check_pair(directive); end - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:102 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:125 def check_push_pop(directive); end - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:72 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:237 + def closed_at?(ranges, line); end + + # Every cop of the pair must have a range the `enable` closed and a + # range the trailing `disable` reopened - otherwise the `enable` was + # not inside a disabled region and the conversion would change what + # is covered. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:230 + def closed_open_disables?(directive, closing); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:91 def comment_config; end - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:95 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:118 def convert_pair(corrector, directive, enable); end - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:158 - def disable_next_replacement(directive); end + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:155 + def each_directive_after(reference); end - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:80 - def disable_only_push?(directive); end + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:205 + def enable_pair_closing(directive); end - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:76 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:95 def plain_disable?(directive); end - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:139 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:99 + def plain_enable?(directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:175 + def push_replacement(directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:247 + def qualified_name(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:279 def ranges_opened_by(directive); end - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:165 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:213 + def re_disable_below(directive, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:298 def remove_line(corrector, comment); end + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:241 + def reopened_by?(ranges, closing); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:164 + def replacement_mode(directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:103 + def signed_push?(directive); end + # The single line on which every disabled range opened by this # directive ends, or `nil` when the ranges disagree or never close. # For a `disable` that is the `enable` line; for a `push` it is the # line before the `pop`. # - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:129 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:269 def single_closing_line(directive); end # The directive closing this one's scope, when that scope wraps # exactly one statement - `nil` otherwise. # - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:114 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:254 def single_statement_closing_directive(directive); end # The region wraps a single statement only when the directive sits @@ -39638,14 +39933,17 @@ class RuboCop::Cop::Style::DirectiveScope < ::RuboCop::Cop::Base # carry offenses of the suppressed cops that the tighter scope # would no longer cover. # - # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:152 + # pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:292 def wraps_single_statement?(directive, closing_line); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:53 +# pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:70 +RuboCop::Cop::Style::DirectiveScope::MSG_ENABLE_PAIR = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:68 RuboCop::Cop::Style::DirectiveScope::MSG_PAIR = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:55 +# pkg:gem/rubocop#lib/rubocop/cop/style/directive_scope.rb:72 RuboCop::Cop::Style::DirectiveScope::MSG_PUSH_POP = T.let(T.unsafe(nil), String) # Detects comments to enable/disable RuboCop. @@ -39654,6 +39952,10 @@ RuboCop::Cop::Style::DirectiveScope::MSG_PUSH_POP = T.let(T.unsafe(nil), String) # # Specific cops can be allowed with the `AllowedCops` configuration. Note that # +# `AllowedCops` and `DisallowedCops` accept cop names and department names +# alike. Listing a cop does not cover its whole department: a directive +# disabling `Metrics` is broader than one disabling `Metrics/AbcSize`. +# # Alternatively, specific cops can be disallowed with the `DisallowedCops` # configuration. When `DisallowedCops` is set, only directives for the listed # cops (and `all`) will be flagged. This is useful when you want @@ -39661,7 +39963,12 @@ RuboCop::Cop::Style::DirectiveScope::MSG_PUSH_POP = T.let(T.unsafe(nil), String) # allowlisting all other cops. `AllowedCops` and `DisallowedCops` should not # both be set at the same time; if `DisallowedCops` is set, it takes precedence. # -# With `AllowTrailingComment` set to `true`, a disable directive carrying +# `AllowedDirectives` names directive forms - `disable`, `todo`, +# `disable-next`, `todo-next`, `push`, `next` - and exempts them from the +# `--disable-uncorrectable` generates those and they record debt rather +# than a decision someone should be asked to justify. +# +# With `AllowWithReason` set to `true`, a disable directive carrying # a `--` trailing justification comment is allowed, so a team can require # every disable to be documented instead of banning them outright. Enable # directives are not checked in this mode, since they end a suppression @@ -39691,52 +39998,77 @@ RuboCop::Cop::Style::DirectiveScope::MSG_PUSH_POP = T.let(T.unsafe(nil), String) # # good # foo # -# @example AllowTrailingComment: true +# @example AllowedDirectives: [todo] +# # good - the cop does not look at `todo` directives at all +# +# # bad +# +# @example AllowedCops: [Metrics] +# # good - every cop the directive disables is in an exempt department +# def foo +# end +# +# @example AllowWithReason: true # # bad # # # good # -# pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:68 +# pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:92 class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:77 + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:101 def on_new_investigation; end private - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:133 - def allow_trailing_comment?; end + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:171 + def allow_with_reason?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:137 + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:175 def allowed_cops; end - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:141 + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:167 + def allowed_directives; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:185 def any_cops_allowed?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:93 + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:117 def compute_disallowed_cops(directive_cops); end - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:128 + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:152 def directive_cops(directive); end - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:145 + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:189 def disallowed_cops_config; end - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:118 + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:163 + def exempt_mode?(directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:157 + def ignored?(directive); end + + # A name matches either outright or through its department, so + # `Metrics` covers `Metrics/AbcSize` but not the other way round. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:181 + def listed?(names, cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:142 def offense_message(disallowed_cops); end - # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:105 + # pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:129 def register_offense(comment, directive_cops, disallowed_cops); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:72 +# pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:96 RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:73 +# pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:97 RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:74 +# pkg:gem/rubocop#lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb:98 RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_MISSING_REASON = T.let(T.unsafe(nil), String) # When using `class_eval` (or other `eval`) with string interpolation, @@ -40134,20 +40466,17 @@ class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:120 def on_def(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:126 + # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:127 def on_defs(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:150 + # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:142 def allowed_methods; end - # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:130 + # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:131 def check(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:142 - def method_allowed?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:138 def require_for_non_public_methods?; end end @@ -40155,30 +40484,6 @@ end # pkg:gem/rubocop#lib/rubocop/cop/style/documentation_method.rb:113 RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) -# Detects double disable comments on one line. This is mostly to catch -# automatically generated comments that need to be regenerated. -# -# @example -# # bad -# end -# -# # good -# end -# -# # if both fit on one line -# end -# -# pkg:gem/rubocop#lib/rubocop/cop/style/double_cop_disable_directive.rb:27 -class RuboCop::Cop::Style::DoubleCopDisableDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop#lib/rubocop/cop/style/double_cop_disable_directive.rb:34 - def on_new_investigation; end -end - -# pkg:gem/rubocop#lib/rubocop/cop/style/double_cop_disable_directive.rb:32 -RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), String) - # Checks for uses of double negation (`!!`) to convert something to a boolean value. # # When using `EnforcedStyle: allowed_in_returns`, allow double negation in contexts @@ -40987,25 +41292,31 @@ class RuboCop::Cop::Style::EmptyMethod < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:95 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:105 def compact?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:103 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:113 def compact_style?; end + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:77 + def compact_style_disallowed?; end + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:73 def correct_style?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:77 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:83 def corrected(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:99 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:95 + def correction_exceeds_line_length?(correction); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:109 def expanded?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:107 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:117 def expanded_style?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:89 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:99 def joint(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/empty_method.rb:69 @@ -41292,37 +41603,46 @@ class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:219 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:240 def arguments(node, missing = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:223 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:244 def can_be_made_endless?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:209 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:219 + def correct_to_endless(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:208 + def endless_parent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:230 def endless_replacement(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:164 def handle_allow_style(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:196 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:198 def handle_disallow_style(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:187 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:189 def handle_require_always_style(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:173 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:175 def handle_require_single_line_style(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:235 - def modifier_offset(node); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:215 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:236 def receiver(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:227 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:224 + def signature_to_body_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:248 + def single_line_when_made_endless?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:252 def too_long_when_made_endless?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:202 + # pkg:gem/rubocop#lib/rubocop/cop/style/endless_method.rb:212 def use_heredoc?(node); end end @@ -42458,10 +42778,7 @@ class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base def add_to_f_method(corrector, node); end # pkg:gem/rubocop#lib/rubocop/cop/style/float_division.rb:148 - def correct_from_slash_to_fdiv(corrector, node, receiver, argument); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/float_division.rb:159 - def extract_receiver_source(node); end + def correct_from_slash_to_fdiv(corrector, receiver, argument); end # pkg:gem/rubocop#lib/rubocop/cop/style/float_division.rb:135 def message(_node); end @@ -42532,15 +42849,18 @@ class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/for.rb:56 def on_for(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/for.rb:83 + # pkg:gem/rubocop#lib/rubocop/cop/style/for.rb:84 def on_itblock(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/for.rb:82 + # pkg:gem/rubocop#lib/rubocop/cop/style/for.rb:83 def on_numblock(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/for.rb:87 + # pkg:gem/rubocop#lib/rubocop/cop/style/for.rb:92 + def rescue_or_ensure_body?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/for.rb:88 def suspect_enumerable?(node); end end @@ -43208,79 +43528,84 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:121 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:125 def on_block(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:112 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:116 def on_def(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:119 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:123 def on_defs(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:129 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:133 def on_if(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:127 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:131 def on_itblock(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:126 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:130 def on_numblock(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:280 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:284 def accepted_form?(node, ending: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:290 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:294 def accepted_if?(node, ending); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:317 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:321 def allowed_consecutive_conditionals?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:270 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:274 def and_or_guard_clause?(guard_clause); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:301 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:305 def assigned_lvar_used_in_if_branch?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:200 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:204 def autocorrect(corrector, node, condition, replacement, guard); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:240 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:244 def autocorrect_heredoc_argument(corrector, node, heredoc_node, leave_branch, guard); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:149 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:153 def check_ending_body(body); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:160 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:164 def check_ending_if(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:170 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:174 def consecutive_conditionals?(parent, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:225 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:229 def find_heredoc_argument(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:262 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:266 def guard_clause_source(guard_clause); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:221 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:225 def heredoc?(argument); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:253 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:257 def range_of_branch_to_remove(node, guard); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:178 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:182 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:313 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:317 def remove_whole_lines(corrector, range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:275 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:279 def too_long_for_single_line?(node, example); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:284 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:288 def trivial?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:112 + def autocorrect_incompatible_with; end + end end # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:109 @@ -43807,7 +44132,7 @@ class RuboCop::Cop::Style::HashLookupMethod < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedReceivers extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:71 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:74 def on_csend(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:58 @@ -43815,16 +44140,16 @@ class RuboCop::Cop::Style::HashLookupMethod < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:90 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:93 def correct_brackets_to_fetch(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:84 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:87 def correct_fetch_to_brackets(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:75 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:78 def offense_for_brackets?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:80 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:83 def offense_for_fetch?(node); end end @@ -46060,10 +46385,10 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange def directives; end # pkg:gem/rubocop#lib/rubocop/cop/style/magic_comment_format.rb:116 - def loc(*_arg0, **_arg1, &_arg2); end + def loc(*, **, &); end # pkg:gem/rubocop#lib/rubocop/cop/style/magic_comment_format.rb:116 - def text(*_arg0, **_arg1, &_arg2); end + def text(*, **, &); end # A magic comment can contain one value (normal style) or # multiple directives (emacs style) @@ -49009,7 +49334,7 @@ class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/nested_modifier.rb:85 + # pkg:gem/rubocop#lib/rubocop/cop/style/nested_modifier.rb:86 def add_parentheses_to_method_arguments(send_node); end # pkg:gem/rubocop#lib/rubocop/cop/style/nested_modifier.rb:42 @@ -49030,8 +49355,8 @@ class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/nested_modifier.rb:61 def replacement_operator(keyword); end - # pkg:gem/rubocop#lib/rubocop/cop/style/nested_modifier.rb:94 - def requires_parens?(node); end + # pkg:gem/rubocop#lib/rubocop/cop/style/nested_modifier.rb:95 + def requires_parens?(node, negated); end # pkg:gem/rubocop#lib/rubocop/cop/style/nested_modifier.rb:71 def right_hand_operand(node, left_hand_keyword); end @@ -49343,18 +49668,30 @@ class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:40 def nil_comparison?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:46 + # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:45 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:67 + # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:61 + def autocorrect_to_comparison(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:69 + def autocorrect_to_predicate(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:95 def message(_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:79 + # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:81 + def operator_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:91 + def operator_send?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:107 def prefer_comparison?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:71 + # pkg:gem/rubocop#lib/rubocop/cop/style/nil_comparison.rb:99 def style_check?(node, &block); end end @@ -49489,13 +49826,13 @@ class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:93 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:123 + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:139 def autocorrect_comparison(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:131 + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:147 def autocorrect_non_nil(corrector, node, inner_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:139 + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:155 def autocorrect_unless_nil(corrector, node, receiver); end # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:119 @@ -49504,9 +49841,18 @@ class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:110 def message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:144 + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:160 def nil_comparison_style; end + # An operator-expression receiver (e.g. `a + b`) binds looser than the + # appended `.nil?`, so it must be parenthesized: `!(a + b).nil?`. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:125 + def non_nil_check_replacement(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:131 + def operator_expression?(node); end + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:88 def register_offense?(node); end @@ -49545,13 +49891,13 @@ class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/not.rb:62 + # pkg:gem/rubocop#lib/rubocop/cop/style/not.rb:64 def correct_opposite_method(corrector, range, child); end - # pkg:gem/rubocop#lib/rubocop/cop/style/not.rb:67 + # pkg:gem/rubocop#lib/rubocop/cop/style/not.rb:69 def correct_with_parens(corrector, range, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/not.rb:72 + # pkg:gem/rubocop#lib/rubocop/cop/style/not.rb:74 def correct_without_parens(corrector, range); end # pkg:gem/rubocop#lib/rubocop/cop/style/not.rb:52 @@ -49690,35 +50036,38 @@ class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:109 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:119 def format_binary(source); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:113 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:123 def format_decimal(source); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:105 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:115 def format_hex(source); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:97 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:107 def format_octal(source); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:101 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:111 def format_octal_zero_only(source); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:82 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:92 def hex_bin_dec_literal_type(literal); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:68 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:72 def literal_type(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:64 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:68 def message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:74 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:84 def octal_literal_type(literal); end - # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:93 + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:103 def octal_zero_only?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:78 + def unsigned_range(node); end end # pkg:gem/rubocop#lib/rubocop/cop/style/numeric_literal_prefix.rb:49 @@ -50787,7 +51136,7 @@ class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/parentheses_around_condition.rb:130 + # pkg:gem/rubocop#lib/rubocop/cop/style/parentheses_around_condition.rb:135 def allow_multiline_conditions?; end # pkg:gem/rubocop#lib/rubocop/cop/style/parentheses_around_condition.rb:118 @@ -50805,6 +51154,9 @@ class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/parentheses_around_condition.rb:96 def require_parentheses?(node, condition_body); end + # pkg:gem/rubocop#lib/rubocop/cop/style/parentheses_around_condition.rb:130 + def safe_assignment_kept?; end + # pkg:gem/rubocop#lib/rubocop/cop/style/parentheses_around_condition.rb:103 def semicolon_separated_expressions?(first_exp, rest_exps); end end @@ -52480,6 +52832,13 @@ class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb:106 def convert_to_new_arguments(node); end + # A braced hash literal passed to `merge` must have its braces stripped so + # its pairs join the surrounding keyword arguments. Keeping the braces would + # produce a positional hash after keyword arguments, which is invalid Ruby. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb:129 + def hash_argument_source(hash); end + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb:118 def mergeable?(node); end @@ -53574,7 +53933,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:32 def allowed_pin_operator?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:194 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:197 def interpolation?(param0 = T.unsafe(nil)); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:39 @@ -53594,7 +53953,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:220 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:223 def allow_in_multiline_conditions?; end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:86 @@ -53609,31 +53968,31 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:100 def allowed_ternary?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:251 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:254 def apply_reparse_correction(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:196 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:199 def argument_of_parenthesized_method_call?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:308 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:311 def body_range?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:224 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:227 def call_node?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:139 def check(begin_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:228 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:231 def check_send(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:238 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:241 def check_unary(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:300 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:303 def disallowed_literal?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:318 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:328 def disallowed_one_line_pattern_matching?(begin_node, node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:127 @@ -53648,19 +54007,26 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:132 def in_pattern_matching_in_method_argument?(begin_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:296 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:299 def keyword_ancestor?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:327 + # `and`/`or` keyword operators bind looser than the method-argument + # boundary, so `foo((x and y))` cannot drop its parentheses without + # becoming a syntax error (unlike `&&`/`||`). + # + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:324 + def keyword_logical_operator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:337 def keyword_with_redundant_parentheses?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:113 def like_method_argument_parentheses?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:214 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:217 def method_call_parentheses_required?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:340 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:350 def method_call_with_redundant_parentheses?(begin_node, node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:120 @@ -53673,31 +54039,31 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # z)` and `x && y && z` differ as trees but `&&` and `||` cannot be # redefined, so same-operator regrouping is semantically transparent). # - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:261 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:264 def normalize_reparsed_ast(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:247 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:250 def offense(node, msg); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:205 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:208 def oneline_rescue_parentheses_required?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:355 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:365 def only_begin_arg?(args); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:64 def parens_allowed?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:281 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:284 def rotate_same_operator(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:348 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:358 def singular_parenthesized_parent?(begin_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:275 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:278 def splice_nested_sequences(children); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:292 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:295 def suspect_unary?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:106 @@ -53887,6 +54253,9 @@ class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base private + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_regexp_character_class.rb:107 + def backreference_requiring_char_class?(elem); end + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_regexp_character_class.rb:101 def backslash_b?(elem); end @@ -53899,13 +54268,10 @@ class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_regexp_character_class.rb:83 def multiple_codepoints?(expression); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_regexp_character_class.rb:107 - def octal_requiring_char_class?(elem); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_regexp_character_class.rb:72 def redundant_single_element_character_class?(node, char_class); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_regexp_character_class.rb:113 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_regexp_character_class.rb:114 def requires_escape_outside_char_class?(elem); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_regexp_character_class.rb:95 @@ -57717,6 +58083,10 @@ RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Autocorrection is unsafe because it will change the inheritance # tree (e.g. return value of `Module#ancestors`) of the constant. # +# It is also unsafe because constants that the class body resolves through its +# ancestors (e.g. one provided by an included module) fall out of scope inside +# the block. +# # @example # # bad # class Person < Struct.new(:first_name, :last_name) @@ -57738,33 +58108,40 @@ RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Person.ancestors # # => [Person, Struct, (...)] # -# pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:33 +# pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:37 class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:40 + # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:44 def on_class(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:54 + # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:59 def struct_constructor?(param0 = T.unsafe(nil)); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:61 + # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:75 def correct_parent(parent, corrector); end - # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:73 + # Constants, including nested classes and modules, are scoped to the class when they + # are defined in a class body, but leak into the enclosing namespace once moved into a + # `Struct.new` block, so such a class cannot be rewritten as an assignment. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:69 + def defines_constants?(class_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:87 def range_for_empty_class_body(class_node, struct_new); end - # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:81 + # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:95 def unparenthesized_struct_new?(parent); end - # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:85 + # pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:99 def wrap_unparenthesized_call_with_do(corrector, parent); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:37 +# pkg:gem/rubocop#lib/rubocop/cop/style/struct_inheritance.rb:41 RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) # Checks for redundant argument forwarding when calling super with arguments identical to @@ -62235,164 +62612,184 @@ RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set) # # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:7 class RuboCop::DirectiveComment - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:58 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:61 def initialize(comment, cop_registry = T.unsafe(nil)); end # Checks if all cops specified in this directive # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:182 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:207 def all_cops?; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:56 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:59 def comment; end # Returns array of specified in this directive cop names # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:187 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:212 def cop_names; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:56 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:59 def cop_registry; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:56 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:59 def cops; end # Returns array of specified in this directive department names # when all department disabled # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:198 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:223 def department_names; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:212 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:237 def directive_count; end # Checks if this directive disables cops for the next statement only # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:147 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:160 def disable_next?; end # Checks if this directive disables cops # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:142 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:155 def disabled?; end # Checks if this directive disables all cops # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:177 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:202 def disabled_all?; end + # Checks if this directive enables cops for the next statement only + # + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:170 + def enable_next?; end + # Checks if this directive enables cops # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:152 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:165 def enabled?; end # Checks if this directive enables all cops # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:172 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:197 def enabled_all?; end # Checks if directive departments include cop # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:203 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:228 def in_directive_department?(cop); end + # `push` and `next` arguments must be `+`/`-` prefixed cop names, and + # `pop` takes no arguments at all. + # + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:92 + def invalid_signed_args?; end + # Returns line number for directive # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:217 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:244 def line_number; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:72 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:75 def malformed?; end # Checks if this directive contains all the given cop names # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:105 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:118 def match?(cop_names); end # Returns match captures to directive comment pattern # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:131 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:144 def match_captures; end # Checks if the directive comment is missing a cop name # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:81 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:84 def missing_cop_name?; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:56 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:59 def mode; end + # Checks if this directive toggles cops for the next statement only + # + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:185 + def next?; end + # Checks if cop department has already used in directive comment # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:208 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:233 def overridden_by_department?(cop); end # Checks if this directive is a pop # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:162 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:180 def pop?; end # Checks if this directive is a push # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:157 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:175 def push?; end - # Returns the push arguments as a hash of cop names with their operations - # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:167 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:194 def push_args; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:109 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:122 def range; end # `#range` stops at the cop list, so a `--` reason sits outside it. The reason documents the # directive and means nothing once the directive is gone, so removal has to cover both. Any # other trailing text is an ordinary comment and is left alone. # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:120 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:133 def range_with_reason; end # Returns an array of cops for this directive comment, without resolving departments # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:192 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:217 def raw_cop_names; end # The text of the directive's optional `--` trailing comment, or `nil` # when there is none. # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:89 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:102 def reason; end + # Returns the `+`/`-` arguments of a `push` or `next` directive as a hash + # of operations to cop names + # + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:191 + def signed_args; end + # Checks if this directive relates to single line # - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:100 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:113 def single_line?; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:67 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:70 def start_with_marker?; end private - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:234 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:261 def all_cop_names; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:238 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:265 def cop_names_for_department(department); end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:230 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:257 def department?(name); end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:243 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:270 def exclude_lint_department_cops(cops); end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:247 - def parse_push_args; end + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:274 + def parse_signed_args; end - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:223 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:250 def parsed_cop_names; end class << self - # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:52 + # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:55 def before_comment(line); end end end @@ -62429,22 +62826,22 @@ RuboCop::DirectiveComment::COP_NAME_PATTERN_NC = T.let(T.unsafe(nil), String) # @api private # -# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:41 +# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:42 RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) # @api private # -# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:39 +# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:40 RuboCop::DirectiveComment::DIRECTIVE_HEADER_PATTERN = T.let(T.unsafe(nil), String) # @api private # -# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:35 +# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:36 RuboCop::DirectiveComment::DIRECTIVE_MARKER_PATTERN = T.let(T.unsafe(nil), String) # @api private # -# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:37 +# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:38 RuboCop::DirectiveComment::DIRECTIVE_MARKER_REGEXP = T.let(T.unsafe(nil), Regexp) # @api private @@ -62464,14 +62861,14 @@ RuboCop::DirectiveComment::LINT_SYNTAX_COP = T.let(T.unsafe(nil), String) # @api private # -# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:48 +# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:51 RuboCop::DirectiveComment::MALFORMED_DIRECTIVE_WITHOUT_COP_NAME_REGEXP = T.let(T.unsafe(nil), Regexp) # @api private # Longest first, so a `-next` mode is not matched as its prefix # (`-` is a word boundary). # -# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:33 +# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:34 RuboCop::DirectiveComment::MODES_PATTERN = T.let(T.unsafe(nil), String) # @api private @@ -62479,6 +62876,11 @@ RuboCop::DirectiveComment::MODES_PATTERN = T.let(T.unsafe(nil), String) # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:27 RuboCop::DirectiveComment::PUSH_POP_ARGS_PATTERN = T.let(T.unsafe(nil), String) +# @api private +# +# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:47 +RuboCop::DirectiveComment::SIGNED_OPERATIONS = T.let(T.unsafe(nil), Array) + # @api private # # pkg:gem/rubocop#lib/rubocop/directive_comment.rb:15 @@ -62486,7 +62888,7 @@ RuboCop::DirectiveComment::STYLE_DISABLE_COPS_DIRECTIVE_COP = T.let(T.unsafe(nil # @api private # -# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:46 +# pkg:gem/rubocop#lib/rubocop/directive_comment.rb:49 RuboCop::DirectiveComment::TRAILING_COMMENT_MARKER = T.let(T.unsafe(nil), String) # An Error exception is different from an Offense with severity 'error' @@ -62609,7 +63011,7 @@ end # pkg:gem/rubocop#lib/rubocop/ext/regexp_node.rb:6 module RuboCop::Ext::RegexpNode # pkg:gem/rubocop#lib/rubocop/ext/regexp_node.rb:18 - def assign_properties(*_arg0); end + def assign_properties(*); end # pkg:gem/rubocop#lib/rubocop/ext/regexp_node.rb:31 def each_capture(named: T.unsafe(nil)); end @@ -63040,112 +63442,121 @@ end class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFormatter include ::RuboCop::PathUtil - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:44 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:45 def initialize(output, options = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:57 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:58 def file_finished(file, offenses); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:50 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:51 def file_started(_file, options); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:65 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:66 def finished(_inspected_files); end private - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:86 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:87 def auto_gen_enforced_style?; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:90 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:91 def command; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:192 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:202 def cop_config_params(default_cfg, cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:210 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:220 def default_config(cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:106 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:116 def exclude_limit_option; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:254 + # `Preview` merges `Exclude` with the default configuration, so the excludes + # already in the configuration do not have to be copied into the todo file. + # + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:287 + def exclude_merges?(config, cop_config); end + + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:264 def excludes(offending_files, cop_name, parent); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:225 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:235 def filtered_config(cfg); end # Returns true if the given arr include the given elm or if any of the # given arr is a regexp that matches the given elm. # - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:302 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:320 def include_or_match?(arr, elm); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:275 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:293 def merge_mode_for_exclude?(cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:296 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:314 def no_exclude_limit?; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:126 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:136 def output_cop(cop_name, offense_count); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:164 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:174 def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:214 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:224 def output_cop_config(output_buffer, cfg, cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:196 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:206 def output_cop_param_comments(output_buffer, params, default_cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:244 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:254 def output_exclude_list(output_buffer, offending_files, cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:279 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:297 def output_exclude_path(output_buffer, exclude_path, parent); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:233 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:243 def output_offending_files(output_buffer, cfg, cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:120 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:130 def output_offenses; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:292 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:108 + def preview_option; end + + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:310 def safe_autocorrect?(config); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:140 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:150 def set_max(cfg, cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:152 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:162 def should_set_max?(cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:82 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:83 def show_offense_counts?; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:78 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:79 def show_timestamp?; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:184 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:194 def supports_safe_autocorrect?(cop_class, default_cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:188 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:198 def supports_unsafe_autocorrect?(cop_class, default_cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:116 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:126 def timestamp; end class << self - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:41 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:42 def config_to_allow_offenses; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:41 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:42 def config_to_allow_offenses=(_arg0); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:41 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:42 def detected_styles; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:41 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:42 def detected_styles=(_arg0); end end end @@ -63191,46 +63602,46 @@ end # # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:10 class RuboCop::Formatter::FormatterSet < ::Array - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:40 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:41 def initialize(options = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:56 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:57 def add_formatter(formatter_type, output_path = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:68 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:69 def close_output_files; end - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:51 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:52 def file_finished(file, offenses); end - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:45 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:46 def file_started(file, options); end - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:35 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:36 def finished(*args); end - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:35 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:36 def started(*args); end private - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:87 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:88 def builtin_formatter_class(specified_key); end - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:105 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:106 def custom_formatter_class(specified_class_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:76 + # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:77 def formatter_class(formatter_type); end end # pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:11 RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) -# pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:30 +# pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:31 RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTER_NAMES = T.let(T.unsafe(nil), Array) -# pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:32 +# pkg:gem/rubocop#lib/rubocop/formatter/formatter_set.rb:33 RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) # This formatter displays a progress bar and shows details of offenses as @@ -63271,6 +63682,9 @@ class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFor def file_finished(file, offenses); end # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:18 + def file_started(_file, options); end + + # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:22 def finished(_inspected_files); end # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:10 @@ -63278,16 +63692,16 @@ class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFor private - # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:29 + # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:33 def github_escape(string); end - # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:41 + # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:42 def github_severity(offense); end - # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:33 + # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:37 def minimum_severity_to_fail; end - # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:45 + # pkg:gem/rubocop#lib/rubocop/formatter/github_actions_formatter.rb:46 def report_offense(file, offense); end end @@ -63805,6 +64219,98 @@ class RuboCop::Formatter::QuietFormatter < ::RuboCop::Formatter::SimpleTextForma def report_summary(file_count, offense_count, correction_count, correctable_count); end end +# This formatter formats the report data in SARIF 2.1.0, the OASIS standard +# for static analysis results. It's understood by GitHub code scanning, +# Azure DevOps, and other tools that aggregate analyzer output. +# +# SARIF only knows three severity levels, so RuboCop's `info`, `refactor` +# and `convention` severities are all reported as `note`. +# +# pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:13 +class RuboCop::Formatter::SARIFFormatter < ::RuboCop::Formatter::BaseFormatter + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:27 + def initialize(output, options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:40 + def file_finished(file, offenses); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:36 + def file_started(_file, options); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:46 + def finished(_inspected_files); end + + private + + # `file_started` is not called when a formatter is used directly through + # the API, so there may be no config to consult. + # + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:172 + def config_for(file); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:166 + def cop_config(file, offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:159 + def default_level_for(file, offense, cop_class); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:155 + def description_for(file, offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:60 + def driver; end + + # GitHub uses these to match an alert across runs. Without them it falls + # back to the file path, which makes alerts churn whenever a file moves. + # + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:113 + def fingerprints_for(offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:149 + def help_for(description, help_uri); end + + # The URI is relative to the working directory, which is what consumers + # expect to resolve against their own checkout. No `uriBaseId`: it would + # have to be declared under `originalUriBaseIds` to mean anything, and + # every consumer that matters resolves relative paths without it. + # + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:91 + def location_for(file, offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:100 + def region_for(offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:52 + def report; end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:70 + def result_for(file, offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:131 + def rule_for(file, offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:124 + def rule_index_for(file, offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:118 + def suppression_for(offense); end + + # pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:176 + def uri_for(file); end +end + +# pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:16 +RuboCop::Formatter::SARIFFormatter::INFORMATION_URI = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:15 +RuboCop::Formatter::SARIFFormatter::SARIF_VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:14 +RuboCop::Formatter::SARIFFormatter::SCHEMA_URI = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/formatter/sarif_formatter.rb:18 +RuboCop::Formatter::SARIFFormatter::SEVERITY_LEVELS = T.let(T.unsafe(nil), Hash) + # A basic formatter that displays only files with offenses. # Offenses are displayed at compact form - just the # location of the problem and the associated message. @@ -64082,13 +64588,13 @@ end # # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:7 class RuboCop::MagicComment - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:33 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:34 def initialize(comment); end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:37 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:38 def any?; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:110 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:126 def encoding_specified?; end # Expose the `frozen_string_literal` value coerced to a boolean if possible. @@ -64097,7 +64603,7 @@ class RuboCop::MagicComment # @return [nil] if frozen_string_literal comment isn't found # @return [String] if comment is found but isn't true or false # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:92 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:101 def frozen_string_literal; end # Does the magic comment enable the frozen string literal feature. @@ -64108,55 +64614,69 @@ class RuboCop::MagicComment # # @return [Boolean] # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:57 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:59 def frozen_string_literal?; end # Was a magic comment for the frozen string literal found? # # @return [Boolean] # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:76 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:78 def frozen_string_literal_specified?; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:114 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:130 def rbs_inline_specified?; end # Expose the `shareable_constant_value` value coerced to a boolean if possible. # # @return [String] for shareable_constant_value config # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:106 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:122 def shareable_constant_value; end # Was a shareable_constant_value specified? # # @return [Boolean] # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:83 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:92 def shareable_constant_value_specified?; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:125 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:141 def typed; end # Was the Sorbet `typed` sigil specified? # # @return [Boolean] # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:121 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:137 def typed_specified?; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:45 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:47 def valid?; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:61 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:63 def valid_literal_value?; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:65 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:67 def valid_rbs_inline_value?; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:69 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:71 def valid_shareable_constant_value?; end + # Expose the `warn_indent` value. + # + # @return [String] for warn_indent config + # + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:115 + def warn_indent; end + + # Was a warn_indent specified? + # + # @return [Boolean] + # + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:85 + def warn_indent_specified?; end + private # Match the entire comment string with a pattern and take the first capture. @@ -64166,10 +64686,10 @@ class RuboCop::MagicComment # @return [String] if pattern matched # @return [nil] otherwise # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:141 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:157 def extract(pattern); end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:131 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:147 def specified?(value); end class << self @@ -64179,7 +64699,7 @@ class RuboCop::MagicComment # # @return [RuboCop::MagicComment] # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:24 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:25 def parse(comment); end end end @@ -64188,14 +64708,14 @@ end # # @abstract # -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:148 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:164 class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:149 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:165 def encoding; end # Rewrite the comment without a given token type # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:154 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:170 def without(type); end private @@ -64207,14 +64727,14 @@ class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment # @return [String] extracted value if it is found # @return [nil] otherwise # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:169 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:185 def match(keyword); end # Individual tokens composing an editor specific comment string. # # @return [Array] # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:184 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:200 def tokens; end end @@ -64229,40 +64749,43 @@ end # @see https://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html # @see https://github.com/ruby/ruby/blob/3f306dc/parse.y#L6873-L6892 Emacs handling in parse.y # -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:200 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:216 class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:206 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:222 def new_frozen_string_literal(value); end private - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:212 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:228 def extract_frozen_string_literal; end # Emacs comments cannot specify RBS::inline behavior. # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:217 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:233 def extract_rbs_inline_value; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:219 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:239 def extract_shareable_constant_value; end # Emacs comments cannot specify Sorbet typechecking behavior. # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:224 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:244 def extract_typed; end + + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:235 + def extract_warn_indent; end end -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:202 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:218 RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:204 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:220 RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:201 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:217 RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp) -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:203 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:219 RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String) # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:11 @@ -64280,19 +64803,19 @@ RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) # comment2.frozen_string_literal # => nil # comment2.encoding # => 'utf-8' # -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:281 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:304 class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment # Match `encoding` or `coding` # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:285 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:308 def encoding; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:298 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:321 def new_frozen_string_literal(value); end # Rewrite the comment without a given token type # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:290 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:313 def without(type); end private @@ -64305,20 +64828,23 @@ class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment # Case-insensitive and dashes/underscores are acceptable. # @see https://github.com/ruby/ruby/blob/78b95b49f8/parse.y#L7134-L7138 # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:311 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:334 def extract_frozen_string_literal; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:315 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:338 def extract_rbs_inline_value; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:319 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:346 def extract_shareable_constant_value; end - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:323 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:350 def extract_typed; end + + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:342 + def extract_warn_indent; end end -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:282 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:305 RuboCop::MagicComment::SimpleComment::FSTRING_LITERAL_COMMENT = T.let(T.unsafe(nil), String) # IRB's pattern for matching magic comment tokens. @@ -64336,7 +64862,7 @@ RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), String) # # comment.encoding # => 'ascii-8bit' # -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:235 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:255 class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment # For some reason the fileencoding keyword only works if there # is at least one other token included in the string. For example @@ -64347,43 +64873,48 @@ class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment # # does nothing # # vim: foo=bar, fileencoding=ascii-8bit # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:251 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:271 def encoding; end # Vim comments cannot specify RBS::inline behavior. # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:259 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:279 def extract_rbs_inline_value; end # Vim comments cannot specify Sorbet typechecking behavior. # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:265 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:288 def extract_typed; end # Vim comments cannot specify frozen string literal behavior. # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:256 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:276 def frozen_string_literal; end # Vim comments cannot specify shareable constant values behavior. # - # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:262 + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:285 def shareable_constant_value; end + + # Vim comments cannot specify indentation warning behavior. + # + # pkg:gem/rubocop#lib/rubocop/magic_comment.rb:282 + def warn_indent; end end -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:237 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:257 RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:240 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:260 RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash) -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:239 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:259 RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:236 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:256 RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp) -# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:238 +# pkg:gem/rubocop#lib/rubocop/magic_comment.rb:258 RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String) # Common functionality for finding names that are similar to a given name. @@ -64427,7 +64958,7 @@ class RuboCop::Options private - # pkg:gem/rubocop#lib/rubocop/options.rb:242 + # pkg:gem/rubocop#lib/rubocop/options.rb:260 def add_additional_modes(opts); end # the autocorrect command-line arguments map to the autocorrect @options values like so: @@ -64437,73 +64968,79 @@ class RuboCop::Options # --safe-auto-correct - true true - # -A, --auto-correct-all - true - true # - # pkg:gem/rubocop#lib/rubocop/options.rb:145 + # pkg:gem/rubocop#lib/rubocop/options.rb:161 def add_autocorrection_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:212 + # pkg:gem/rubocop#lib/rubocop/options.rb:230 def add_cache_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:75 + # pkg:gem/rubocop#lib/rubocop/options.rb:86 def add_check_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:168 + # pkg:gem/rubocop#lib/rubocop/options.rb:186 def add_config_generation_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:188 + # pkg:gem/rubocop#lib/rubocop/options.rb:206 def add_cop_selection_csv_option(option, opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:255 + # pkg:gem/rubocop#lib/rubocop/options.rb:273 def add_general_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:219 + # pkg:gem/rubocop#lib/rubocop/options.rb:237 def add_lsp_option(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:225 + # pkg:gem/rubocop#lib/rubocop/options.rb:243 def add_mcp_option(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:109 + # pkg:gem/rubocop#lib/rubocop/options.rb:125 def add_output_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:268 + # pkg:gem/rubocop#lib/rubocop/options.rb:286 def add_profile_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:231 + # pkg:gem/rubocop#lib/rubocop/options.rb:249 def add_server_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:203 + # pkg:gem/rubocop#lib/rubocop/options.rb:221 def add_severity_option(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:55 + # pkg:gem/rubocop#lib/rubocop/options.rb:66 def define_options; end - # pkg:gem/rubocop#lib/rubocop/options.rb:278 + # pkg:gem/rubocop#lib/rubocop/options.rb:296 def handle_deprecated_option(old_option, new_option); end + # `--diff` is a dry run of autocorrection, so it turns autocorrection on + # unless the user already picked a mode with `-a`, `-A` or `-x`. + # + # pkg:gem/rubocop#lib/rubocop/options.rb:58 + def imply_autocorrect_for_diff; end + # Finds the option in `args` starting with -- and converts it to a symbol, # e.g. [..., '--autocorrect', ...] to :autocorrect. # - # pkg:gem/rubocop#lib/rubocop/options.rb:312 + # pkg:gem/rubocop#lib/rubocop/options.rb:330 def long_opt_symbol(args); end # Sets a value in the @options hash, based on the given long option and its # value, in addition to calling the block if a block is given. # - # pkg:gem/rubocop#lib/rubocop/options.rb:301 + # pkg:gem/rubocop#lib/rubocop/options.rb:319 def option(opts, *args); end - # pkg:gem/rubocop#lib/rubocop/options.rb:317 + # pkg:gem/rubocop#lib/rubocop/options.rb:335 def plugin_feature(file); end - # pkg:gem/rubocop#lib/rubocop/options.rb:283 + # pkg:gem/rubocop#lib/rubocop/options.rb:301 def rainbow; end - # pkg:gem/rubocop#lib/rubocop/options.rb:323 + # pkg:gem/rubocop#lib/rubocop/options.rb:341 def require_feature(file); end # Creates a section of options in order to separate them visually when # using `--help`. # - # pkg:gem/rubocop#lib/rubocop/options.rb:293 + # pkg:gem/rubocop#lib/rubocop/options.rb:311 def section(opts, heading, &_block); end end @@ -64519,87 +65056,102 @@ RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) # This module contains help texts for command line options. # @api private # -# pkg:gem/rubocop#lib/rubocop/options.rb:532 +# pkg:gem/rubocop#lib/rubocop/options.rb:577 module RuboCop::OptionsHelp; end -# pkg:gem/rubocop#lib/rubocop/options.rb:534 +# pkg:gem/rubocop#lib/rubocop/options.rb:579 RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) -# pkg:gem/rubocop#lib/rubocop/options.rb:533 +# pkg:gem/rubocop#lib/rubocop/options.rb:578 RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/options.rb:536 +# pkg:gem/rubocop#lib/rubocop/options.rb:581 RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) # Validates option arguments and the options' compatibility with each other. # @api private # -# pkg:gem/rubocop#lib/rubocop/options.rb:341 +# pkg:gem/rubocop#lib/rubocop/options.rb:359 class RuboCop::OptionsValidator - # pkg:gem/rubocop#lib/rubocop/options.rb:379 + # pkg:gem/rubocop#lib/rubocop/options.rb:397 def initialize(options); end - # pkg:gem/rubocop#lib/rubocop/options.rb:506 + # pkg:gem/rubocop#lib/rubocop/options.rb:540 def boolean_or_empty_cache?; end - # pkg:gem/rubocop#lib/rubocop/options.rb:477 + # pkg:gem/rubocop#lib/rubocop/options.rb:511 def disable_parallel_when_invalid_option_combo; end - # pkg:gem/rubocop#lib/rubocop/options.rb:502 + # pkg:gem/rubocop#lib/rubocop/options.rb:536 def except_syntax?; end - # pkg:gem/rubocop#lib/rubocop/options.rb:510 + # pkg:gem/rubocop#lib/rubocop/options.rb:544 def incompatible_options; end - # pkg:gem/rubocop#lib/rubocop/options.rb:490 + # pkg:gem/rubocop#lib/rubocop/options.rb:524 def invalid_arguments_for_parallel; end - # pkg:gem/rubocop#lib/rubocop/options.rb:497 + # pkg:gem/rubocop#lib/rubocop/options.rb:531 def only_includes_redundant_disable?; end - # pkg:gem/rubocop#lib/rubocop/options.rb:411 + # pkg:gem/rubocop#lib/rubocop/options.rb:431 def validate_auto_gen_config; end - # pkg:gem/rubocop#lib/rubocop/options.rb:463 + # pkg:gem/rubocop#lib/rubocop/options.rb:497 def validate_autocorrect; end - # pkg:gem/rubocop#lib/rubocop/options.rb:522 + # pkg:gem/rubocop#lib/rubocop/options.rb:567 def validate_cache_enabled_for_cache_root; end - # pkg:gem/rubocop#lib/rubocop/options.rb:388 + # pkg:gem/rubocop#lib/rubocop/options.rb:478 + def validate_changed_and_stdin; end + + # OptionParser hands `--changed lib/` the path as the revision, which is a + # natural thing to type, so point at the fix rather than at git's error. + # + # pkg:gem/rubocop#lib/rubocop/options.rb:550 + def validate_changed_revision(revision); end + + # pkg:gem/rubocop#lib/rubocop/options.rb:406 def validate_compatibility; end - # pkg:gem/rubocop#lib/rubocop/options.rb:383 + # pkg:gem/rubocop#lib/rubocop/options.rb:401 def validate_cop_options; end - # pkg:gem/rubocop#lib/rubocop/options.rb:432 + # `--diff` promises not to write anything, and `--auto-gen-config` exists to + # write a file. + # + # pkg:gem/rubocop#lib/rubocop/options.rb:472 + def validate_diff; end + + # pkg:gem/rubocop#lib/rubocop/options.rb:452 def validate_display_only_correctable_and_autocorrect; end - # pkg:gem/rubocop#lib/rubocop/options.rb:424 + # pkg:gem/rubocop#lib/rubocop/options.rb:444 def validate_display_only_failed; end - # pkg:gem/rubocop#lib/rubocop/options.rb:441 + # pkg:gem/rubocop#lib/rubocop/options.rb:461 def validate_display_only_failed_and_display_only_correctable; end - # pkg:gem/rubocop#lib/rubocop/options.rb:456 + # pkg:gem/rubocop#lib/rubocop/options.rb:490 def validate_enable_all_cops_and_disable_all_cops; end - # pkg:gem/rubocop#lib/rubocop/options.rb:514 + # pkg:gem/rubocop#lib/rubocop/options.rb:559 def validate_exclude_limit_option; end - # pkg:gem/rubocop#lib/rubocop/options.rb:450 + # pkg:gem/rubocop#lib/rubocop/options.rb:484 def validate_lsp_and_editor_mode; end class << self # Cop name validation must be done later than option parsing, so it's not # called from within Options. # - # pkg:gem/rubocop#lib/rubocop/options.rb:348 + # pkg:gem/rubocop#lib/rubocop/options.rb:366 def validate_cop_list(names); end private - # pkg:gem/rubocop#lib/rubocop/options.rb:365 + # pkg:gem/rubocop#lib/rubocop/options.rb:383 def format_message_from(name, cop_names); end end end @@ -65020,7 +65572,7 @@ class RuboCop::RemoteConfig def generate_request(uri); end # pkg:gem/rubocop#lib/rubocop/remote_config.rb:67 - def handle_response(response, limit, &block); end + def handle_response(response, uri, limit, &block); end # pkg:gem/rubocop#lib/rubocop/remote_config.rb:45 def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end @@ -65054,7 +65606,7 @@ class RuboCop::ResultCache private - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:167 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:169 def any_symlink?(path); end # We combine team and options into a single "context" checksum to avoid @@ -65062,15 +65614,22 @@ class RuboCop::ResultCache # This context is for anything that's not (1) the RuboCop executable # checksum or (2) the inspected file checksum. # - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:256 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:267 def context_checksum(team, options); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:178 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:180 def file_checksum(file, config_store); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:163 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:165 def symlink_protection_triggered?(path); end + # Every file that fails to checksum shares this sentinel value, so the cache entry + # must be neither saved nor considered valid, or one file's cached results could be + # served as another's. + # + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:196 + def unavailable_checksum; end + class << self # pkg:gem/rubocop#lib/rubocop/result_cache.rb:98 def allow_symlinks_in_cache_location?(config_store); end @@ -65088,17 +65647,17 @@ class RuboCop::ResultCache # pkg:gem/rubocop#lib/rubocop/result_cache.rb:28 def cleanup(config_store, verbose, cache_root_override = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:191 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:202 def inhibit_cleanup; end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:191 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:202 def inhibit_cleanup=(_arg0); end # Return a hash of the options given at invocation, minus the ones that have # no effect on which offenses and disabled line ranges are found, and thus # don't affect caching. # - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:211 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:222 def relevant_options_digest(options); end # pkg:gem/rubocop#lib/rubocop/result_cache.rb:102 @@ -65116,12 +65675,12 @@ class RuboCop::ResultCache # The checksum of the RuboCop program running the inspection. # - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:194 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:205 def source_checksum; end private - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:221 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:232 def digest(path); end # pkg:gem/rubocop#lib/rubocop/result_cache.rb:68 @@ -65133,7 +65692,7 @@ class RuboCop::ResultCache # pkg:gem/rubocop#lib/rubocop/result_cache.rb:51 def requires_file_removal?(file_count, config_store); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:232 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:243 def rubocop_extra_features; end end end @@ -65155,13 +65714,16 @@ class RuboCop::Runner # pkg:gem/rubocop#lib/rubocop/runner.rb:57 def aborting=(_arg0); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:92 + # pkg:gem/rubocop#lib/rubocop/runner.rb:93 def aborting?; end + # pkg:gem/rubocop#lib/rubocop/runner.rb:56 + def diffs; end + # pkg:gem/rubocop#lib/rubocop/runner.rb:56 def errors; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:69 + # pkg:gem/rubocop#lib/rubocop/runner.rb:70 def run(paths); end # pkg:gem/rubocop#lib/rubocop/runner.rb:56 @@ -65169,40 +65731,40 @@ class RuboCop::Runner private - # pkg:gem/rubocop#lib/rubocop/runner.rb:300 + # pkg:gem/rubocop#lib/rubocop/runner.rb:317 def add_redundant_disables(file, offenses, source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:658 + # pkg:gem/rubocop#lib/rubocop/runner.rb:701 def assemble_team(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:109 + # pkg:gem/rubocop#lib/rubocop/runner.rb:120 def build_project_index(target_files); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:131 + # pkg:gem/rubocop#lib/rubocop/runner.rb:142 def bundled_gem_files; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:274 + # pkg:gem/rubocop#lib/rubocop/runner.rb:291 def cached_result(file, team); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:361 + # pkg:gem/rubocop#lib/rubocop/runner.rb:378 def cached_run?; end # Check whether a run created source identical to a previous run, which # means that we definitely have an infinite loop. # - # pkg:gem/rubocop#lib/rubocop/runner.rb:470 + # pkg:gem/rubocop#lib/rubocop/runner.rb:518 def check_for_infinite_loop(processed_source, offenses_by_iteration); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:326 + # pkg:gem/rubocop#lib/rubocop/runner.rb:343 def check_for_redundant_disables?(source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:563 + # pkg:gem/rubocop#lib/rubocop/runner.rb:611 def considered_failure?(offense); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:600 + # pkg:gem/rubocop#lib/rubocop/runner.rb:648 def default_config(cop_name); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:379 + # pkg:gem/rubocop#lib/rubocop/runner.rb:396 def do_inspection_loop(file); end # When corrections were written to disk and read back between iterations, @@ -65211,101 +65773,124 @@ class RuboCop::Runner # Apply the same conversion to the in-memory source. The final `File.write` # still performs it for the file itself. # - # pkg:gem/rubocop#lib/rubocop/runner.rb:432 + # pkg:gem/rubocop#lib/rubocop/runner.rb:480 def emulate_write_read_cycle(source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:346 + # pkg:gem/rubocop#lib/rubocop/runner.rb:363 def except_redundant_cop_disable_directive?; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:492 + # pkg:gem/rubocop#lib/rubocop/runner.rb:540 def extract_ruby_sources(processed_source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:355 + # pkg:gem/rubocop#lib/rubocop/runner.rb:372 def file_finished(file, offenses); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:167 + # pkg:gem/rubocop#lib/rubocop/runner.rb:178 def file_iterator(files, &block); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:278 + # pkg:gem/rubocop#lib/rubocop/runner.rb:295 def file_offense_cache(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:265 + # pkg:gem/rubocop#lib/rubocop/runner.rb:282 def file_offenses(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:350 + # pkg:gem/rubocop#lib/rubocop/runner.rb:367 def file_started(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:98 + # Write the file once, even when the loop was left through an exception + # (e.g. an infinite correction loop), like the per-iteration writes used + # to be. Under `--diff` nothing is written at all. + # + # pkg:gem/rubocop#lib/rubocop/runner.rb:444 + def finalize_corrections(file, original_source, corrected_source); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:109 def find_target_files(paths); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:187 + # pkg:gem/rubocop#lib/rubocop/runner.rb:198 def finished_report(file, index, offenses); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:554 + # pkg:gem/rubocop#lib/rubocop/runner.rb:602 def formatter_set; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:615 + # pkg:gem/rubocop#lib/rubocop/runner.rb:658 def get_processed_source(file, prism_result, source: T.unsafe(nil)); end # Custom ruby extractors may derive their fragments from the file on # disk rather than from the passed processed source, so corrections can # only be kept in memory when the default extractor is used. # - # pkg:gem/rubocop#lib/rubocop/runner.rb:441 + # pkg:gem/rubocop#lib/rubocop/runner.rb:489 def in_memory_corrections_possible?; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:484 + # pkg:gem/rubocop#lib/rubocop/runner.rb:431 + def inspect_and_correct(processed_source, offenses_by_iteration); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:532 def inspect_file(processed_source, team = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:148 + # pkg:gem/rubocop#lib/rubocop/runner.rb:159 def inspect_files(files); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:420 + # pkg:gem/rubocop#lib/rubocop/runner.rb:468 def inspect_iteration(processed_source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:445 + # pkg:gem/rubocop#lib/rubocop/runner.rb:493 def iterate_until_no_changes(source, offenses_by_iteration); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:251 + # pkg:gem/rubocop#lib/rubocop/runner.rb:268 def list_files(paths); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:596 + # pkg:gem/rubocop#lib/rubocop/runner.rb:644 def mark_as_safe_by_config?(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:604 + # pkg:gem/rubocop#lib/rubocop/runner.rb:652 def minimum_severity_to_fail; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:528 + # pkg:gem/rubocop#lib/rubocop/runner.rb:576 def mobilize_cop_badge?(badge, config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:506 + # pkg:gem/rubocop#lib/rubocop/runner.rb:554 def mobilize_team(processed_source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:512 + # pkg:gem/rubocop#lib/rubocop/runner.rb:560 def mobilized_cop_classes(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:572 + # pkg:gem/rubocop#lib/rubocop/runner.rb:620 def offense_displayed?(offense); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:584 + # pkg:gem/rubocop#lib/rubocop/runner.rb:632 def offenses_to_report(offenses); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:234 + # The project index is deliberately built from the unfiltered file list: + # cross-file offenses must not depend on which files happen to have changed. + # + # pkg:gem/rubocop#lib/rubocop/runner.rb:101 + def only_changed(target_files); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:251 def parallel_file_iterator(files, on_start, on_finish, &block); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:255 + # `--auto-gen-config` needs the offenses of every file in one place, and + # `--diff` collects the diffs in this process, where a worker's copy of + # them would be lost. + # + # pkg:gem/rubocop#lib/rubocop/runner.rb:236 + def parallel_supported_by_options?; end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:272 def process_file(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:201 + # pkg:gem/rubocop#lib/rubocop/runner.rb:212 def process_remaining_report_queue; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:196 + # pkg:gem/rubocop#lib/rubocop/runner.rb:207 def process_report_queue_entry(index); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:223 + # pkg:gem/rubocop#lib/rubocop/runner.rb:240 def project_index_disables_parallel?; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:137 + # pkg:gem/rubocop#lib/rubocop/runner.rb:148 def project_index_enabled?; end # The index always covers the whole project, not just the files being @@ -65314,22 +65899,29 @@ class RuboCop::Runner # sharding) would see different offenses than full runs. The project is # rooted at the directory of the configuration that enabled the index. # - # pkg:gem/rubocop#lib/rubocop/runner.rb:120 + # pkg:gem/rubocop#lib/rubocop/runner.rb:131 def project_index_files(target_files); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:540 + # pkg:gem/rubocop#lib/rubocop/runner.rb:588 def qualify_option_cop_names; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:338 + # `--diff` reports what autocorrection would do instead of doing it. With + # `--stdin` the corrected source is handed back through the options rather + # than deferred, so that is where the new source comes from. + # + # pkg:gem/rubocop#lib/rubocop/runner.rb:455 + def record_diff(file, original_source, corrected_source); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:355 def redundant_cop_disable_directive(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:207 + # pkg:gem/rubocop#lib/rubocop/runner.rb:218 def run_in_parallel?(files); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:369 + # pkg:gem/rubocop#lib/rubocop/runner.rb:386 def save_in_cache(cache, offenses); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:238 + # pkg:gem/rubocop#lib/rubocop/runner.rb:255 def serial_file_iterator(files, on_start, on_finish, &block); end # A Cop::Team instance is stateful and may change when inspecting. @@ -65337,16 +65929,16 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # pkg:gem/rubocop#lib/rubocop/runner.rb:653 + # pkg:gem/rubocop#lib/rubocop/runner.rb:696 def standby_team(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:550 + # pkg:gem/rubocop#lib/rubocop/runner.rb:598 def style_guide_cops_only?(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:588 + # pkg:gem/rubocop#lib/rubocop/runner.rb:636 def supports_safe_autocorrect?(offense); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:315 + # pkg:gem/rubocop#lib/rubocop/runner.rb:332 def team_for_redundant_disables(file, offenses, source); end class << self @@ -65828,6 +66420,123 @@ end # pkg:gem/rubocop#lib/rubocop/ast_aliases.rb:7 RuboCop::Token = RuboCop::AST::Token +# Renders a unified diff between two versions of a file's source. +# +# RuboCop has no diffing dependency and this output is meant to be read by +# people (and occasionally piped into `git apply`), so the goal is a diff +# that is correct and readable, not one that matches `diff -u` byte for byte. +# +# @api private +# +# pkg:gem/rubocop#lib/rubocop/unified_diff.rb:11 +class RuboCop::UnifiedDiff + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:21 + def initialize(path, old_source, new_source); end + + # @return [String] the diff, or an empty string when the sources are identical + # + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:28 + def to_s; end + + private + + # Picks the better of the two paths reaching this diagonal, then follows + # the diagonal as far as the lines match. + # + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:106 + def advance(furthest, diagonal, distance); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:141 + def backtrack(trace); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:52 + def common_prefix_length; end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:58 + def common_suffix_length(prefix); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:39 + def edit_script; end + + # Matching lines cost nothing, so the path slides along them for free. + # + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:131 + def follow_diagonal(old_index, new_index); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:250 + def formatted_line(kind, line); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:216 + def hunk(script, range); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:190 + def hunks_for(script); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:68 + def middle_script(old_lines, new_lines); end + + # Myers' diff algorithm. Each round `d` extends the furthest reaching path + # for every diagonal `k`; the first path to reach the end of both sources + # is a shortest edit script, which is then reconstructed from the saved + # rounds. Returns `nil` when the sources are too different to bother. + # + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:82 + def myers_script; end + + # An empty side is anchored to the line it follows, which is how `diff` + # reports a pure insertion or deletion, and a single line drops the count. + # + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:242 + def position(start, count); end + + # A path arrives at this diagonal either from the one above it (having + # inserted a line) or the one below it (having deleted one); whichever + # reached further wins. + # + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:115 + def previous_diagonal(furthest, diagonal, distance); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:183 + def previous_position(furthest, distance, old_index, new_index); end + + # Every change is shown with a few lines of context around it, and changes + # whose context would overlap are shown as a single hunk. + # + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:199 + def ranges_for(changed, script_length); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:100 + def reached_end?(old_index, diagonal); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:169 + def record_edit(script, position, previous); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:124 + def start_of_path(furthest, diagonal, distance); end + + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:228 + def start_positions(script, index); end + + # Both sides step back together for as long as their lines match. + # + # pkg:gem/rubocop#lib/rubocop/unified_diff.rb:157 + def walk_diagonal(script, position, previous); end +end + +# pkg:gem/rubocop#lib/rubocop/unified_diff.rb:12 +RuboCop::UnifiedDiff::CONTEXT_LINES = T.let(T.unsafe(nil), Integer) + +# Finding a minimal diff costs time and memory proportional to the square +# of the number of edits. Past this many edits the file was rewritten +# rather than corrected, so the changed region is reported as a single +# replacement instead. +# +# pkg:gem/rubocop#lib/rubocop/unified_diff.rb:19 +RuboCop::UnifiedDiff::MAX_EDIT_DISTANCE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/unified_diff.rb:13 +RuboCop::UnifiedDiff::NO_NEWLINE_MARKER = T.let(T.unsafe(nil), String) + # This module contains a collection of useful utility methods. # # pkg:gem/rubocop#lib/rubocop/util.rb:5 diff --git a/sorbet/rbi/gems/rubydex@0.2.7.rbi b/sorbet/rbi/gems/rubydex@0.2.7.rbi deleted file mode 100644 index 52919b0..0000000 --- a/sorbet/rbi/gems/rubydex@0.2.7.rbi +++ /dev/null @@ -1,836 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubydex` gem. -# Please instead update this file by running `bin/tapioca gem rubydex`. - - -# frozen_string_literal: true -# typed: strict - -# pkg:gem/rubydex#lib/rubydex/version.rb:3 -module Rubydex; end - -# Raised when `MethodAliasDefinition#target` walks an alias chain that loops back on itself. -# -# pkg:gem/rubydex#lib/rubydex/errors.rb:7 -class Rubydex::AliasCycleError < ::Rubydex::Error; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::AttrAccessorDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::AttrReaderDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::AttrWriterDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Class < ::Rubydex::Namespace - include ::Rubydex::Visibility - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def visibility; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ClassDefinition < ::Rubydex::Definition - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[Rubydex::Mixin]) } - def mixins; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.nilable(Rubydex::ConstantReference)) } - def superclass; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ClassVariable < ::Rubydex::Declaration - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[T.untyped]) } - def references; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ClassVariableDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Comment - # pkg:gem/rubydex#lib/rubydex/comment.rb:12 - sig { params(string: String, location: Rubydex::Location).void } - def initialize(string:, location:); end - - # pkg:gem/rubydex#lib/rubydex/comment.rb:9 - sig { returns(Rubydex::Location) } - def location; end - - # pkg:gem/rubydex#lib/rubydex/comment.rb:6 - sig { returns(String) } - def string; end -end - -# Raised by `Graph#load_config` when the requested config file does not exist, cannot be read, or is malformed -# -# pkg:gem/rubydex#lib/rubydex/errors.rb:10 -class Rubydex::ConfigError < ::Rubydex::Error; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Constant < ::Rubydex::Declaration - include ::Rubydex::Visibility - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::ConstantReference]) } - def references; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def visibility; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ConstantAlias < ::Rubydex::Declaration - include ::Rubydex::Visibility - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::ConstantReference]) } - def references; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.nilable(Rubydex::Declaration)) } - def target; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def visibility; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ConstantAliasDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ConstantDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ConstantReference < ::Rubydex::Reference - abstract! - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def initialize(_arg0, _arg1); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(Rubydex::Location) } - def location; end - - class << self - def new(*args); end - end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ConstantVisibilityDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Declaration - abstract! - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def initialize(_arg0, _arg1); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::Definition]) } - def definitions; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(String) } - def name; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(Rubydex::Declaration) } - def owner; end - - # @abstract - # - # pkg:gem/rubydex#lib/rubydex/declaration.rb:18 - sig { returns(T::Enumerable[Rubydex::Reference]) } - def references; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(String) } - def unqualified_name; end - - class << self - private - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def new(*args); end - end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Definition - abstract! - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def initialize(_arg0, _arg1); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[Rubydex::Comment]) } - def comments; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.nilable(Rubydex::Declaration)) } - def declaration; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Boolean) } - def deprecated?; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[Rubydex::Definition]) } - def lexical_nesting; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.nilable(Rubydex::Definition)) } - def lexical_owner; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(Rubydex::Location) } - def location; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(String) } - def name; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.nilable(Rubydex::Location)) } - def name_location; end - - class << self - private - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def new(*args); end - end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Diagnostic - # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:15 - sig { params(rule: Symbol, message: String, location: Rubydex::Location).void } - def initialize(rule:, message:, location:); end - - # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:12 - sig { returns(Rubydex::Location) } - def location; end - - # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:9 - sig { returns(String) } - def message; end - - # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:6 - sig { returns(Symbol) } - def rule; end -end - -# A one based location intended for display purposes. This is what should be used when displaying a location to users, -# like in CLIs -# -# pkg:gem/rubydex#lib/rubydex/location.rb:83 -class Rubydex::DisplayLocation < ::Rubydex::Location - # Normalize to zero-based for comparison with Location - # - # pkg:gem/rubydex#lib/rubydex/location.rb:105 - sig { returns([String, Integer, Integer, Integer, Integer]) } - def comparable_values; end - - # Returns itself - # - # pkg:gem/rubydex#lib/rubydex/location.rb:98 - sig { returns(Rubydex::DisplayLocation) } - def to_display; end - - # pkg:gem/rubydex#lib/rubydex/location.rb:110 - sig { returns(String) } - def to_s; end - - class << self - # pkg:gem/rubydex#lib/rubydex/location.rb:86 - sig { params(prism_location: Prism::Location, uri: String).returns(T.noreturn) } - def from_prism(prism_location, uri:); end - end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Document - # pkg:gem/rubydex#lib/rubydex.rb:11 - def initialize(_arg0, _arg1); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::Definition]) } - def definitions; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::MethodReference]) } - def method_references; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(String) } - def uri; end - - class << self - private - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def new(*args); end - end -end - -# pkg:gem/rubydex#lib/rubydex/errors.rb:4 -class Rubydex::Error < ::StandardError; end - -# Represents `extend SomeModule` -# -# pkg:gem/rubydex#lib/rubydex/mixin.rb:21 -class Rubydex::Extend < ::Rubydex::Mixin; end - -# pkg:gem/rubydex#lib/rubydex/failures.rb:4 -class Rubydex::Failure - # pkg:gem/rubydex#lib/rubydex/failures.rb:9 - sig { params(message: String).void } - def initialize(message); end - - # pkg:gem/rubydex#lib/rubydex/failures.rb:6 - sig { returns(String) } - def message; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::GlobalVariable < ::Rubydex::Declaration - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[T.untyped]) } - def references; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::GlobalVariableAliasDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::GlobalVariableDefinition < ::Rubydex::Definition; end - -# The global graph representing all declarations and their relationships for the workspace -# -# Note: this class is partially defined in C to integrate with the Rust backend -# -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Graph - # pkg:gem/rubydex#lib/rubydex/graph.rb:11 - sig { params(workspace_path: T.nilable(String)).void } - def initialize(workspace_path: nil); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(fully_qualified_name: String).returns(T.nilable(Rubydex::Declaration)) } - def [](fully_qualified_name); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[Rubydex::Failure]) } - def check_integrity; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def complete_expression(*_arg0); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def complete_method_argument(*_arg0); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def complete_method_call(*_arg0); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def complete_namespace_access(*_arg0); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::ConstantReference]) } - def constant_references; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::Declaration]) } - def declarations; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(uri: String).returns(T.nilable(Rubydex::Document)) } - def delete_document(uri); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[Rubydex::Diagnostic]) } - def diagnostics; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(uri: String).returns(T.nilable(Rubydex::Document)) } - def document(uri); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::Document]) } - def documents; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(encoding: String).void } - def encoding=(encoding); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(paths: T::Array[String]).void } - def exclude_paths(paths); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[String]) } - def excluded_paths; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(query: String).returns(T::Enumerable[Rubydex::Declaration]) } - def fuzzy_search(query); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(file_paths: T::Array[String]).returns(T::Array[String]) } - def index_all(file_paths); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(uri: String, source: String, language_id: String).void } - def index_source(uri, source, language_id); end - - # Index all files and dependencies of the workspace that exists in `workspace_path` - # - # pkg:gem/rubydex#lib/rubydex/graph.rb:17 - sig { returns(T::Array[String]) } - def index_workspace; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def keyword(_arg0); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def load_config(*_arg0); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::MethodReference]) } - def method_references; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(load_paths: T::Array[String]).returns(T::Array[String]) } - def require_paths(load_paths); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.self_type) } - def resolve; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(name: String, nesting: T::Array[String]).returns(T.nilable(Rubydex::Declaration)) } - def resolve_constant(name, nesting); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(require_path: String, load_paths: T::Array[String]).returns(T.nilable(Rubydex::Document)) } - def resolve_require_path(require_path, load_paths); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(query: String).returns(T::Enumerable[Rubydex::Declaration]) } - def search(query); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(String) } - def workspace_path; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(workspace_path: String).returns(String) } - def workspace_path=(workspace_path); end - - # Returns all workspace paths that should be indexed - # - # pkg:gem/rubydex#lib/rubydex/graph.rb:24 - sig { returns(T::Array[String]) } - def workspace_paths; end - - private - - # Searches for the latest installation of the `rbs` gem and adds the paths for the core and stdlib RBS definitions - # to the list of paths. This method does not require `rbs` to be a part of the bundle. It searches for whatever - # latest installation of `rbs` exists in the system and fails silently if we can't find one - # - # pkg:gem/rubydex#lib/rubydex/graph.rb:70 - sig { params(paths: T::Array[String]).void } - def add_core_rbs_definition_paths(paths); end - - # Gathers the paths we have to index for all workspace dependencies - # - # pkg:gem/rubydex#lib/rubydex/graph.rb:46 - sig { params(paths: T::Array[String]).void } - def add_workspace_dependency_paths(paths); end -end - -# pkg:gem/rubydex#lib/rubydex/graph.rb:8 -Rubydex::Graph::INDEXABLE_EXTENSIONS = T.let(T.unsafe(nil), Array) - -# Represents `include SomeModule` -# -# pkg:gem/rubydex#lib/rubydex/mixin.rb:15 -class Rubydex::Include < ::Rubydex::Mixin; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::InstanceVariable < ::Rubydex::Declaration - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[T.untyped]) } - def references; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::InstanceVariableDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex/failures.rb:14 -class Rubydex::IntegrityFailure < ::Rubydex::Failure; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Keyword - # pkg:gem/rubydex#lib/rubydex/keyword.rb:12 - sig { params(name: String, documentation: String).void } - def initialize(name, documentation); end - - # pkg:gem/rubydex#lib/rubydex/keyword.rb:9 - sig { returns(String) } - def documentation; end - - # pkg:gem/rubydex#lib/rubydex/keyword.rb:6 - sig { returns(String) } - def name; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::KeywordParameter - # pkg:gem/rubydex#lib/rubydex/keyword_parameter.rb:9 - sig { params(name: String).void } - def initialize(name); end - - # pkg:gem/rubydex#lib/rubydex/keyword_parameter.rb:6 - sig { returns(String) } - def name; end -end - -# A zero based internal location. Intended to be used for tool-to-tool communication, such as a language server -# communicating with an editor. -# -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Location - include ::Comparable - - # pkg:gem/rubydex#lib/rubydex/location.rb:31 - sig { params(uri: String, start_line: Integer, end_line: Integer, start_column: Integer, end_column: Integer).void } - def initialize(uri:, start_line:, end_line:, start_column:, end_column:); end - - # pkg:gem/rubydex#lib/rubydex/location.rb:51 - sig { params(other: T.untyped).returns(T.nilable(Integer)) } - def <=>(other); end - - # pkg:gem/rubydex#lib/rubydex/location.rb:58 - sig { returns([String, Integer, Integer, Integer, Integer]) } - def comparable_values; end - - # pkg:gem/rubydex#lib/rubydex/location.rb:15 - sig { returns(Integer) } - def end_column; end - - # pkg:gem/rubydex#lib/rubydex/location.rb:15 - sig { returns(Integer) } - def end_line; end - - # pkg:gem/rubydex#lib/rubydex/location.rb:15 - sig { returns(Integer) } - def start_column; end - - # pkg:gem/rubydex#lib/rubydex/location.rb:15 - sig { returns(Integer) } - def start_line; end - - # Turns this zero based location into a one based location for display purposes. - # - # pkg:gem/rubydex#lib/rubydex/location.rb:65 - sig { returns(Rubydex::DisplayLocation) } - def to_display; end - - # pkg:gem/rubydex#lib/rubydex/location.rb:40 - sig { returns(String) } - def to_file_path; end - - # pkg:gem/rubydex#lib/rubydex/location.rb:76 - sig { returns(String) } - def to_s; end - - # pkg:gem/rubydex#lib/rubydex/location.rb:12 - sig { returns(String) } - def uri; end - - class << self - # pkg:gem/rubydex#lib/rubydex/location.rb:19 - sig { params(prism_location: Prism::Location, uri: String).returns(Rubydex::Location) } - def from_prism(prism_location, uri:); end - end -end - -# pkg:gem/rubydex#lib/rubydex/location.rb:7 -class Rubydex::Location::NotFileUriError < ::StandardError; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Method < ::Rubydex::Declaration - include ::Rubydex::Visibility - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::MethodReference]) } - def references; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def visibility; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::MethodAliasDefinition < ::Rubydex::Definition - # pkg:gem/rubydex#lib/rubydex.rb:11 - def signatures; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.nilable(Rubydex::Method)) } - def target; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::MethodDefinition < ::Rubydex::Definition - # pkg:gem/rubydex#lib/rubydex.rb:11 - def signatures; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::MethodReference < ::Rubydex::Reference - # pkg:gem/rubydex#lib/rubydex.rb:11 - def initialize(_arg0, _arg1); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(Rubydex::Location) } - def location; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(String) } - def name; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.nilable(Rubydex::Declaration)) } - def receiver; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::MethodVisibilityDefinition < ::Rubydex::Definition; end - -# pkg:gem/rubydex#lib/rubydex/mixin.rb:4 -class Rubydex::Mixin - abstract! - - # pkg:gem/rubydex#lib/rubydex/mixin.rb:9 - sig { params(constant_reference: Rubydex::ConstantReference).void } - def initialize(constant_reference); end - - # pkg:gem/rubydex#lib/rubydex/mixin.rb:6 - def constant_reference; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Module < ::Rubydex::Namespace - include ::Rubydex::Visibility - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def visibility; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ModuleDefinition < ::Rubydex::Definition - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[Rubydex::Mixin]) } - def mixins; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Namespace < ::Rubydex::Declaration - abstract! - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::Namespace]) } - def ancestors; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::Namespace]) } - def descendants; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def find_member(*_arg0); end - - # pkg:gem/rubydex#lib/rubydex/declaration.rb:25 - sig { params(ancestor_names: String).returns(T::Boolean) } - def has_ancestor?(*ancestor_names); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { params(name: String).returns(T.nilable(Rubydex::Declaration)) } - def member(name); end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::Declaration]) } - def members; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Enumerable[Rubydex::ConstantReference]) } - def references; end - - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T.nilable(Rubydex::SingletonClass)) } - def singleton_class; end -end - -# Represents `prepend SomeModule` -# -# pkg:gem/rubydex#lib/rubydex/mixin.rb:18 -class Rubydex::Prepend < ::Rubydex::Mixin; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Reference - abstract! - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def initialize(_arg0, _arg1); end - - # pkg:gem/rubydex#lib/rubydex/reference.rb:6 - def location; end - - class << self - private - - # pkg:gem/rubydex#lib/rubydex.rb:11 - def new(*args); end - end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::ResolvedConstantReference < ::Rubydex::ConstantReference - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(Rubydex::Declaration) } - def declaration; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature - # pkg:gem/rubydex#lib/rubydex/signature.rb:33 - def initialize(parameters); end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:128 - def block_parameter; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:38 - def deconstruct; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:80 - def deconstruct_keys(keys); end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:125 - def forward_parameter; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:116 - def keyword_parameters; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:119 - def optional_keyword_parameters; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:107 - def optional_positional_parameters; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:30 - def parameters; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:104 - def positional_parameters; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:113 - def post_parameters; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:122 - def rest_keyword_parameter; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:110 - def rest_positional_parameter; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::BlockParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex/signature.rb:66 -Rubydex::Signature::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::ForwardParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::KeywordParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::OptionalKeywordParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::OptionalPositionalParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::Parameter - # pkg:gem/rubydex#lib/rubydex/signature.rb:13 - def initialize(name, location); end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:10 - def location; end - - # pkg:gem/rubydex#lib/rubydex/signature.rb:7 - def name; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::PositionalParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::PostParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::RestKeywordParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Signature::RestPositionalParameter < ::Rubydex::Signature::Parameter; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::SingletonClass < ::Rubydex::Namespace - # pkg:gem/rubydex#lib/rubydex/declaration.rb:40 - sig { returns(Rubydex::Declaration) } - def attached_class; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::SingletonClassDefinition < ::Rubydex::Definition - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(T::Array[Rubydex::Mixin]) } - def mixins; end -end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::Todo < ::Rubydex::Namespace; end - -# pkg:gem/rubydex#lib/rubydex.rb:11 -class Rubydex::UnresolvedConstantReference < ::Rubydex::ConstantReference - # pkg:gem/rubydex#lib/rubydex.rb:11 - sig { returns(String) } - def name; end -end - -# pkg:gem/rubydex#lib/rubydex/version.rb:4 -Rubydex::VERSION = T.let(T.unsafe(nil), String) - -# pkg:gem/rubydex#lib/rubydex/declaration.rb:4 -module Rubydex::Visibility - # pkg:gem/rubydex#lib/rubydex/declaration.rb:9 - def private?; end - - # pkg:gem/rubydex#lib/rubydex/declaration.rb:12 - def protected?; end - - # pkg:gem/rubydex#lib/rubydex/declaration.rb:6 - def public?; end -end diff --git a/sorbet/rbi/gems/rubydex@0.4.1.rbi b/sorbet/rbi/gems/rubydex@0.4.1.rbi new file mode 100644 index 0000000..fbdd966 --- /dev/null +++ b/sorbet/rbi/gems/rubydex@0.4.1.rbi @@ -0,0 +1,1620 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubydex` gem. +# Please instead update this file by running `bin/tapioca gem rubydex`. + + +# frozen_string_literal: true +# typed: strict + +# This file is generated by `generate_ruby_rules.rs`. Do not edit this manually. +# +# pkg:gem/rubydex#lib/rubydex/version.rb:3 +module Rubydex; end + +# Raised when `MethodAliasDefinition#target` walks an alias chain that loops back on itself. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:7 +class Rubydex::AliasCycleError < ::Rubydex::Error; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::AttrAccessorDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::AttrReaderDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::AttrWriterDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Class < ::Rubydex::Namespace + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ClassDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Mixin]) } + def mixins; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def raw_name; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.nilable(Rubydex::ConstantReference)) } + def superclass; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ClassVariable < ::Rubydex::Declaration + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[T.untyped]) } + def references; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ClassVariableDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Comment + # pkg:gem/rubydex#lib/rubydex/comment.rb:12 + sig { params(string: String, location: Rubydex::Location).void } + def initialize(string:, location:); end + + # pkg:gem/rubydex#lib/rubydex/comment.rb:9 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex/comment.rb:6 + sig { returns(String) } + def string; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +# The configuration of a workspace, parsed from its `rubydex.toml`. It carries both the settings that are global to +# every built-in tool, such as the workspace being analyzed, and the typed settings of each tool's own section (e.g. +# `[graph]`, `[linter]`). +class Rubydex::Config + # pkg:gem/rubydex#lib/rubydex.rb:14 + # The linter's settings, read from the `[linter]` section. + sig { returns(Rubydex::LinterConfig) } + def linter; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + # The configured workspace path, which is usually PWD, except for editors that spawn language servers outside of pwd. + sig { returns(String) } + def workspace_path; end + + class << self + # pkg:gem/rubydex#lib/rubydex.rb:14 + # Loads the configuration file for `workspace_path/rubydex.toml` if it exists or uses the defaults. + sig { params(workspace_path: String).returns(Rubydex::Config) } + def load(workspace_path); end + end +end + +# Raised by `Config.load` when the workspace does not exist, or when its config file cannot be read or is malformed. +# A workspace with no config file at all is not an error. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:11 +class Rubydex::ConfigError < ::Rubydex::Error; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Constant < ::Rubydex::Declaration + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::ConstantReference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ConstantAlias < ::Rubydex::Declaration + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::ConstantReference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.nilable(Rubydex::Declaration)) } + def target; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ConstantAliasDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def raw_name; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ConstantDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def raw_name; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ConstantReference < ::Rubydex::Reference + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Rubydex::Document) } + def document; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Rubydex::Location) } + def location; end + + class << self + def new(*args); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ConstantVisibilityDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Declaration + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::Definition]) } + def definitions; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def name; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Rubydex::Declaration) } + def owner; end + + # @abstract + # + # pkg:gem/rubydex#lib/rubydex/declaration.rb:18 + sig { returns(T::Enumerable[Rubydex::Reference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def unqualified_name; end + + class << self + private + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def new(*_arg0); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Definition + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Comment]) } + def comments; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.nilable(Rubydex::Declaration)) } + def declaration; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Boolean) } + def deprecated?; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Rubydex::Document) } + def document; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Definition]) } + def lexical_nesting; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.nilable(Rubydex::Definition)) } + def lexical_owner; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def name; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.nilable(Rubydex::Location)) } + def name_location; end + + class << self + private + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def new(*_arg0); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Diagnostic + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:23 + sig do + params( + rule: T.class_of(Rubydex::Rule), + message: String, + location: Rubydex::Location, + related_information: T::Array[Rubydex::RelatedInformation] + ).void + end + def initialize(rule:, message:, location:, related_information: []); end + + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:12 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:9 + sig { returns(String) } + def message; end + + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:15 + sig { returns(T::Array[Rubydex::RelatedInformation]) } + def related_information; end + + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:6 + sig { returns(T.class_of(Rubydex::Rule)) } + def rule; end +end + +# A one based location intended for display purposes. This is what should be used when displaying a location to users, +# like in CLIs +# +# pkg:gem/rubydex#lib/rubydex/location.rb:86 +class Rubydex::DisplayLocation < ::Rubydex::Location + # Normalize to zero-based for comparison with Location + # + # pkg:gem/rubydex#lib/rubydex/location.rb:108 + sig { returns([String, Integer, Integer, Integer, Integer]) } + def comparable_values; end + + # Returns itself + # + # pkg:gem/rubydex#lib/rubydex/location.rb:101 + sig { returns(Rubydex::DisplayLocation) } + def to_display; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:113 + sig { returns(String) } + def to_s; end + + class << self + # pkg:gem/rubydex#lib/rubydex/location.rb:89 + sig { params(prism_location: Prism::Location, uri: String).returns(T.noreturn) } + def from_prism(prism_location, uri:); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Document + # pkg:gem/rubydex#lib/rubydex.rb:14 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::Definition]) } + def definitions; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::MethodReference]) } + def method_references; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def uri; end + + class << self + private + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def new(*_arg0); end + end +end + +# pkg:gem/rubydex#lib/rubydex/errors.rb:4 +class Rubydex::Error < ::StandardError; end + +# Represents `extend SomeModule` +# +# pkg:gem/rubydex#lib/rubydex/mixin.rb:21 +class Rubydex::Extend < ::Rubydex::Mixin; end + +# pkg:gem/rubydex#lib/rubydex/failures.rb:4 +class Rubydex::Failure + # pkg:gem/rubydex#lib/rubydex/failures.rb:9 + sig { params(message: String).void } + def initialize(message); end + + # pkg:gem/rubydex#lib/rubydex/failures.rb:6 + sig { returns(String) } + def message; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::GlobalVariable < ::Rubydex::Declaration + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[T.untyped]) } + def references; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::GlobalVariableAliasDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::GlobalVariableDefinition < ::Rubydex::Definition; end + +# The global graph representing all declarations and their relationships for the workspace +# +# Note: this class is partially defined in C to integrate with the Rust backend +# +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Graph + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(fully_qualified_name: String).returns(T.nilable(Rubydex::Declaration)) } + def [](fully_qualified_name); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Failure]) } + def check_integrity; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def complete_expression(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def complete_method_argument(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def complete_method_call(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def complete_namespace_access(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::ConstantReference]) } + def constant_references; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::Declaration]) } + def dead_code_candidates; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::Declaration]) } + def declarations; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(uri: String).returns(T.nilable(Rubydex::Document)) } + def delete_document(uri); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Diagnostic]) } + def diagnostics; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(uri: String).returns(T.nilable(Rubydex::Document)) } + def document(uri); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::Document]) } + def documents; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(encoding: String).void } + def encoding=(encoding); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(patterns: T::Array[String]).void } + def exclude_patterns(patterns); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[String]) } + def excluded_patterns; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(queries: String).returns(T::Enumerable[Rubydex::Declaration]) } + def fuzzy_search(*queries); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(file_paths: T::Array[String]).returns(T::Array[String]) } + def index_all(file_paths); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(uri: String, source: String, language_id: String).void } + def index_source(uri, source, language_id); end + + # Index all files and dependencies of the workspace that exists in `workspace_path` + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:24 + sig { returns(T::Array[String]) } + def index_workspace; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + # Returns the keyword object for the name, or `nil` if it is not a Ruby keyword + sig { params(name: String).returns(T.nilable(Rubydex::Keyword)) } + def keyword(name); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + # Loads the configuration in the graph. + sig { params(config: Rubydex::Config).void } + def load_config(config); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::MethodReference]) } + def method_references; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(load_paths: T::Array[String]).returns(T::Array[String]) } + def require_paths(load_paths); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.self_type) } + def resolve; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig do + params( + name: String, + context: T.any( + T::Array[String], + Rubydex::ClassDefinition, + Rubydex::SingletonClassDefinition, + Rubydex::ModuleDefinition, + ) + ).returns(T.nilable(Rubydex::Declaration)) + end + def resolve_constant(name, context); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(require_path: String, load_paths: T::Array[String]).returns(T.nilable(Rubydex::Document)) } + def resolve_require_path(require_path, load_paths); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(queries: String).returns(T::Enumerable[Rubydex::Declaration]) } + def search(*queries); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + # The root directory of the workspace being analyzed, which comes from the loaded `Rubydex::Config` + sig { returns(String) } + def workspace_path; end + + # Returns all workspace paths that should be indexed + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:31 + sig { returns(T::Array[String]) } + def workspace_paths; end + + private + + # Searches for the latest installation of the `rbs` gem and adds the paths for the core and stdlib RBS definitions + # to the list of paths. This method does not require `rbs` to be a part of the bundle. It searches for whatever + # latest installation of `rbs` exists in the system and fails silently if we can't find one + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:77 + sig { params(paths: T::Array[String]).void } + def add_core_rbs_definition_paths(paths); end + + # Gathers the paths we have to index for all workspace dependencies + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:53 + sig { params(paths: T::Array[String]).void } + def add_workspace_dependency_paths(paths); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def initialize_clone(_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def initialize_copy(_arg0); end + + class << self + # Creates a new graph with the loaded configuration. For use cases where the graph must be shared between + # different tools, do not use this. Create and own a `Config` object instead. + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:15 + sig { params(workspace_path: String).returns(T.attached_class) } + def configure_for_workspace(workspace_path); end + end +end + +# pkg:gem/rubydex#lib/rubydex/graph.rb:8 +Rubydex::Graph::INDEXABLE_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# Represents `include SomeModule` +# +# pkg:gem/rubydex#lib/rubydex/mixin.rb:15 +class Rubydex::Include < ::Rubydex::Mixin; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::InstanceVariable < ::Rubydex::Declaration + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[T.untyped]) } + def references; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::InstanceVariableDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex/failures.rb:14 +class Rubydex::IntegrityFailure < ::Rubydex::Failure; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Keyword + # pkg:gem/rubydex#lib/rubydex/keyword.rb:12 + sig { params(name: String, documentation: String).void } + def initialize(name, documentation); end + + # pkg:gem/rubydex#lib/rubydex/keyword.rb:9 + sig { returns(String) } + def documentation; end + + # pkg:gem/rubydex#lib/rubydex/keyword.rb:6 + sig { returns(String) } + def name; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::KeywordParameter + # pkg:gem/rubydex#lib/rubydex/keyword_parameter.rb:9 + sig { params(name: String).void } + def initialize(name); end + + # pkg:gem/rubydex#lib/rubydex/keyword_parameter.rb:6 + sig { returns(String) } + def name; end +end + +module Rubydex::Linter; end + +# Base class for semantic lint rules, which collect their diagnostics by walking a resolved graph. +class Rubydex::Linter::CustomRule < Rubydex::Rule + abstract! + + sig { params(graph: Rubydex::Graph, config: Rubydex::LinterConfig).void } + def initialize(graph, config:); end + + sig do + params( + message: String, + location: Rubydex::Location, + related_information: T::Array[Rubydex::RelatedInformation] + ).void + end + def add_diagnostic(message, location, related_information: []); end + + sig { params(base_name: String).returns(T::Enumerable[Rubydex::Class]) } + def child_classes(base_name); end + + sig { returns(Rubydex::LinterConfig) } + def config; end + + sig { params(definition: Rubydex::Definition).returns(Rubydex::Location) } + def diagnostic_location(definition); end + + sig { returns(T::Array[Rubydex::Diagnostic]) } + def diagnostics; end + + sig { returns(Rubydex::Graph) } + def graph; end + + sig { abstract.void } + def lint; end + + sig { params(namespace: Rubydex::Namespace, method_name: String).returns(Rubydex::Method) } + def required_method(namespace, method_name); end + + sig { params(name: String).returns(Rubydex::Namespace) } + def required_namespace(name); end + + sig { returns(String) } + def rule_name; end +end + +module Rubydex::Linter::Helpers; end + +module Rubydex::Linter::Helpers::PathHelpers + extend T::Helpers + + requires_ancestor { Rubydex::Linter::CustomRule } + + sig { params(definition: Rubydex::Definition).returns(T.nilable(String)) } + def path_for_definition(definition); end + + sig { params(path: String, patterns: T::Array[String]).returns(T::Boolean) } + def path_matches_patterns?(path, patterns); end + + sig do + params( + definitions: T::Enumerable[Rubydex::Definition], + excluded_patterns: T::Array[String] + ).returns(T::Array[Rubydex::Definition]) + end + def reject_definitions_in_paths(definitions, excluded_patterns); end + + sig do + params( + definitions: T::Enumerable[Rubydex::Definition], + patterns: T::Array[String] + ).returns(T::Array[Rubydex::Definition]) + end + def select_definitions_in_paths(definitions, patterns); end + + sig { params(path: String).returns(T::Boolean) } + def test_path?(path); end + + class << self + sig { params(location: Rubydex::Location, workspace: String).returns(String) } + def display_path(location, workspace:); end + + sig { params(path: String, patterns: T::Array[String], workspace: String, flags: Integer).returns(T::Boolean) } + def path_matches_patterns?(path, patterns, workspace:, flags: 0); end + end + + EXCLUDE_FNMATCH_FLAGS = T.let(T.unsafe(nil), Integer) + TEST_PATHS = T.let(T.unsafe(nil), T::Array[String]) +end + +module Rubydex::Linter::Helpers::SourceAccessHelpers + sig { params(uri: String).returns(Rubydex::Location) } + def file_location(uri); end + + sig { params(uri: String).returns(String) } + def path_for_uri(uri); end + + sig { params(location: Rubydex::Location).returns(T.nilable(String)) } + def source_for_location(location); end +end + +class Rubydex::Linter::MissingGraphDependencyError < StandardError + sig { params(rule_name: String, dependency: String).void } + def initialize(rule_name, dependency); end +end + +class Rubydex::Linter::RuleLoadError < StandardError; end + +class Rubydex::Linter::RuleLoader + class << self + sig { params(workspace_path: String).void } + def load(workspace_path); end + end + + RULE_GLOB = T.let(T.unsafe(nil), String) +end + +module Rubydex::Linter::Rules; end + +class Rubydex::Linter::Rules::RuleStructure < Rubydex::Linter::CustomRule + include Rubydex::Linter::Helpers::SourceAccessHelpers + + sig { override.void } + def lint; end + + class << self + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end + + BASE_RULE_NAME = T.let(T.unsafe(nil), String) + RULE_FILE_PATTERNS = T.let(T.unsafe(nil), T::Array[String]) + RULE_NAMESPACE = T.let(T.unsafe(nil), String) + TEST_FILE_PATTERNS = T.let(T.unsafe(nil), T::Array[String]) +end + +class Rubydex::Linter::Runner + sig do + params( + graph: Rubydex::Graph, + custom_rules: T::Array[T.class_of(Rubydex::Linter::CustomRule)], + config: Rubydex::LinterConfig + ).void + end + def initialize(graph, custom_rules:, config:); end + + sig { returns(T::Array[T.class_of(Rubydex::Linter::CustomRule)]) } + def custom_rules; end + + sig { returns(Rubydex::Graph) } + def graph; end + + sig { returns(T::Array[Rubydex::Diagnostic]) } + def run; end +end + +# The linter's settings, read from the `[linter]` section of the configuration file. +# +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::LinterConfig + # pkg:gem/rubydex#lib/rubydex/config.rb:13 + sig { params(rules: T::Hash[String, Rubydex::RuleConfig]).void } + def initialize(rules); end + + # pkg:gem/rubydex#lib/rubydex/config.rb:25 + sig { params(rule_class: T.class_of(Rubydex::Rule)).returns(T::Array[String]) } + def excludes_for(rule_class); end + + # pkg:gem/rubydex#lib/rubydex/config.rb:19 + sig { params(rule_class: T.class_of(Rubydex::Rule)).returns(T::Boolean) } + def rule_enabled?(rule_class); end + + # The configured rules, keyed by rule name. Only rules the configuration file mentions appear here, so a rule that + # was never configured is absent rather than present with its defaults. + # + # pkg:gem/rubydex#lib/rubydex/config.rb:10 + def rules; end + + # pkg:gem/rubydex#lib/rubydex/config.rb:30 + sig { params(rule_class: T.class_of(Rubydex::Rule)).returns(T.nilable(T.class_of(Rubydex::Severity::Base))) } + def severity_for(rule_class); end +end + +# A zero based internal location. Intended to be used for tool-to-tool communication, such as a language server +# communicating with an editor. +# +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Location + include ::Comparable + + # pkg:gem/rubydex#lib/rubydex/location.rb:31 + sig { params(uri: String, start_line: Integer, end_line: Integer, start_column: Integer, end_column: Integer).void } + def initialize(uri:, start_line:, end_line:, start_column:, end_column:); end + + # pkg:gem/rubydex#lib/rubydex/location.rb:54 + sig { params(other: T.untyped).returns(T.nilable(Integer)) } + def <=>(other); end + + # pkg:gem/rubydex#lib/rubydex/location.rb:61 + sig { returns([String, Integer, Integer, Integer, Integer]) } + def comparable_values; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:15 + sig { returns(Integer) } + def end_column; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:15 + sig { returns(Integer) } + def end_line; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:15 + sig { returns(Integer) } + def start_column; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:15 + sig { returns(Integer) } + def start_line; end + + # Turns this zero based location into a one based location for display purposes. + # + # pkg:gem/rubydex#lib/rubydex/location.rb:68 + sig { returns(Rubydex::DisplayLocation) } + def to_display; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:40 + sig { returns(String) } + def to_file_path; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:79 + sig { returns(String) } + def to_s; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:12 + sig { returns(String) } + def uri; end + + class << self + # pkg:gem/rubydex#lib/rubydex/location.rb:19 + sig { params(prism_location: Prism::Location, uri: String).returns(Rubydex::Location) } + def from_prism(prism_location, uri:); end + end +end + +# pkg:gem/rubydex#lib/rubydex/location.rb:7 +class Rubydex::Location::NotFileUriError < ::StandardError; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Method < ::Rubydex::Declaration + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::MethodReference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::MethodAliasDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Signature]) } + def signatures; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.nilable(Rubydex::Method)) } + def target; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::MethodDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Signature]) } + def signatures; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::MethodReference < ::Rubydex::Reference + # pkg:gem/rubydex#lib/rubydex.rb:14 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Rubydex::Document) } + def document; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def name; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.nilable(Rubydex::Declaration)) } + def receiver; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::MethodVisibilityDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex/mixin.rb:4 +class Rubydex::Mixin + abstract! + + # pkg:gem/rubydex#lib/rubydex/mixin.rb:9 + sig { params(constant_reference: Rubydex::ConstantReference).void } + def initialize(constant_reference); end + + # pkg:gem/rubydex#lib/rubydex/mixin.rb:6 + def constant_reference; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Module < ::Rubydex::Namespace + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ModuleDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Mixin]) } + def mixins; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def raw_name; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Namespace < ::Rubydex::Declaration + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::Namespace]) } + def ancestors; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::Namespace]) } + def descendants; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def find_member(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex/declaration.rb:25 + sig { params(ancestor_names: String).returns(T::Boolean) } + def has_ancestor?(*ancestor_names); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(name: String).returns(T.nilable(Rubydex::Declaration)) } + def member(name); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::Declaration]) } + def members; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Enumerable[Rubydex::ConstantReference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T.nilable(Rubydex::SingletonClass)) } + def singleton_class; end +end + +# Represents `prepend SomeModule` +# +# pkg:gem/rubydex#lib/rubydex/mixin.rb:18 +class Rubydex::Prepend < ::Rubydex::Mixin; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Query + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(graph: Rubydex::Graph).returns(Rubydex::Query::Result) } + def run(graph); end + + class << self + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(query: String).returns(Rubydex::Query) } + def parse(query); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(format: T.any(String, Symbol)).returns(String) } + def schema(format = :table); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +# The columns and rows produced by one run of a query. Enumerable over its rows. +class Rubydex::Query::Result + include ::Enumerable + include Enumerable + extend T::Generic + + Elem = type_member { { fixed: T::Hash[String, T.untyped] } } + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[String]) } + def columns; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def each; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Boolean) } + def empty?; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Integer) } + def length; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { params(format: T.any(String, Symbol)).returns(String) } + def render(format = :table); end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[T::Hash[String, T.untyped]]) } + def rows; end + + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Integer) } + def size; end + + class << self + # A result only comes from `Query#run`. The C extension undefines `new`, so a call raises. + sig { returns(T.noreturn) } + def new; end + end +end + +# Raised when a Cypher query cannot be parsed or cannot run. `Rubydex::Query` raises one of its +# subclasses; rescue this class to catch either. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:27 +class Rubydex::QueryError < ::Rubydex::Error; end + +# Raised by `Query#run` when a parsed query fails while it runs against a graph, for example +# because it names an unknown property or relationship type. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:34 +class Rubydex::QueryExecutionError < ::Rubydex::QueryError; end + +# Raised by `Query.parse` when the query is not valid Cypher. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:30 +class Rubydex::QuerySyntaxError < ::Rubydex::QueryError; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Reference + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex/reference.rb:6 + def location; end + + class << self + private + + # pkg:gem/rubydex#lib/rubydex.rb:14 + def new(*_arg0); end + end +end + +# pkg:gem/rubydex#lib/rubydex/related_information.rb:4 +class Rubydex::RelatedInformation + # pkg:gem/rubydex#lib/rubydex/related_information.rb:12 + sig { params(message: String, location: Rubydex::Location).void } + def initialize(message, location); end + + # pkg:gem/rubydex#lib/rubydex/related_information.rb:9 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex/related_information.rb:6 + sig { returns(String) } + def message; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::ResolvedConstantReference < ::Rubydex::ConstantReference + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(Rubydex::Declaration) } + def declaration; end +end + +# The identity of a rule. We have different mechanisms for collecting diagnostics, but they all share the same +# fundamental identity: a unique name and a default severity that may be overridden by the user's configuration. +# +# By keeping this identity concept unified, we are able to treat rules consistently regardless of whether they were +# collected by the graph during the analysis or by the linter afterwards. +# +# @abstract +# +# pkg:gem/rubydex#lib/rubydex/rule.rb:11 +class Rubydex::Rule + abstract! + + class << self + abstract! + + # @abstract + # + # pkg:gem/rubydex#lib/rubydex/rule.rb:21 + sig { abstract.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + + # pkg:gem/rubydex#lib/rubydex/rule.rb:14 + sig { returns(String) } + def rule_name; end + + # Returns the resolved severity of the rule based on the given configuration. + # + # pkg:gem/rubydex#lib/rubydex/rule.rb:28 + sig { params(config: Rubydex::LinterConfig).returns(T.class_of(Rubydex::Severity::Base)) } + def severity(config); end + end +end + +# The settings of a single linter rule, read from a `[linter.rules.RuleName]` table. +# +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::RuleConfig + # pkg:gem/rubydex#lib/rubydex/config.rb:47 + sig do + params( + name: String, + enabled: T::Boolean, + exclude_patterns: T::Array[String], + severity: T.nilable(T.class_of(Rubydex::Severity::Base)) + ).void + end + def initialize(name, enabled, exclude_patterns = [], severity = nil); end + + # pkg:gem/rubydex#lib/rubydex/config.rb:55 + sig { returns(T::Boolean) } + def enabled?; end + + # pkg:gem/rubydex#lib/rubydex/config.rb:41 + def exclude_patterns; end + + # pkg:gem/rubydex#lib/rubydex/config.rb:38 + def name; end + + # pkg:gem/rubydex#lib/rubydex/config.rb:44 + def severity; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +module Rubydex::Rules; end + +# Dynamic ancestor references cannot be reasoned about statically because they depend on runtime values. The +# program may still be valid, but the quality of the analysis degrades. In the case of ancestors, since they +# influence constant resolution, the degradation may be more impactful than other dynamic references. +# +# ```ruby +# class Foo < var +# ^^^ Dynamic ancestor reference. This might be correct, but it cannot be understood by the analysis. +# include SomeClass.method_call +# ^^^^^^^^^^^^^^^^^^^^^ Dynamic ancestor reference. +# end +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/dynamic_ancestor.rb:19 +class Rubydex::Rules::DynamicAncestor < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/dynamic_ancestor.rb:23 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# Dynamic constant references cannot be reasoned about statically because they depend on runtime values. The +# program may still be valid, but the quality of the analysis degrades. +# +# ```ruby +# var::Foo +# ^^^^^^^^ Dynamic constant reference. This might be correct, but it cannot be understood by the analysis. +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/dynamic_constant_reference.rb:15 +class Rubydex::Rules::DynamicConstantReference < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/dynamic_constant_reference.rb:19 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# Dynamic singleton targets cannot be reasoned about statically because they depend on runtime values. The program +# may still be valid, but the quality of the analysis degrades. +# +# ```ruby +# class << var +# ^^^ Dynamic singleton target. This might be correct, but it cannot be understood by the analysis. +# end +# +# def var.bar +# ^^^ Dynamic singleton target. +# end +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/dynamic_singleton_definition.rb:20 +class Rubydex::Rules::DynamicSingletonDefinition < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/dynamic_singleton_definition.rb:24 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# Constant visibility operations that depend on dynamic values cannot be reasoned about statically because they +# depend on runtime values. The program may still be valid, but the quality of the analysis degrades. +# +# ```ruby +# var.private_constant :Foo +# ^^^ Invalid constant visibility. This might be correct, but it cannot be understood by the analysis. +# +# private_constant(var) +# ^^^ Invalid constant visibility. +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/invalid_constant_visibility.rb:18 +class Rubydex::Rules::InvalidConstantVisibility < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/invalid_constant_visibility.rb:22 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# Method visibility operations that depend on dynamic values cannot be reasoned about statically because they +# depend on runtime values. The program may still be valid, but the quality of the analysis degrades. +# +# ```ruby +# var.private :foo +# ^^^ Invalid method visibility. This might be correct, but it cannot be understood by the analysis. +# +# private(var) +# ^^^ Invalid method visibility. +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/invalid_method_visibility.rb:18 +class Rubydex::Rules::InvalidMethodVisibility < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/invalid_method_visibility.rb:22 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# A parse error represents invalid Ruby syntax and a program that will fail to execute. For example, a missing +# `end`, an unterminated string, a missing parenthesis. +# +# ```ruby +# class Foo +# ^^^^^ Syntax error. Missing end token +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/parse_error.rb:15 +class Rubydex::Rules::ParseError < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/parse_error.rb:19 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# Parse warnings represent code that has valid syntax, but may not do what the developer expects. For example, +# local variables that are completely unused or usage in a void context (creating a line of code that does +# nothing). +# +# ```ruby +# CONST = 1 +# CONST +# ^^^^^ Constant used in void context (the expression does nothing). +# puts CONST + 2 +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/parse_warning.rb:18 +class Rubydex::Rules::ParseWarning < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/parse_warning.rb:22 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# The top level of a Ruby program is the special
object. It is not possible to use `include self` or +# `extend self` on that object. +# +# ```ruby +# include self +# ^^^^ Cannot include self at the top level +# extend self +# ^^^^ Cannot extend self at the top level +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/top_level_mixin_self.rb:17 +class Rubydex::Rules::TopLevelMixinSelf < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/top_level_mixin_self.rb:21 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# Undefined constant visibility target means the analysis couldn't find the definition for the constant the code is +# attempting to change visibility of. It could be defined through meta-programming or it indeed does not exist. +# +# ```ruby +# class Foo +# private_constant :Bar +# ^^^ Undefined constant visibility target. The constant `Bar` is not defined. +# end +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/undefined_constant_visibility_target.rb:17 +class Rubydex::Rules::UndefinedConstantVisibilityTarget < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/undefined_constant_visibility_target.rb:21 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# Undefined method visibility target means the analysis couldn't find the definition for the method the code is +# attempting to change visibility of. It could be defined through meta-programming or it indeed does not exist. +# +# ```ruby +# class Foo +# private :bar +# ^^^ Undefined method visibility target. The method `bar` is not defined. +# end +# ``` +# +# pkg:gem/rubydex#lib/rubydex/rules/undefined_method_visibility_target.rb:17 +class Rubydex::Rules::UndefinedMethodVisibilityTarget < ::Rubydex::Rule + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/rules/undefined_method_visibility_target.rb:21 + sig { override.returns(T.class_of(Rubydex::Severity::Base)) } + def default_severity; end + end +end + +# pkg:gem/rubydex#lib/rubydex/severity.rb:4 +module Rubydex::Severity + class << self + # pkg:gem/rubydex#lib/rubydex/severity.rb:62 + sig { params(value: Symbol).returns(T.class_of(Rubydex::Severity::Base)) } + def from_value(value); end + end +end + +# All severities order based on their importance. +# +# pkg:gem/rubydex#lib/rubydex/severity.rb:57 +Rubydex::Severity::ALL = T.let(T.unsafe(nil), Array) + +# @abstract +# +# pkg:gem/rubydex#lib/rubydex/severity.rb:6 +class Rubydex::Severity::Base + abstract! + + class << self + # @abstract + # + # pkg:gem/rubydex#lib/rubydex/severity.rb:10 + sig { returns(Symbol) } + def value; end + end +end + +# pkg:gem/rubydex#lib/rubydex/severity.rb:16 +class Rubydex::Severity::Error < ::Rubydex::Severity::Base + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/severity.rb:20 + def value; end + end +end + +# pkg:gem/rubydex#lib/rubydex/severity.rb:46 +class Rubydex::Severity::Hint < ::Rubydex::Severity::Base + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/severity.rb:50 + def value; end + end +end + +# pkg:gem/rubydex#lib/rubydex/severity.rb:36 +class Rubydex::Severity::Information < ::Rubydex::Severity::Base + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/severity.rb:40 + def value; end + end +end + +# pkg:gem/rubydex#lib/rubydex/severity.rb:58 +Rubydex::Severity::VALUE_MAP = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubydex#lib/rubydex/severity.rb:26 +class Rubydex::Severity::Warning < ::Rubydex::Severity::Base + class << self + # @override + # + # pkg:gem/rubydex#lib/rubydex/severity.rb:30 + def value; end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature + # pkg:gem/rubydex#lib/rubydex/signature.rb:33 + sig { params(parameters: T::Array[Rubydex::Signature::Parameter]).void } + def initialize(parameters); end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:128 + sig { returns(T.nilable(Rubydex::Signature::BlockParameter)) } + def block_parameter; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:38 + sig do + returns([ + T::Array[Rubydex::Signature::PositionalParameter], + T::Array[Rubydex::Signature::OptionalPositionalParameter], + T.nilable(Rubydex::Signature::RestPositionalParameter), + T::Array[Rubydex::Signature::PostParameter], + T::Array[Rubydex::Signature::KeywordParameter], + T::Array[Rubydex::Signature::OptionalKeywordParameter], + T.nilable(Rubydex::Signature::RestKeywordParameter), + T.nilable(Rubydex::Signature::ForwardParameter), + T.nilable(Rubydex::Signature::BlockParameter), + ]) + end + def deconstruct; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:80 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:125 + sig { returns(T.nilable(Rubydex::Signature::ForwardParameter)) } + def forward_parameter; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:116 + sig { returns(T::Array[Rubydex::Signature::KeywordParameter]) } + def keyword_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:119 + sig { returns(T::Array[Rubydex::Signature::OptionalKeywordParameter]) } + def optional_keyword_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:107 + sig { returns(T::Array[Rubydex::Signature::OptionalPositionalParameter]) } + def optional_positional_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:30 + sig { returns(T::Array[Rubydex::Signature::Parameter]) } + def parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:104 + sig { returns(T::Array[Rubydex::Signature::PositionalParameter]) } + def positional_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:113 + sig { returns(T::Array[Rubydex::Signature::PostParameter]) } + def post_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:122 + sig { returns(T.nilable(Rubydex::Signature::RestKeywordParameter)) } + def rest_keyword_parameter; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:110 + sig { returns(T.nilable(Rubydex::Signature::RestPositionalParameter)) } + def rest_positional_parameter; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::BlockParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex/signature.rb:66 +Rubydex::Signature::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::ForwardParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::KeywordParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::OptionalKeywordParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::OptionalPositionalParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::Parameter + # pkg:gem/rubydex#lib/rubydex/signature.rb:13 + sig { params(name: Symbol, location: Rubydex::Location).void } + def initialize(name, location); end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:10 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:7 + sig { returns(Symbol) } + def name; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::PositionalParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::PostParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::RestKeywordParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Signature::RestPositionalParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::SingletonClass < ::Rubydex::Namespace + # pkg:gem/rubydex#lib/rubydex/declaration.rb:40 + sig { returns(Rubydex::Declaration) } + def attached_class; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::SingletonClassDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(T::Array[Rubydex::Mixin]) } + def mixins; end +end + +# Raised by `Skill.load` when the file cannot be read, is missing frontmatter, has malformed YAML, or lacks the +# required `name` or `description` fields. +# Every failure to produce a Skill is a `SkillError`, so a caller rescues one class instead +# of the union of what `File.read` and Psych happen to raise. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:17 +class Rubydex::SkillError < ::Rubydex::Error; end + +# Raised when a query result names a node that the graph no longer holds, because the graph +# changed after the query ran. Reading the rows would silently turn that column from a +# `Declaration`, `Definition`, or `Document` handle into a plain String, so it raises instead. +# `render`, `columns`, `size`, and `empty?` still work, because they read the executed result set +# and never touch the graph. +# +# The check runs while a row is built, so it covers the rows that a walk has not reached yet. Two +# cases fall outside it: +# +# - A handle that a walk already handed out. Such a handle resolves against the graph on each +# call, so a later change to the graph can make it stale. Handles from `Graph#[]` share that +# property. This error says nothing about them. +# - A re-index that keeps the ids. A declaration id comes from the name, so a file indexed again +# under the same names still resolves, and this error does not fire, even though the +# definitions and ancestors behind that name may differ. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:51 +class Rubydex::StaleQueryResultError < ::Rubydex::QueryError; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::Todo < ::Rubydex::Namespace; end + +# Raised by `SkillRegistry.load` when the skill directory doesn't exist. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:23 +class Rubydex::UnknownSkillDirectoryError < ::Rubydex::SkillError; end + +# Raised by `SkillRegistry#fetch` when the library has no skill under the requested id. +# +# pkg:gem/rubydex#lib/rubydex/errors.rb:20 +class Rubydex::UnknownSkillError < ::Rubydex::SkillError; end + +# pkg:gem/rubydex#lib/rubydex.rb:14 +class Rubydex::UnresolvedConstantReference < ::Rubydex::ConstantReference + # pkg:gem/rubydex#lib/rubydex.rb:14 + sig { returns(String) } + def name; end +end + +# pkg:gem/rubydex#lib/rubydex/version.rb:4 +Rubydex::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubydex#lib/rubydex/declaration.rb:4 +module Rubydex::Visibility + # pkg:gem/rubydex#lib/rubydex/declaration.rb:9 + def private?; end + + # pkg:gem/rubydex#lib/rubydex/declaration.rb:12 + def protected?; end + + # pkg:gem/rubydex#lib/rubydex/declaration.rb:6 + def public?; end +end diff --git a/sorbet/rbi/gems/spoom@1.8.2.rbi b/sorbet/rbi/gems/spoom@1.8.10.rbi similarity index 83% rename from sorbet/rbi/gems/spoom@1.8.2.rbi rename to sorbet/rbi/gems/spoom@1.8.10.rbi index 809a266..2cab25f 100644 --- a/sorbet/rbi/gems/spoom@1.8.2.rbi +++ b/sorbet/rbi/gems/spoom@1.8.10.rbi @@ -173,6 +173,11 @@ module Spoom::Cli::Helper def yellow(string); end end +# Color used to highlight expressions in backticks +# +# pkg:gem/spoom#lib/spoom/cli/helper.rb:106 +Spoom::Cli::Helper::HIGHLIGHT_COLOR = T.let(T.unsafe(nil), Spoom::Color) + # pkg:gem/spoom#lib/spoom/cli.rb:12 class Spoom::Cli::Main < ::Thor include ::Spoom::Colorize @@ -233,23 +238,24 @@ class Spoom::Cli::Srb::Assertions < ::Thor def translate(*paths); end end -# pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:10 +# pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:12 class Spoom::Cli::Srb::Bump < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:49 + # pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:51 sig { params(directory: ::String).void } def bump(directory = T.unsafe(nil)); end + # pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:205 + sig { params(context: ::Spoom::Context, files: T::Array[::String], strictness: ::String).returns(::Tempfile) } + def create_typed_override_file(context, files, strictness); end + # pkg:gem/spoom#lib/spoom/cli/srb.rb:20 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:170 + # pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:182 def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end - - # pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:192 - def undo_changes(files, from_strictness); end end # pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:10 @@ -390,22 +396,22 @@ class Spoom::Cli::Srb::Sigs < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:229 + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:239 def exec(context, command); end - # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:95 + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:105 def export(output_path = T.unsafe(nil)); end # pkg:gem/spoom#lib/spoom/cli/srb.rb:32 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:76 + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:86 def strip(*paths); end - # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:204 + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:214 def transform_files(files, &block); end - # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:25 + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:33 def translate(*paths); end end @@ -414,10 +420,10 @@ class Spoom::Cli::Srb::Tc < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:147 + # pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:151 def colorize_message(message); end - # pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:138 + # pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:142 def format_error(error, format); end # pkg:gem/spoom#lib/spoom/cli/srb.rb:35 @@ -440,36 +446,73 @@ Spoom::Cli::Srb::Tc::SORT_ENUM = T.let(T.unsafe(nil), Array) Spoom::Cli::Srb::Tc::SORT_LOC = T.let(T.unsafe(nil), String) # pkg:gem/spoom#lib/spoom/colors.rb:5 -class Spoom::Color < ::T::Enum - enums do - BLACK = new - BLUE = new - BOLD = new - CLEAR = new - CYAN = new - GREEN = new - LIGHT_BLACK = new - LIGHT_BLUE = new - LIGHT_CYAN = new - LIGHT_GREEN = new - LIGHT_MAGENTA = new - LIGHT_RED = new - LIGHT_WHITE = new - LIGHT_YELLOW = new - MAGENTA = new - RED = new - WHITE = new - YELLOW = new - end +class Spoom::Color + # pkg:gem/spoom#lib/spoom/colors.rb:10 + sig { params(ansi_code: ::String).void } + def initialize(ansi_code); end - # pkg:gem/spoom#lib/spoom/colors.rb:30 + # pkg:gem/spoom#lib/spoom/colors.rb:7 sig { returns(::String) } def ansi_code; end end -# pkg:gem/spoom#lib/spoom/colors.rb:35 +# pkg:gem/spoom#lib/spoom/colors.rb:17 +Spoom::Color::BLACK = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:21 +Spoom::Color::BLUE = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:15 +Spoom::Color::BOLD = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:14 +Spoom::Color::CLEAR = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:23 +Spoom::Color::CYAN = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:19 +Spoom::Color::GREEN = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:26 +Spoom::Color::LIGHT_BLACK = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:30 +Spoom::Color::LIGHT_BLUE = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:32 +Spoom::Color::LIGHT_CYAN = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:28 +Spoom::Color::LIGHT_GREEN = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:31 +Spoom::Color::LIGHT_MAGENTA = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:27 +Spoom::Color::LIGHT_RED = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:33 +Spoom::Color::LIGHT_WHITE = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:29 +Spoom::Color::LIGHT_YELLOW = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:22 +Spoom::Color::MAGENTA = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:18 +Spoom::Color::RED = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:24 +Spoom::Color::WHITE = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:20 +Spoom::Color::YELLOW = T.let(T.unsafe(nil), Spoom::Color) + +# pkg:gem/spoom#lib/spoom/colors.rb:36 module Spoom::Colorize - # pkg:gem/spoom#lib/spoom/colors.rb:37 + # pkg:gem/spoom#lib/spoom/colors.rb:38 sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } def set_color(string, *color); end end @@ -571,13 +614,13 @@ end # Execution features for a context # -# pkg:gem/spoom#lib/spoom/context/exec.rb:28 +# pkg:gem/spoom#lib/spoom/context/exec.rb:43 module Spoom::Context::Exec requires_ancestor { Spoom::Context } # Run a command in this context directory # - # pkg:gem/spoom#lib/spoom/context/exec.rb:31 + # pkg:gem/spoom#lib/spoom/context/exec.rb:46 sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } def exec(command, capture_err: T.unsafe(nil)); end end @@ -673,43 +716,43 @@ end # Git features for a context # -# pkg:gem/spoom#lib/spoom/context/git.rb:32 +# pkg:gem/spoom#lib/spoom/context/git.rb:43 module Spoom::Context::Git requires_ancestor { Spoom::Context } # Run a command prefixed by `git` in this context directory # - # pkg:gem/spoom#lib/spoom/context/git.rb:35 + # pkg:gem/spoom#lib/spoom/context/git.rb:46 sig { params(command: ::String).returns(::Spoom::ExecResult) } def git(command); end # Run `git checkout` in this context directory # - # pkg:gem/spoom#lib/spoom/context/git.rb:54 + # pkg:gem/spoom#lib/spoom/context/git.rb:65 sig { params(ref: ::String).returns(::Spoom::ExecResult) } def git_checkout!(ref: T.unsafe(nil)); end # Run `git checkout -b ` in this context directory # - # pkg:gem/spoom#lib/spoom/context/git.rb:60 + # pkg:gem/spoom#lib/spoom/context/git.rb:71 sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) } def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end # Run `git add . && git commit` in this context directory # - # pkg:gem/spoom#lib/spoom/context/git.rb:70 + # pkg:gem/spoom#lib/spoom/context/git.rb:81 sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) } def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end # Get the current git branch in this context directory # - # pkg:gem/spoom#lib/spoom/context/git.rb:81 + # pkg:gem/spoom#lib/spoom/context/git.rb:92 sig { returns(T.nilable(::String)) } def git_current_branch; end # Run `git diff` in this context directory # - # pkg:gem/spoom#lib/spoom/context/git.rb:90 + # pkg:gem/spoom#lib/spoom/context/git.rb:101 sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_diff(*arg); end @@ -718,33 +761,33 @@ module Spoom::Context::Git # Warning: passing a branch will run `git init -b ` which is only available in git 2.28+. # In older versions, use `git_init!` followed by `git("checkout -b ")`. # - # pkg:gem/spoom#lib/spoom/context/git.rb:44 + # pkg:gem/spoom#lib/spoom/context/git.rb:55 sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) } def git_init!(branch: T.unsafe(nil)); end # Get the last commit in the currently checked out branch # - # pkg:gem/spoom#lib/spoom/context/git.rb:96 + # pkg:gem/spoom#lib/spoom/context/git.rb:107 sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } def git_last_commit(short_sha: T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/context/git.rb:107 + # pkg:gem/spoom#lib/spoom/context/git.rb:118 sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_log(*arg); end # Run `git push ` in this context directory # - # pkg:gem/spoom#lib/spoom/context/git.rb:113 + # pkg:gem/spoom#lib/spoom/context/git.rb:124 sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) } def git_push!(remote, ref, force: T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/context/git.rb:118 + # pkg:gem/spoom#lib/spoom/context/git.rb:129 sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_show(*arg); end # Is there uncommitted changes in this context directory? # - # pkg:gem/spoom#lib/spoom/context/git.rb:124 + # pkg:gem/spoom#lib/spoom/context/git.rb:135 sig { params(path: ::String).returns(T::Boolean) } def git_workdir_clean?(path: T.unsafe(nil)); end end @@ -1138,12 +1181,53 @@ class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap end # pkg:gem/spoom#lib/spoom/coverage/d3.rb:101 -class Spoom::Coverage::D3::ColorPalette < ::T::Struct - prop :ignore, ::String - prop :false, ::String - prop :true, ::String - prop :strict, ::String - prop :strong, ::String +class Spoom::Coverage::D3::ColorPalette + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:124 + sig do + params( + ignore_color: ::String, + false_color: ::String, + true_color: ::String, + strict_color: ::String, + strong_color: ::String + ).void + end + def initialize(ignore_color:, false_color:, true_color:, strict_color:, strong_color:); end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:106 + sig { returns(::String) } + def false_color; end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:106 + def false_color=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:103 + sig { returns(::String) } + def ignore_color; end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:103 + def ignore_color=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:112 + sig { returns(::String) } + def strict_color; end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:112 + def strict_color=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:115 + sig { returns(::String) } + def strong_color; end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:115 + def strong_color=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:109 + sig { returns(::String) } + def true_color; end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:109 + def true_color=(_arg0); end end # @abstract @@ -1485,41 +1569,184 @@ class Spoom::Coverage::Report < ::Spoom::Coverage::Page end # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:6 -class Spoom::Coverage::Snapshot < ::T::Struct - prop :timestamp, ::Integer, default: T.unsafe(nil) - prop :version_static, T.nilable(::String), default: T.unsafe(nil) - prop :version_runtime, T.nilable(::String), default: T.unsafe(nil) - prop :duration, ::Integer, default: T.unsafe(nil) - prop :commit_sha, T.nilable(::String), default: T.unsafe(nil) - prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil) - prop :files, ::Integer, default: T.unsafe(nil) - prop :rbi_files, ::Integer, default: T.unsafe(nil) - prop :modules, ::Integer, default: T.unsafe(nil) - prop :classes, ::Integer, default: T.unsafe(nil) - prop :singleton_classes, ::Integer, default: T.unsafe(nil) - prop :methods_without_sig, ::Integer, default: T.unsafe(nil) - prop :methods_with_sig, ::Integer, default: T.unsafe(nil) - prop :calls_untyped, ::Integer, default: T.unsafe(nil) - prop :calls_typed, ::Integer, default: T.unsafe(nil) - prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil) - prop :methods_with_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) - prop :methods_without_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) - prop :sigils_excluding_rbis, T::Hash[::String, ::Integer], default: T.unsafe(nil) - - # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:31 +class Spoom::Coverage::Snapshot + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:85 + sig do + params( + timestamp: ::Integer, + version_static: T.nilable(::String), + version_runtime: T.nilable(::String), + duration: ::Integer, + commit_sha: T.nilable(::String), + commit_timestamp: T.nilable(::Integer), + files: ::Integer, + rbi_files: ::Integer, + modules: ::Integer, + classes: ::Integer, + singleton_classes: ::Integer, + methods_without_sig: ::Integer, + methods_with_sig: ::Integer, + calls_untyped: ::Integer, + calls_typed: ::Integer, + sigils: T::Hash[::String, ::Integer], + methods_with_sig_excluding_rbis: ::Integer, + methods_without_sig_excluding_rbis: ::Integer, + sigils_excluding_rbis: T::Hash[::String, ::Integer] + ).void + end + def initialize(timestamp: T.unsafe(nil), version_static: T.unsafe(nil), version_runtime: T.unsafe(nil), duration: T.unsafe(nil), commit_sha: T.unsafe(nil), commit_timestamp: T.unsafe(nil), files: T.unsafe(nil), rbi_files: T.unsafe(nil), modules: T.unsafe(nil), classes: T.unsafe(nil), singleton_classes: T.unsafe(nil), methods_without_sig: T.unsafe(nil), methods_with_sig: T.unsafe(nil), calls_untyped: T.unsafe(nil), calls_typed: T.unsafe(nil), sigils: T.unsafe(nil), methods_with_sig_excluding_rbis: T.unsafe(nil), methods_without_sig_excluding_rbis: T.unsafe(nil), sigils_excluding_rbis: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:50 + sig { returns(::Integer) } + def calls_typed; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:50 + def calls_typed=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:47 + sig { returns(::Integer) } + def calls_untyped; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:47 + def calls_untyped=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:35 + sig { returns(::Integer) } + def classes; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:35 + def classes=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:20 + sig { returns(T.nilable(::String)) } + def commit_sha; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:20 + def commit_sha=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:23 + sig { returns(T.nilable(::Integer)) } + def commit_timestamp; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:23 + def commit_timestamp=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:17 + sig { returns(::Integer) } + def duration; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:17 + def duration=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:26 + sig { returns(::Integer) } + def files; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:26 + def files=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:44 + sig { returns(::Integer) } + def methods_with_sig; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:44 + def methods_with_sig=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:56 + sig { returns(::Integer) } + def methods_with_sig_excluding_rbis; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:56 + def methods_with_sig_excluding_rbis=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:41 + sig { returns(::Integer) } + def methods_without_sig; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:41 + def methods_without_sig=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:59 + sig { returns(::Integer) } + def methods_without_sig_excluding_rbis; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:59 + def methods_without_sig_excluding_rbis=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:32 + sig { returns(::Integer) } + def modules; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:32 + def modules=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:131 sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:37 + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:29 + sig { returns(::Integer) } + def rbi_files; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:29 + def rbi_files=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:53 + sig { returns(T::Hash[::String, ::Integer]) } + def sigils; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:53 + def sigils=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:62 + sig { returns(T::Hash[::String, ::Integer]) } + def sigils_excluding_rbis; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:62 + def sigils_excluding_rbis=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:38 + sig { returns(::Integer) } + def singleton_classes; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:38 + def singleton_classes=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:8 + sig { returns(::Integer) } + def timestamp; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:8 + def timestamp=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:143 + sig { returns(T::Hash[::String, T.untyped]) } + def to_h; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:137 sig { params(arg: T.untyped).returns(::String) } def to_json(*arg); end + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:14 + sig { returns(T.nilable(::String)) } + def version_runtime; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:14 + def version_runtime=(_arg0); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:11 + sig { returns(T.nilable(::String)) } + def version_static; end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:11 + def version_static=(_arg0); end + class << self - # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:43 + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:169 sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) } def from_json(json); end - # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:48 + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:174 sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end end @@ -1527,22 +1754,22 @@ end # The strictness name as found in the Sorbet metrics file # -# pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:28 +# pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:128 Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) -# pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:91 +# pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:217 class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer - # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:93 + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:219 sig { params(snapshot: ::Spoom::Coverage::Snapshot).void } def print_snapshot(snapshot); end private - # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:152 + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:278 sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) } def percent(value, total); end - # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:141 + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:267 sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void } def print_map(hash, total); end end @@ -1594,83 +1821,137 @@ Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set) # A definition is a class, module, method, constant, etc. being defined in the code # # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:7 -class Spoom::Deadcode::Definition < ::T::Struct - const :kind, ::Spoom::Deadcode::Definition::Kind - const :name, ::String - const :full_name, ::String - const :location, ::Spoom::Location - const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) - - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:76 +class Spoom::Deadcode::Definition + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:53 + sig do + params( + kind: ::Spoom::Deadcode::Definition::Kind, + name: ::String, + full_name: ::String, + location: ::Spoom::Location, + status: ::Spoom::Deadcode::Definition::Status + ).void + end + def initialize(kind:, name:, full_name:, location:, status: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:101 sig { void } def alive!; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:71 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:96 sig { returns(T::Boolean) } def alive?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:39 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:64 sig { returns(T::Boolean) } def attr_reader?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:44 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:69 sig { returns(T::Boolean) } def attr_writer?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:49 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:74 sig { returns(T::Boolean) } def class?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:54 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:79 sig { returns(T::Boolean) } def constant?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:81 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:106 sig { returns(T::Boolean) } def dead?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:91 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:44 + sig { returns(::String) } + def full_name; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:116 sig { void } def ignored!; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:86 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:111 sig { returns(T::Boolean) } def ignored?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:59 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:38 + sig { returns(::Spoom::Deadcode::Definition::Kind) } + def kind; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:47 + sig { returns(::Spoom::Location) } + def location; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:84 sig { returns(T::Boolean) } def method?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:64 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:89 sig { returns(T::Boolean) } def module?; end - # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:98 + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:41 + sig { returns(::String) } + def name; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:50 + sig { returns(::Spoom::Deadcode::Definition::Status) } + def status; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:123 sig { params(args: T.untyped).returns(::String) } def to_json(*args); end end # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:8 -class Spoom::Deadcode::Definition::Kind < ::T::Enum - enums do - AttrReader = new - AttrWriter = new - Class = new - Constant = new - Method = new - Module = new - end -end +class Spoom::Deadcode::Definition::Kind + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:10 + sig { params(name: ::String).void } + def initialize(name); end -# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:19 -class Spoom::Deadcode::Definition::Status < ::T::Enum - enums do - ALIVE = new - DEAD = new - IGNORED = new - end + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:16 + sig { override.returns(::String) } + def to_s; end end +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:20 +Spoom::Deadcode::Definition::Kind::AttrReader = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Kind) + +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:21 +Spoom::Deadcode::Definition::Kind::AttrWriter = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Kind) + +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:22 +Spoom::Deadcode::Definition::Kind::Class = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Kind) + +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:23 +Spoom::Deadcode::Definition::Kind::Constant = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Kind) + +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:24 +Spoom::Deadcode::Definition::Kind::Method = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Kind) + +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:25 +Spoom::Deadcode::Definition::Kind::Module = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Kind) + +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:28 +class Spoom::Deadcode::Definition::Status; end + +# A definition is marked as `ALIVE` if it has at least one reference with the same name +# +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:30 +Spoom::Deadcode::Definition::Status::ALIVE = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Status) + +# A definition is marked as `DEAD` if it has no reference with the same name +# +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:32 +Spoom::Deadcode::Definition::Status::DEAD = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Status) + +# A definition can be marked as `IGNORED` if it is not relevant for the analysis +# +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:34 +Spoom::Deadcode::Definition::Status::IGNORED = T.let(T.unsafe(nil), Spoom::Deadcode::Definition::Status) + # Custom engine to handle ERB templates as used by Rails # # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:29 @@ -1679,37 +1960,42 @@ class Spoom::Deadcode::ERB < ::Erubi::Engine sig { params(input: T.untyped, properties: T.untyped).void } def initialize(input, properties = T.unsafe(nil)); end + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:44 + sig { returns(::String) } + def wrapped_src; end + private # @override # - # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:84 + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:95 sig { override.params(code: T.untyped).void } def add_code(code); end # @override # - # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:66 + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:75 sig { override.params(indicator: T.untyped, code: T.untyped).void } def add_expression(indicator, code); end # @override # - # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:91 + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:102 + sig { override.params(_: T.untyped).void } def add_postamble(_); end # @override # - # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:47 + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:56 sig { override.params(text: T.untyped).void } def add_text(text); end - # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:97 + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:108 sig { params(src: T.untyped).void } def flush_newline_if_pending(src); end end -# pkg:gem/spoom#lib/spoom/deadcode/erb.rb:62 +# pkg:gem/spoom#lib/spoom/deadcode/erb.rb:71 Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) # pkg:gem/spoom#lib/spoom/deadcode/index.rb:6 @@ -1718,19 +2004,19 @@ class Spoom::Deadcode::Index sig { params(model: ::Spoom::Model).void } def initialize(model); end - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:215 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:220 sig { returns(T::Array[::Spoom::Deadcode::Definition]) } def all_definitions; end - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:220 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:225 sig { returns(T::Array[::Spoom::Model::Reference]) } def all_references; end - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:95 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:100 sig { params(plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } def apply_plugins!(plugins); end - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:75 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:80 sig { params(definition: ::Spoom::Deadcode::Definition).void } def define(definition); end @@ -1738,7 +2024,7 @@ class Spoom::Deadcode::Index sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } def definitions; end - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:210 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:215 sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } def definitions_for_name(name); end @@ -1746,11 +2032,11 @@ class Spoom::Deadcode::Index # # To be called once all the files have been indexed and all the definitions and references discovered. # - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:118 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:123 sig { void } def finalize!; end - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:90 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:95 sig { params(symbol_def: ::Spoom::Model::SymbolDef).void } def ignore(symbol_def); end @@ -1770,11 +2056,11 @@ class Spoom::Deadcode::Index sig { returns(::Spoom::Model) } def model; end - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:80 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:85 sig { params(name: ::String, location: ::Spoom::Location).void } def reference_constant(name, location); end - # pkg:gem/spoom#lib/spoom/deadcode/index.rb:85 + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:90 sig { params(name: ::String, location: ::Spoom::Location).void } def reference_method(name, location); end @@ -2395,9 +2681,9 @@ end # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:7 class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end -# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:409 +# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:499 class Spoom::Deadcode::Remover::NodeContext - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:420 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:510 sig do params( source: ::String, @@ -2408,96 +2694,96 @@ class Spoom::Deadcode::Remover::NodeContext end def initialize(source, comments, node, nesting); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:534 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:624 sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) } def attached_comments(node); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:562 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:652 sig { returns(T.nilable(::Prism::CallNode)) } def attached_sig; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:549 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:639 sig { returns(T::Array[::Prism::Node]) } def attached_sigs; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:411 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:501 sig { returns(T::Hash[::Integer, ::Prism::Comment]) } def comments; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:522 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:612 sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) } def comments_between_lines(start_line, end_line); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:417 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:507 sig { returns(T::Array[::Prism::Node]) } def nesting; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:417 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:507 def nesting=(_arg0); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:472 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:562 sig { returns(T.nilable(::Prism::Node)) } def next_node; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:461 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:551 sig { returns(T::Array[::Prism::Node]) } def next_nodes; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:414 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:504 sig { returns(::Prism::Node) } def node; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:436 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:526 sig { returns(::Spoom::Deadcode::Remover::NodeContext) } def parent_context; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:428 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:518 sig { returns(::Prism::Node) } def parent_node; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:456 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:546 sig { returns(T.nilable(::Prism::Node)) } def previous_node; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:445 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:535 sig { returns(T::Array[::Prism::Node]) } def previous_nodes; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:477 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:567 sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } def sclass_context; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:510 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:600 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def sorbet_extend_sig?(node); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:505 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:595 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def sorbet_signature?(node); end end -# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:577 +# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:667 class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:642 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:734 sig { params(location: ::Spoom::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } def initialize(location, kind); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:636 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:728 sig { returns(T.nilable(::Prism::Node)) } def node; end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:639 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:731 sig { returns(T::Array[::Prism::Node]) } def nodes_nesting; end # @override # - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:652 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:744 sig { override.params(node: T.nilable(::Prism::Node)).void } def visit(node); end class << self - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:580 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:670 sig do params( source: ::String, @@ -2507,7 +2793,7 @@ class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor end def find(source, location, kind); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:611 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:701 sig { params(node: ::Prism::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } def node_match_kind?(node, kind); end end @@ -2535,11 +2821,17 @@ class Spoom::Deadcode::Remover::NodeRemover private - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:194 + # Whether `node` is a bare `private_constant`/`public_constant` call listing `name`. + # + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:219 + sig { params(node: ::Prism::Node, name: ::Symbol).returns(T::Boolean) } + def constant_visibility_call?(node, name); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:254 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_attr_accessor(context); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:368 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:458 sig { params(start_char: ::Integer, end_char: ::Integer).void } def delete_chars(start_char, end_char); end @@ -2547,15 +2839,29 @@ class Spoom::Deadcode::Remover::NodeRemover sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_constant_assignment(context); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:361 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:451 sig { params(start_line: ::Integer, end_line: ::Integer).void } def delete_lines(start_line, end_line); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:298 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:358 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_node_and_comments_and_sigs(context); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:255 + # Drop the `:name` symbol from a `private_constant`/`public_constant` call that lists several + # constants, keeping the call and the other names intact. + # + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:233 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext, name: ::Symbol).void } + def delete_symbol_argument(context, name); end + + # The last line occupied by `node` if it is a heredoc string (its closing terminator), or `nil` + # otherwise. + # + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:436 + sig { params(node: ::Prism::Node).returns(T.nilable(::Integer)) } + def heredoc_terminator_line(node); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:315 sig do params( node: ::Prism::Node, @@ -2579,11 +2885,30 @@ class Spoom::Deadcode::Remover::NodeRemover sig { params(def_node: ::Prism::DefNode).returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } def modifier_call_context(def_node); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:373 + # Prism reports a node ending in a heredoc as ending on the heredoc's opening line rather than + # its closing terminator (e.g. `def_node_matcher :foo, <<~PATTERN` spanning several lines). + # Return the last line the node actually occupies so the heredoc body isn't mistaken for blank + # filler, either when deleting the node itself or when accounting for the node that follows it. + # TODO: remove once Prism locations are fixed + # + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:417 + sig { params(node: T.any(::Prism::Comment, ::Prism::Node)).returns(::Integer) } + def node_end_line(node); end + + # A dead constant is often followed by a `private_constant`/`public_constant` call naming it. + # That call references the now-removed constant (a load-time `NameError` if left behind), so + # remove the reference too: delete the whole call when the constant is its only argument, or + # drop just that symbol when the call lists several constants. + # + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:200 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def remove_constant_visibility_call(context); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:463 sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void } def replace_chars(start_char, end_char, replacement); end - # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:378 + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:468 sig do params( node: ::Prism::CallNode, @@ -2597,15 +2922,29 @@ end # An abstraction to simplify handling of Prism::CallNode nodes. # # pkg:gem/spoom#lib/spoom/deadcode/send.rb:7 -class Spoom::Deadcode::Send < ::T::Struct - const :node, ::Prism::CallNode - const :name, ::String - 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 - - # pkg:gem/spoom#lib/spoom/deadcode/send.rb:16 +class Spoom::Deadcode::Send + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:34 + sig do + params( + node: ::Prism::CallNode, + name: ::String, + location: ::Spoom::Location, + recv: T.nilable(::Prism::Node), + args: T::Array[::Prism::Node], + block: T.nilable(::Prism::Node) + ).void + end + def initialize(node:, name:, location:, recv: T.unsafe(nil), args: T.unsafe(nil), block: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:18 + sig { returns(T::Array[::Prism::Node]) } + def args; end + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:21 + sig { returns(T.nilable(::Prism::Node)) } + def block; end + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:44 sig do type_parameters(:T) .params( @@ -2615,27 +2954,58 @@ class Spoom::Deadcode::Send < ::T::Struct end def each_arg(arg_type, &block); end - # pkg:gem/spoom#lib/spoom/deadcode/send.rb:23 + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:51 sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void } def each_arg_assoc(&block); end + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:24 + sig { returns(::Spoom::Location) } + def location; end + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:12 + sig { returns(::String) } + def name; end + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:9 + sig { returns(::Prism::CallNode) } + def node; end + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:15 + sig { returns(T.nilable(::Prism::Node)) } + def recv; end end # pkg:gem/spoom#lib/spoom.rb:10 class Spoom::Error < ::StandardError; end # pkg:gem/spoom#lib/spoom/context/exec.rb:7 -class Spoom::ExecResult < ::T::Struct - const :out, ::String - const :err, T.nilable(::String) - const :status, T::Boolean - const :exit_code, ::Integer +class Spoom::ExecResult + # pkg:gem/spoom#lib/spoom/context/exec.rb:21 + sig { params(out: ::String, status: T::Boolean, exit_code: ::Integer, err: T.nilable(::String)).void } + def initialize(out:, status:, exit_code:, err: T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/context/exec.rb:14 + # pkg:gem/spoom#lib/spoom/context/exec.rb:12 + sig { returns(T.nilable(::String)) } + def err; end + + # pkg:gem/spoom#lib/spoom/context/exec.rb:18 + sig { returns(::Integer) } + def exit_code; end + + # pkg:gem/spoom#lib/spoom/context/exec.rb:9 + sig { returns(::String) } + def out; end + + # pkg:gem/spoom#lib/spoom/context/exec.rb:15 + sig { returns(T::Boolean) } + def status; end + + # pkg:gem/spoom#lib/spoom/context/exec.rb:29 sig { returns(::String) } def to_s; end end -# pkg:gem/spoom#lib/spoom/file_collector.rb:5 +# pkg:gem/spoom#lib/spoom/file_collector.rb:7 class Spoom::FileCollector # Initialize a new file collector # @@ -2646,7 +3016,7 @@ class Spoom::FileCollector # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in # the list. # - # pkg:gem/spoom#lib/spoom/file_collector.rb:18 + # pkg:gem/spoom#lib/spoom/file_collector.rb:20 sig do params( allow_extensions: T::Array[::String], @@ -2656,41 +3026,41 @@ class Spoom::FileCollector end def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/file_collector.rb:7 + # pkg:gem/spoom#lib/spoom/file_collector.rb:9 sig { returns(T::Array[::String]) } def files; end - # pkg:gem/spoom#lib/spoom/file_collector.rb:31 + # pkg:gem/spoom#lib/spoom/file_collector.rb:33 sig { params(path: ::String).void } def visit_path(path); end - # pkg:gem/spoom#lib/spoom/file_collector.rb:26 + # pkg:gem/spoom#lib/spoom/file_collector.rb:28 sig { params(paths: T::Array[::String]).void } def visit_paths(paths); end private - # pkg:gem/spoom#lib/spoom/file_collector.rb:54 + # pkg:gem/spoom#lib/spoom/file_collector.rb:56 sig { params(path: ::String).returns(::String) } def clean_path(path); end - # pkg:gem/spoom#lib/spoom/file_collector.rb:71 + # pkg:gem/spoom#lib/spoom/file_collector.rb:73 sig { params(path: ::String).returns(T::Boolean) } def excluded_file?(path); end - # pkg:gem/spoom#lib/spoom/file_collector.rb:86 + # pkg:gem/spoom#lib/spoom/file_collector.rb:88 sig { params(path: ::String).returns(T::Boolean) } def excluded_path?(path); end - # pkg:gem/spoom#lib/spoom/file_collector.rb:95 + # pkg:gem/spoom#lib/spoom/file_collector.rb:97 sig { params(path: ::String).returns(T.nilable(::String)) } def mime_type_for(path); end - # pkg:gem/spoom#lib/spoom/file_collector.rb:66 + # pkg:gem/spoom#lib/spoom/file_collector.rb:68 sig { params(path: ::String).void } def visit_directory(path); end - # pkg:gem/spoom#lib/spoom/file_collector.rb:59 + # pkg:gem/spoom#lib/spoom/file_collector.rb:61 sig { params(path: ::String).void } def visit_file(path); end end @@ -2754,67 +3124,67 @@ end # A visitor that collects all the nodes in a tree # -# pkg:gem/spoom#lib/spoom/file_tree.rb:116 +# pkg:gem/spoom#lib/spoom/file_tree.rb:128 class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor - # pkg:gem/spoom#lib/spoom/file_tree.rb:121 + # pkg:gem/spoom#lib/spoom/file_tree.rb:133 sig { void } def initialize; end - # pkg:gem/spoom#lib/spoom/file_tree.rb:118 + # pkg:gem/spoom#lib/spoom/file_tree.rb:130 sig { returns(T::Array[::Spoom::FileTree::Node]) } def nodes; end # @override # - # pkg:gem/spoom#lib/spoom/file_tree.rb:128 + # pkg:gem/spoom#lib/spoom/file_tree.rb:140 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end end # A visitor that collects the typing score of each node in a tree # -# pkg:gem/spoom#lib/spoom/file_tree.rb:157 +# pkg:gem/spoom#lib/spoom/file_tree.rb:169 class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses - # pkg:gem/spoom#lib/spoom/file_tree.rb:162 + # pkg:gem/spoom#lib/spoom/file_tree.rb:174 sig { params(context: ::Spoom::Context).void } def initialize(context); end - # pkg:gem/spoom#lib/spoom/file_tree.rb:159 + # pkg:gem/spoom#lib/spoom/file_tree.rb:171 sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } def scores; end # @override # - # pkg:gem/spoom#lib/spoom/file_tree.rb:170 + # pkg:gem/spoom#lib/spoom/file_tree.rb:182 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end private - # pkg:gem/spoom#lib/spoom/file_tree.rb:179 + # pkg:gem/spoom#lib/spoom/file_tree.rb:191 sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } def node_score(node); end - # pkg:gem/spoom#lib/spoom/file_tree.rb:188 + # pkg:gem/spoom#lib/spoom/file_tree.rb:200 sig { params(strictness: T.nilable(::String)).returns(::Float) } def strictness_score(strictness); end end # A visitor that collects the strictness of each node in a tree # -# pkg:gem/spoom#lib/spoom/file_tree.rb:135 +# pkg:gem/spoom#lib/spoom/file_tree.rb:147 class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor - # pkg:gem/spoom#lib/spoom/file_tree.rb:140 + # pkg:gem/spoom#lib/spoom/file_tree.rb:152 sig { params(context: ::Spoom::Context).void } def initialize(context); end - # pkg:gem/spoom#lib/spoom/file_tree.rb:137 + # pkg:gem/spoom#lib/spoom/file_tree.rb:149 sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } def strictnesses; end # @override # - # pkg:gem/spoom#lib/spoom/file_tree.rb:148 + # pkg:gem/spoom#lib/spoom/file_tree.rb:160 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end end @@ -2822,14 +3192,34 @@ end # A node representing either a file or a directory inside a FileTree # # pkg:gem/spoom#lib/spoom/file_tree.rb:76 -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) +class Spoom::FileTree::Node + # pkg:gem/spoom#lib/spoom/file_tree.rb:92 + sig do + params( + name: ::String, + parent: T.nilable(::Spoom::FileTree::Node), + children: T::Hash[::String, ::Spoom::FileTree::Node] + ).void + end + def initialize(name:, parent: T.unsafe(nil), children: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:89 + sig { returns(T::Hash[::String, ::Spoom::FileTree::Node]) } + def children; end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:84 + sig { returns(::String) } + def name; end + + # Node parent or `nil` if the node is a root one + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:79 + sig { returns(T.nilable(::Spoom::FileTree::Node)) } + def parent; end # Full path to this node from root # - # pkg:gem/spoom#lib/spoom/file_tree.rb:88 + # pkg:gem/spoom#lib/spoom/file_tree.rb:100 sig { returns(::String) } def path; end end @@ -2838,9 +3228,9 @@ end # # See `FileTree#print` # -# pkg:gem/spoom#lib/spoom/file_tree.rb:201 +# pkg:gem/spoom#lib/spoom/file_tree.rb:213 class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor - # pkg:gem/spoom#lib/spoom/file_tree.rb:203 + # pkg:gem/spoom#lib/spoom/file_tree.rb:215 sig do params( strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], @@ -2852,13 +3242,13 @@ class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor # @override # - # pkg:gem/spoom#lib/spoom/file_tree.rb:212 + # pkg:gem/spoom#lib/spoom/file_tree.rb:224 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end private - # pkg:gem/spoom#lib/spoom/file_tree.rb:237 + # pkg:gem/spoom#lib/spoom/file_tree.rb:249 sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } def strictness_color(strictness); end end @@ -2866,39 +3256,48 @@ end # An abstract visitor for FileTree # @abstract # -# pkg:gem/spoom#lib/spoom/file_tree.rb:98 +# pkg:gem/spoom#lib/spoom/file_tree.rb:110 class Spoom::FileTree::Visitor abstract! - # pkg:gem/spoom#lib/spoom/file_tree.rb:105 + # pkg:gem/spoom#lib/spoom/file_tree.rb:117 sig { params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end - # pkg:gem/spoom#lib/spoom/file_tree.rb:110 + # pkg:gem/spoom#lib/spoom/file_tree.rb:122 sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } def visit_nodes(nodes); end - # pkg:gem/spoom#lib/spoom/file_tree.rb:100 + # pkg:gem/spoom#lib/spoom/file_tree.rb:112 sig { params(tree: ::Spoom::FileTree).void } def visit_tree(tree); end end -# pkg:gem/spoom#lib/spoom/context/git.rb:5 +# pkg:gem/spoom#lib/spoom/context/git.rb:7 module Spoom::Git; end -# pkg:gem/spoom#lib/spoom/context/git.rb:6 -class Spoom::Git::Commit < ::T::Struct - const :sha, ::String - const :time, ::Time +# pkg:gem/spoom#lib/spoom/context/git.rb:8 +class Spoom::Git::Commit + # pkg:gem/spoom#lib/spoom/context/git.rb:28 + sig { params(sha: ::String, time: ::Time).void } + def initialize(sha:, time:); end + + # pkg:gem/spoom#lib/spoom/context/git.rb:22 + sig { returns(::String) } + def sha; end + + # pkg:gem/spoom#lib/spoom/context/git.rb:25 + sig { returns(::Time) } + def time; end - # pkg:gem/spoom#lib/spoom/context/git.rb:23 + # pkg:gem/spoom#lib/spoom/context/git.rb:34 sig { returns(::Integer) } def timestamp; end class << self # Parse a line formatted as `%h %at` into a `Commit` # - # pkg:gem/spoom#lib/spoom/context/git.rb:10 + # pkg:gem/spoom#lib/spoom/context/git.rb:12 sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } def parse_line(string); end end @@ -2977,65 +3376,120 @@ class Spoom::LSP::Client def type_definitions(uri, line, column); end end -# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:165 -class Spoom::LSP::Diagnostic < ::T::Struct +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:215 +class Spoom::LSP::Diagnostic include ::Spoom::LSP::PrintableSymbol - const :range, ::Spoom::LSP::Range - const :code, ::Integer - const :message, ::String - const :information, ::Object + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:231 + sig { params(range: ::Spoom::LSP::Range, code: ::Integer, message: ::String, information: ::Object).void } + def initialize(range:, code:, message:, information:); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:187 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:252 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } def accept_printer(printer); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:192 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:222 + sig { returns(::Integer) } + def code; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:228 + sig { returns(::Object) } + def information; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:225 + sig { returns(::String) } + def message; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:219 + sig { returns(::Spoom::LSP::Range) } + def range; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:257 sig { returns(::String) } def to_s; end class << self - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:175 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:240 sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end end end -# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:197 -class Spoom::LSP::DocumentSymbol < ::T::Struct +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:262 +class Spoom::LSP::DocumentSymbol include ::Spoom::LSP::PrintableSymbol - 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] + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:291 + sig do + params( + name: ::String, + kind: ::Integer, + children: T::Array[::Spoom::LSP::DocumentSymbol], + detail: T.nilable(::String), + location: T.nilable(::Spoom::LSP::Location), + range: T.nilable(::Spoom::LSP::Range) + ).void + end + def initialize(name:, kind:, children:, detail: T.unsafe(nil), location: T.unsafe(nil), range: T.unsafe(nil)); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:223 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:316 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } def accept_printer(printer); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:255 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:281 + sig { returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def children; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:269 + sig { returns(T.nilable(::String)) } + def detail; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:272 + sig { returns(::Integer) } + def kind; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:345 sig { returns(::String) } def kind_string; end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:250 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:275 + sig { returns(T.nilable(::Spoom::LSP::Location)) } + def location; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:266 + sig { returns(::String) } + def name; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:278 + sig { returns(T.nilable(::Spoom::LSP::Range)) } + def range; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:340 sig { returns(::String) } def to_s; end + protected + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:352 + sig { returns(T::Array[T.untyped]) } + def deduplication_key; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:365 + sig { params(range: T.nilable(::Spoom::LSP::Range)).returns(T.nilable(T::Array[::Integer])) } + def range_key(range); end + class << self - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:209 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:302 sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end end end -# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:259 +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:371 Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:6 @@ -3068,49 +3522,67 @@ class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error end end -# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:74 -class Spoom::LSP::Hover < ::T::Struct +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:92 +class Spoom::LSP::Hover include ::Spoom::LSP::PrintableSymbol - const :contents, ::String - const :range, T.nilable(::Spoom::LSP::Range) + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:102 + sig { params(contents: ::String, range: T.nilable(::Spoom::LSP::Range)).void } + def initialize(contents:, range: T.unsafe(nil)); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:92 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:119 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } def accept_printer(printer); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:98 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:96 + sig { returns(::String) } + def contents; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:99 + sig { returns(T.nilable(::Spoom::LSP::Range)) } + def range; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:125 sig { returns(::String) } def to_s; end class << self - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:82 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:109 sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end end end -# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:103 -class Spoom::LSP::Location < ::T::Struct +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:130 +class Spoom::LSP::Location include ::Spoom::LSP::PrintableSymbol - const :uri, ::String - const :range, ::Spoom::LSP::Range + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:140 + sig { params(uri: ::String, range: ::Spoom::LSP::Range).void } + def initialize(uri:, range:); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:121 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:157 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } def accept_printer(printer); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:127 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:137 + sig { returns(::Spoom::LSP::Range) } + def range; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:163 sig { returns(::String) } def to_s; end + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:134 + sig { returns(::String) } + def uri; end + class << self - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:111 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:147 sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end end @@ -3120,17 +3592,17 @@ end # # The language server protocol always uses `"2.0"` as the `jsonrpc` version. # -# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:12 +# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:11 class Spoom::LSP::Message - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:14 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:13 sig { void } def initialize; end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:19 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:18 sig { returns(T::Hash[T.untyped, T.untyped]) } def as_json; end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:27 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:26 sig { params(args: T.untyped).returns(::String) } def to_json(*args); end end @@ -3139,40 +3611,49 @@ end # # A processed notification message must not send a response back. They work like events. # -# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:54 +# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:53 class Spoom::LSP::Notification < ::Spoom::LSP::Message - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:62 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:61 sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } def initialize(method, params); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:56 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:55 sig { returns(::String) } def method; end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:59 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:58 sig { returns(T::Hash[T.untyped, T.untyped]) } def params; end end # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:16 -class Spoom::LSP::Position < ::T::Struct +class Spoom::LSP::Position include ::Spoom::LSP::PrintableSymbol - const :line, ::Integer - const :char, ::Integer + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:26 + sig { params(line: ::Integer, char: ::Integer).void } + def initialize(line:, char:); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:34 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:43 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } def accept_printer(printer); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:39 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:23 + sig { returns(::Integer) } + def char; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:20 + sig { returns(::Integer) } + def line; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:48 sig { returns(::String) } def to_s; end class << self - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:24 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:33 sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end end @@ -3191,25 +3672,34 @@ module Spoom::LSP::PrintableSymbol def accept_printer(printer); end end -# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:44 -class Spoom::LSP::Range < ::T::Struct +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:53 +class Spoom::LSP::Range include ::Spoom::LSP::PrintableSymbol - const :start, ::Spoom::LSP::Position - const :end, ::Spoom::LSP::Position + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:63 + sig { params(start_pos: ::Spoom::LSP::Position, end_pos: ::Spoom::LSP::Position).void } + def initialize(start_pos:, end_pos:); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:62 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:80 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } def accept_printer(printer); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:69 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:60 + sig { returns(::Spoom::LSP::Position) } + def end_pos; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:57 + sig { returns(::Spoom::LSP::Position) } + def start_pos; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:87 sig { returns(::String) } def to_s; end class << self - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:52 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:70 sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end end @@ -3219,17 +3709,17 @@ end # # Every processed request must send a response back to the sender of the request. # -# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:35 +# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:34 class Spoom::LSP::Request < ::Spoom::LSP::Message - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:43 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:42 sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } def initialize(id, method, params); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:37 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:36 sig { returns(::Integer) } def id; end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:40 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:39 sig { returns(T::Hash[T.untyped, T.untyped]) } def params; end end @@ -3255,34 +3745,50 @@ class Spoom::LSP::ResponseError < ::Spoom::LSP::Error end end -# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:132 -class Spoom::LSP::SignatureHelp < ::T::Struct +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:168 +class Spoom::LSP::SignatureHelp include ::Spoom::LSP::PrintableSymbol - const :label, T.nilable(::String) - const :doc, ::Object - const :params, T::Array[T.untyped] + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:183 + sig { params(doc: ::Object, params: T::Array[T.untyped], label: T.nilable(::String)).void } + def initialize(doc:, params:, label: T.unsafe(nil)); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:152 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:202 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } def accept_printer(printer); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:160 + # TODO + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:176 + sig { returns(::Object) } + def doc; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:172 + sig { returns(T.nilable(::String)) } + def label; end + + # TODO + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:180 + sig { returns(T::Array[T.untyped]) } + def params; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:210 sig { returns(::String) } def to_s; end class << self - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:141 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:191 sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end end end -# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:289 +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:401 class Spoom::LSP::SymbolPrinter < ::Spoom::Printer - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:297 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:409 sig do params( out: T.any(::IO, ::StringIO), @@ -3293,31 +3799,31 @@ class Spoom::LSP::SymbolPrinter < ::Spoom::Printer end def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:319 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:431 sig { params(uri: ::String).returns(::String) } def clean_uri(uri); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:294 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:406 sig { returns(T.nilable(::String)) } def prefix; end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:294 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:406 def prefix=(_arg0); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:327 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:439 sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } def print_list(objects); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:307 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:419 sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } def print_object(object); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:314 + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:426 sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } def print_objects(objects); end - # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:291 - sig { returns(T::Set[::Integer]) } + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:403 + sig { returns(T::Set[T::Array[T.untyped]]) } def seen; end end @@ -3384,7 +3890,7 @@ class Spoom::Location::LocationError < ::Spoom::Error; end # pkg:gem/spoom#lib/spoom/model/model.rb:5 class Spoom::Model - # pkg:gem/spoom#lib/spoom/model/model.rb:240 + # pkg:gem/spoom#lib/spoom/model/model.rb:262 sig { void } def initialize; end @@ -3392,11 +3898,11 @@ class Spoom::Model # # Raises an error if the symbol is not found # - # pkg:gem/spoom#lib/spoom/model/model.rb:249 + # pkg:gem/spoom#lib/spoom/model/model.rb:271 sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } def [](full_name); end - # pkg:gem/spoom#lib/spoom/model/model.rb:298 + # pkg:gem/spoom#lib/spoom/model/model.rb:320 sig { void } def finalize!; end @@ -3404,35 +3910,35 @@ class Spoom::Model # # If the symbol already exists, it will be returned. # - # pkg:gem/spoom#lib/spoom/model/model.rb:260 + # pkg:gem/spoom#lib/spoom/model/model.rb:282 sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } def register_symbol(full_name); end - # pkg:gem/spoom#lib/spoom/model/model.rb:265 + # pkg:gem/spoom#lib/spoom/model/model.rb:287 sig { params(full_name: ::String, context: ::Spoom::Model::Symbol).returns(::Spoom::Model::Symbol) } def resolve_symbol(full_name, context:); end - # pkg:gem/spoom#lib/spoom/model/model.rb:292 + # pkg:gem/spoom#lib/spoom/model/model.rb:314 sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } def subtypes(symbol); end - # pkg:gem/spoom#lib/spoom/model/model.rb:286 + # pkg:gem/spoom#lib/spoom/model/model.rb:308 sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } def supertypes(symbol); end # All the symbols registered in this model # - # pkg:gem/spoom#lib/spoom/model/model.rb:234 + # pkg:gem/spoom#lib/spoom/model/model.rb:256 sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) } def symbols; end - # pkg:gem/spoom#lib/spoom/model/model.rb:237 + # pkg:gem/spoom#lib/spoom/model/model.rb:259 sig { returns(Spoom::Poset[::Spoom::Model::Symbol]) } def symbols_hierarchy; end private - # pkg:gem/spoom#lib/spoom/model/model.rb:305 + # pkg:gem/spoom#lib/spoom/model/model.rb:327 sig { void } def compute_symbols_hierarchy!; end end @@ -3587,10 +4093,10 @@ end # pkg:gem/spoom#lib/spoom/model/model.rb:6 class Spoom::Model::Error < ::Spoom::Error; end -# pkg:gem/spoom#lib/spoom/model/model.rb:217 +# pkg:gem/spoom#lib/spoom/model/model.rb:239 class Spoom::Model::Extend < ::Spoom::Model::Mixin; end -# pkg:gem/spoom#lib/spoom/model/model.rb:215 +# pkg:gem/spoom#lib/spoom/model/model.rb:237 class Spoom::Model::Include < ::Spoom::Model::Mixin; end # pkg:gem/spoom#lib/spoom/model/model.rb:185 @@ -3599,15 +4105,15 @@ class Spoom::Model::Method < ::Spoom::Model::Property; end # A mixin (include, prepend, extend) to a namespace # @abstract # -# pkg:gem/spoom#lib/spoom/model/model.rb:205 +# pkg:gem/spoom#lib/spoom/model/model.rb:227 class Spoom::Model::Mixin abstract! - # pkg:gem/spoom#lib/spoom/model/model.rb:210 + # pkg:gem/spoom#lib/spoom/model/model.rb:232 sig { params(name: ::String).void } def initialize(name); end - # pkg:gem/spoom#lib/spoom/model/model.rb:207 + # pkg:gem/spoom#lib/spoom/model/model.rb:229 sig { returns(::String) } def name; end end @@ -3659,7 +4165,7 @@ class Spoom::Model::NamespaceVisitor < ::Spoom::Visitor def visit(node); end end -# pkg:gem/spoom#lib/spoom/model/model.rb:216 +# pkg:gem/spoom#lib/spoom/model/model.rb:238 class Spoom::Model::Prepend < ::Spoom::Model::Mixin; end # A method or an attribute accessor @@ -3697,38 +4203,59 @@ end # Methods could be accessors, instance or class methods, aliases, etc. # # pkg:gem/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 +class Spoom::Model::Reference + # pkg:gem/spoom#lib/spoom/model/reference.rb:48 + sig { params(kind: ::Spoom::Model::Reference::Kind, name: ::String, location: ::Spoom::Location).void } + def initialize(kind:, name:, location:); end - # pkg:gem/spoom#lib/spoom/model/reference.rb:35 + # pkg:gem/spoom#lib/spoom/model/reference.rb:55 sig { returns(T::Boolean) } def constant?; end - # pkg:gem/spoom#lib/spoom/model/reference.rb:40 + # pkg:gem/spoom#lib/spoom/model/reference.rb:39 + sig { returns(::Spoom::Model::Reference::Kind) } + def kind; end + + # pkg:gem/spoom#lib/spoom/model/reference.rb:45 + sig { returns(::Spoom::Location) } + def location; end + + # pkg:gem/spoom#lib/spoom/model/reference.rb:60 sig { returns(T::Boolean) } def method?; end + # pkg:gem/spoom#lib/spoom/model/reference.rb:42 + sig { returns(::String) } + def name; end + class << self - # pkg:gem/spoom#lib/spoom/model/reference.rb:20 + # pkg:gem/spoom#lib/spoom/model/reference.rb:28 sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } def constant(name, location); end - # pkg:gem/spoom#lib/spoom/model/reference.rb:25 + # pkg:gem/spoom#lib/spoom/model/reference.rb:33 sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } def method(name, location); end end end # pkg:gem/spoom#lib/spoom/model/reference.rb:11 -class Spoom::Model::Reference::Kind < ::T::Enum - enums do - Constant = new - Method = new - end +class Spoom::Model::Reference::Kind + # pkg:gem/spoom#lib/spoom/model/reference.rb:13 + sig { params(name: ::String).void } + def initialize(name); end + + # pkg:gem/spoom#lib/spoom/model/reference.rb:18 + sig { returns(::String) } + def to_s; end end +# pkg:gem/spoom#lib/spoom/model/reference.rb:22 +Spoom::Model::Reference::Kind::Constant = T.let(T.unsafe(nil), Spoom::Model::Reference::Kind) + +# pkg:gem/spoom#lib/spoom/model/reference.rb:23 +Spoom::Model::Reference::Kind::Method = T.let(T.unsafe(nil), Spoom::Model::Reference::Kind) + # Visit a file to collect all the references to constants and methods # # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:7 @@ -3890,13 +4417,13 @@ end # A Sorbet signature (sig block) # -# pkg:gem/spoom#lib/spoom/model/model.rb:220 +# pkg:gem/spoom#lib/spoom/model/model.rb:242 class Spoom::Model::Sig - # pkg:gem/spoom#lib/spoom/model/model.rb:225 + # pkg:gem/spoom#lib/spoom/model/model.rb:247 sig { params(string: ::String).void } def initialize(string); end - # pkg:gem/spoom#lib/spoom/model/model.rb:222 + # pkg:gem/spoom#lib/spoom/model/model.rb:244 sig { returns(::String) } def string; end end @@ -4007,14 +4534,33 @@ class Spoom::Model::UnresolvedSymbol < ::Spoom::Model::Symbol end # pkg:gem/spoom#lib/spoom/model/model.rb:195 -class Spoom::Model::Visibility < ::T::Enum - enums do - Private = new - Protected = new - Public = new +class Spoom::Model::Visibility + # pkg:gem/spoom#lib/spoom/model/model.rb:210 + sig { params(name: ::String).void } + def initialize(name); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/model.rb:216 + sig { override.returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/model/model.rb:198 + sig { params(name: ::String).returns(::Spoom::Model::Visibility) } + def from_string(name); end end end +# pkg:gem/spoom#lib/spoom/model/model.rb:222 +Spoom::Model::Visibility::Private = T.let(T.unsafe(nil), Spoom::Model::Visibility) + +# pkg:gem/spoom#lib/spoom/model/model.rb:221 +Spoom::Model::Visibility::Protected = T.let(T.unsafe(nil), Spoom::Model::Visibility) + +# pkg:gem/spoom#lib/spoom/model/model.rb:220 +Spoom::Model::Visibility::Public = T.let(T.unsafe(nil), Spoom::Model::Visibility) + # pkg:gem/spoom#lib/spoom/parse.rb:7 class Spoom::ParseError < ::Spoom::Error; end @@ -4384,7 +4930,7 @@ class Spoom::Sorbet::Config # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb" # ~~~ # - # pkg:gem/spoom#lib/spoom/sorbet/config.rb:64 + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:66 sig { returns(::String) } def options_string; end @@ -4395,28 +4941,34 @@ class Spoom::Sorbet::Config # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 def paths=(_arg0); end + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 + def typed_overrides; end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 + def typed_overrides=(_arg0); end + private - # pkg:gem/spoom#lib/spoom/sorbet/config.rb:44 + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:45 sig { params(source: ::Spoom::Sorbet::Config).void } def initialize_copy(source); end class << self - # pkg:gem/spoom#lib/spoom/sorbet/config.rb:75 + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:78 sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) } def parse_file(sorbet_config_path); end - # pkg:gem/spoom#lib/spoom/sorbet/config.rb:80 + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:83 sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) } def parse_string(sorbet_config); end private - # pkg:gem/spoom#lib/spoom/sorbet/config.rb:146 + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:157 sig { params(line: ::String).returns(T::Boolean) } def parse_bool_option(line); end - # pkg:gem/spoom#lib/spoom/sorbet/config.rb:141 + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:152 sig { params(line: ::String).returns(::String) } def parse_option(line); end end @@ -4458,11 +5010,11 @@ end # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:9 Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) -# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:149 +# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:171 class Spoom::Sorbet::Errors::Error include ::Comparable - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:166 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:188 sig do params( file: T.nilable(::String), @@ -4476,79 +5028,110 @@ class Spoom::Sorbet::Errors::Error # By default errors are sorted by location # - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:177 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:199 sig { params(other: T.untyped).returns(::Integer) } def <=>(other); end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:156 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:178 def code; end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:153 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:175 sig { returns(T.nilable(::String)) } def file; end # Other files associated with the error # - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:163 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:185 sig { returns(T::Set[::String]) } def files_from_error_sections; end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:156 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:178 sig { returns(T.nilable(::Integer)) } def line; end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:153 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:175 def message; end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:159 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:181 sig { returns(T::Array[::String]) } def more; end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:189 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:211 sig { returns(::REXML::Element) } def to_junit_xml_element; end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:184 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:206 sig { returns(::String) } def to_s; end end +# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:240 +class Spoom::Sorbet::Errors::ParseResult + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:248 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], warnings: T::Array[::String]).void } + def initialize(errors, warnings); end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:242 + sig { returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def errors; end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:245 + sig { returns(T::Array[::String]) } + def warnings; end +end + # Parse errors from Sorbet output # # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:47 class Spoom::Sorbet::Errors::Parser - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:67 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:74 sig { params(error_url_base: ::String).void } def initialize(error_url_base: T.unsafe(nil)); end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:74 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:82 sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } def parse(output); end + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:87 + sig { params(output: ::String).returns(::Spoom::Sorbet::Errors::ParseResult) } + def parse_result(output); end + private - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:138 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:155 sig { params(line: ::String).void } def append_error(line); end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:130 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:166 + sig { params(warning: ::String).void } + def append_warning(warning); end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:147 sig { void } def close_error; end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:97 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:114 sig { params(error_url_base: ::String).returns(::Regexp) } def error_line_match_regexp(error_url_base); end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:114 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:131 sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } def match_error_line(line); end - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:123 + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:140 sig { params(error: ::Spoom::Sorbet::Errors::Error).void } def open_error(error); end class << self - # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:60 + # Used when callers need both parsed Sorbet errors and leading stderr warnings. + # + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:67 + sig { params(output: ::String, error_url_base: ::String).returns(::Spoom::Sorbet::Errors::ParseResult) } + def parse_result(output, error_url_base: T.unsafe(nil)); end + + # Used when only Sorbet errors are needed and leading stderr warnings can be ignored. + # + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:61 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 @@ -4604,7 +5187,7 @@ class Spoom::Sorbet::Metrics::CodeMetricsVisitor < ::Spoom::Visitor # @override # - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:124 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:135 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end @@ -4616,37 +5199,37 @@ class Spoom::Sorbet::Metrics::CodeMetricsVisitor < ::Spoom::Visitor # @override # - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:99 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:110 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:83 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:94 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:91 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:102 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end private - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:213 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:224 sig { returns(T::Array[::Prism::CallNode]) } def collect_last_srb_sigs; end - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:220 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:231 sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode)).returns(::String) } def node_key(node); end - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:167 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:178 sig { params(node: ::Prism::CallNode).void } def visit_attr_accessor(node); end - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:151 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:162 sig do params( node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), @@ -4655,11 +5238,11 @@ class Spoom::Sorbet::Metrics::CodeMetricsVisitor < ::Spoom::Visitor end def visit_scope(node, &block); end - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:187 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:198 sig { params(node: ::Prism::CallNode).void } def visit_sig(node); end - # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:197 + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:208 sig { params(node: ::Prism::CallNode).void } def visit_type_member(node); end end @@ -4773,21 +5356,23 @@ module Spoom::Sorbet::Translate # Converts all the RBS comments in the given Ruby code to `sig` nodes. # It also handles type members and class annotations. # - # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:58 + # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:64 sig do params( ruby_contents: ::String, file: ::String, max_line_length: T.nilable(::Integer), - overloads_strategy: ::Symbol + overloads_strategy: ::Symbol, + erase_generic_types: T::Boolean, + force: T::Boolean ).returns(::String) end - def rbs_comments_to_sorbet_sigs(ruby_contents, file:, max_line_length: T.unsafe(nil), overloads_strategy: T.unsafe(nil)); end + def rbs_comments_to_sorbet_sigs(ruby_contents, file:, max_line_length: T.unsafe(nil), overloads_strategy: T.unsafe(nil), erase_generic_types: T.unsafe(nil), force: T.unsafe(nil)); end # Converts all `T.let` and `T.cast` nodes to RBS comments in the given Ruby code. # It also handles type members and class annotations. # - # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:78 + # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:87 sig do params( ruby_contents: ::String, @@ -4804,19 +5389,20 @@ module Spoom::Sorbet::Translate # Converts all `sig` nodes to RBS comments in the given Ruby code. # It also handles type members and class annotations. # - # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:38 + # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:39 sig do params( ruby_contents: ::String, file: ::String, positional_names: T::Boolean, + preserve_multiline_signatures: T::Boolean, max_line_length: T.nilable(::Integer), translate_generics: T::Boolean, translate_helpers: T::Boolean, translate_abstract_methods: T::Boolean ).returns(::String) end - def sorbet_sigs_to_rbs_comments(ruby_contents, file:, positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil), translate_generics: T.unsafe(nil), translate_helpers: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end + def sorbet_sigs_to_rbs_comments(ruby_contents, file:, positional_names: T.unsafe(nil), preserve_multiline_signatures: T.unsafe(nil), max_line_length: T.unsafe(nil), translate_generics: T.unsafe(nil), translate_helpers: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end # Deletes all `sig` nodes from the given Ruby code. # It doesn't handle type members and class annotations. @@ -4889,20 +5475,18 @@ end # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:7 module Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs class << self - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:23 - sig { params(source: ::String).returns(T::Boolean) } - def contains_rbs_syntax?(source); end - - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:32 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:29 sig do params( ruby_contents: ::String, file: ::String, max_line_length: T.nilable(::Integer), - overloads_strategy: ::Symbol + overloads_strategy: ::Symbol, + erase_generic_types: T::Boolean, + force: T::Boolean ).returns(::String) end - def rewrite_if_needed(ruby_contents, file:, max_line_length: T.unsafe(nil), overloads_strategy: T.unsafe(nil)); end + def rewrite_if_needed(ruby_contents, file:, max_line_length: T.unsafe(nil), overloads_strategy: T.unsafe(nil), erase_generic_types: T.unsafe(nil), force: T.unsafe(nil)); end end end @@ -4933,56 +5517,47 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseTranslator < ::Spoo # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:74 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:75 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:44 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:45 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:68 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:69 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:52 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:53 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:34 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:35 sig { override.params(node: ::Prism::ProgramNode).void } def visit_program_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:60 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:61 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end private - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:386 - sig do - params( - node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), - constant_regex: ::Regexp - ).returns(T::Boolean) - end - def already_extends?(node, constant_regex); end - # @param is_known: true if this is an RBS annotation that we recognize # false for some other `@`-prefixed thing, like a documentation `@param` tag. # @abstract # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:320 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:329 sig do abstract .params( @@ -4994,11 +5569,11 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseTranslator < ::Spoo end def apply_class_annotation(annotation, parent_node:, insert_pos:, sorbet_replacement:); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:220 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:221 sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode)).void } def apply_class_annotations(node); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:333 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:342 sig do params( annotations: T::Array[::Spoom::RBS::Annotation], @@ -5007,7 +5582,7 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseTranslator < ::Spoo end def apply_member_annotations(annotations, sig); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:197 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:198 sig do params( signatures: T::Array[::Spoom::RBS::Signature], @@ -5017,17 +5592,17 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseTranslator < ::Spoo end def apply_overloads_strategy(signatures, method_name:, location:); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:438 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:431 sig { params(comments: T::Array[::Prism::Comment]).void } def apply_type_aliases(comments); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:402 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:395 sig { params(comments: T::Array[::Prism::Comment]).returns(T::Array[::Spoom::RBS::TypeAlias]) } def collect_type_aliases(comments); end # @abstract # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:383 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:392 sig do abstract .params( @@ -5041,7 +5616,7 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseTranslator < ::Spoo # Inserts a single `type_member` declaration into the class/module body. # @abstract # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:330 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:339 sig do abstract .params( @@ -5054,7 +5629,7 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseTranslator < ::Spoo # @overridable # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:476 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:469 sig { overridable.params(of: ::String, to_height_of: ::Spoom::RBS::Comment).returns(::String) } def pad_out_line_count(of:, to_height_of:); end @@ -5062,18 +5637,18 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseTranslator < ::Spoo # false for some other `@`-prefixed thing, like a documentation `@param` tag. # @overridable # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:379 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:388 sig { overridable.params(annotation: ::Spoom::RBS::Annotation, is_known: T::Boolean).void } def rewrite_annotation(annotation, is_known:); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:142 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:143 sig { params(def_node: ::Prism::DefNode, comments: ::Spoom::RBS::Comments).void } def rewrite_def(def_node, comments); end # Called for every overloaded method sig that we discard because it wasn't the last one. # @abstract # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:217 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:218 sig { abstract.params(signature: ::Spoom::RBS::Signature).void } def rewrite_discarded_overload(signature); end @@ -5081,18 +5656,18 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseTranslator < ::Spoo # regardless of how many overloaded signatures share the annotations, to avoid # emitting duplicate markers. # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:369 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:378 sig { params(annotations: T::Array[::Spoom::RBS::Annotation], known: T::Array[::Spoom::RBS::Annotation]).void } def rewrite_member_annotations(annotations, known:); end # Rewrites the `#: [...]` type params comment (e.g. delete it, or mark it as translated). # @abstract # - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:325 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:334 sig { abstract.params(signature: ::Spoom::RBS::Signature, type_params: T::Array[::RBS::AST::TypeParam]).void } def rewrite_type_params_signature(signature, type_params:); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:92 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/base_translator.rb:93 sig { params(node: ::Prism::CallNode).void } def visit_attr(node); end end @@ -5239,17 +5814,22 @@ end # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:41 class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::Options - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:58 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:65 sig do params( overloads_strategy: ::Symbol, + erase_generic_types: T::Boolean, output_format: ::Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseRBIFormat, translate_abstract_methods: T::Boolean ).void end - def initialize(overloads_strategy: T.unsafe(nil), output_format: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end + def initialize(overloads_strategy: T.unsafe(nil), erase_generic_types: T.unsafe(nil), output_format: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:48 + sig { returns(T::Boolean) } + def erase_generic_types; end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:54 sig { returns(::Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::BaseRBIFormat) } def output_format; end @@ -5258,11 +5838,15 @@ class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::Options def overloads_strategy; end # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:51 + sig { returns(::RBI::RBS::MethodTypeTranslator::Options) } + def rbi_options; end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:57 sig { returns(T::Boolean) } def translate_abstract_methods; end class << self - # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:78 + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs/options.rb:88 sig { returns(::Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::Options) } def default; end end @@ -5365,59 +5949,60 @@ Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments::LINE_BREAK = T.let(T.un # # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:9 class Spoom::Sorbet::Translate::SorbetSigsToRBSComments < ::Spoom::Sorbet::Translate::Translator - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:19 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:20 sig do params( ruby_contents: ::String, file: ::String, positional_names: T::Boolean, + preserve_multiline_signatures: T::Boolean, max_line_length: T.nilable(::Integer), translate_generics: T::Boolean, translate_helpers: T::Boolean, translate_abstract_methods: T::Boolean ).void end - def initialize(ruby_contents, file:, positional_names:, max_line_length: T.unsafe(nil), translate_generics: T.unsafe(nil), translate_helpers: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end + def initialize(ruby_contents, file:, positional_names:, preserve_multiline_signatures: T.unsafe(nil), max_line_length: T.unsafe(nil), translate_generics: T.unsafe(nil), translate_helpers: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:100 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:108 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:46 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:50 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:119 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:127 sig { override.params(node: ::Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:64 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:68 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:52 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:56 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end # @override # - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:58 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:62 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end private - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:233 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:241 sig do params( parent: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), @@ -5426,41 +6011,47 @@ class Spoom::Sorbet::Translate::SorbetSigsToRBSComments < ::Spoom::Sorbet::Trans end def apply_class_annotation(parent, node); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:277 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:285 sig { params(sigs: T::Array[[::Prism::CallNode, ::RBI::Sig]]).void } def apply_member_annotations(sigs); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:313 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:321 sig { params(node: ::Prism::ConstantWriteNode).returns(::String) } def build_type_member_string(node); end # Collects the last signatures visited and clears the current list # - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:384 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:392 sig { returns(T::Array[[::Prism::CallNode, ::RBI::Sig]]) } def collect_last_sigs; end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:371 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:379 sig { void } def delete_extend_t_generics; end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:359 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:367 sig { void } def delete_extend_t_helpers; end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:391 - sig { params(indent: ::Integer, block: T.proc.params(arg0: ::RBI::RBSPrinter).void).returns(::String) } - def rbs_print(indent, &block); end + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:399 + sig do + params( + indent: ::Integer, + preserve_multiline_signatures: T::Boolean, + block: T.proc.params(arg0: ::RBI::RBSPrinter).void + ).returns(::String) + end + def rbs_print(indent, preserve_multiline_signatures:, &block); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:191 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:199 sig { params(node: ::Prism::CallNode).void } def visit_attr(node); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:215 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:223 sig { params(node: ::Prism::CallNode).void } def visit_extend(node); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:138 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:146 sig do params( node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), @@ -5469,7 +6060,7 @@ class Spoom::Sorbet::Translate::SorbetSigsToRBSComments < ::Spoom::Sorbet::Trans end def visit_scope(node, &block); end - # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:179 + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:187 sig { params(node: ::Prism::CallNode).void } def visit_sig(node); end end diff --git a/sorbet/rbi/gems/tapioca@0.19.2.rbi b/sorbet/rbi/gems/tapioca@0.20.0.rbi similarity index 88% rename from sorbet/rbi/gems/tapioca@0.19.2.rbi rename to sorbet/rbi/gems/tapioca@0.20.0.rbi index 550396a..7baf6dd 100644 --- a/sorbet/rbi/gems/tapioca@0.19.2.rbi +++ b/sorbet/rbi/gems/tapioca@0.20.0.rbi @@ -123,19 +123,23 @@ class RBI::Tree < ::RBI::NodeWithComments private - # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:100 + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:99 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:95 + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:94 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:110 +# pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:109 class RBI::TypedParam < ::T::Struct const :param, ::RBI::Param const :type, ::String + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:114 + sig { returns(::RBI::SigParam) } + def to_sig_param; end end # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:5 @@ -330,13 +334,13 @@ module Tapioca::BundlerExt::AutoRequireHook end end -# pkg:gem/tapioca#lib/tapioca.rb:38 +# pkg:gem/tapioca#lib/tapioca.rb:39 Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# pkg:gem/tapioca#lib/tapioca.rb:37 +# pkg:gem/tapioca#lib/tapioca.rb:38 Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) -# pkg:gem/tapioca#lib/tapioca.rb:36 +# pkg:gem/tapioca#lib/tapioca.rb:37 Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) # pkg:gem/tapioca#lib/tapioca/cli.rb:5 @@ -345,13 +349,13 @@ class Tapioca::Cli < ::Thor include ::Tapioca::ConfigHelper include ::Tapioca::EnvHelper - # pkg:gem/tapioca#lib/tapioca/cli.rb:383 + # pkg:gem/tapioca#lib/tapioca/cli.rb:382 def __print_version; end - # pkg:gem/tapioca#lib/tapioca/cli.rb:365 + # pkg:gem/tapioca#lib/tapioca/cli.rb:364 def annotations; end - # pkg:gem/tapioca#lib/tapioca/cli.rb:337 + # pkg:gem/tapioca#lib/tapioca/cli.rb:336 def check_shims; end # pkg:gem/tapioca#lib/tapioca/cli.rb:46 @@ -360,7 +364,7 @@ class Tapioca::Cli < ::Thor # pkg:gem/tapioca#lib/tapioca/cli.rb:150 def dsl(*constant_or_paths); end - # pkg:gem/tapioca#lib/tapioca/cli.rb:279 + # pkg:gem/tapioca#lib/tapioca/cli.rb:278 def gem(*gems); end # pkg:gem/tapioca#lib/tapioca/cli.rb:27 @@ -374,20 +378,20 @@ class Tapioca::Cli < ::Thor private - # pkg:gem/tapioca#lib/tapioca/cli.rb:408 + # pkg:gem/tapioca#lib/tapioca/cli.rb:407 def print_init_next_steps; end class << self # Indicates that we are running from the LSP, set using the `addon_mode!` method # - # pkg:gem/tapioca#lib/tapioca/cli.rb:392 + # pkg:gem/tapioca#lib/tapioca/cli.rb:391 def addon_mode; end - # pkg:gem/tapioca#lib/tapioca/cli.rb:395 + # pkg:gem/tapioca#lib/tapioca/cli.rb:394 sig { void } def addon_mode!; end - # pkg:gem/tapioca#lib/tapioca/cli.rb:400 + # pkg:gem/tapioca#lib/tapioca/cli.rb:399 sig { returns(T::Boolean) } def exit_on_failure?; end end @@ -420,12 +424,13 @@ module Tapioca::Commands; end # # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:6 class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::FileHelper include ::Tapioca::SorbetHelper include ::Tapioca::RBIFilesHelper abstract! - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:15 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:16 sig do params( requested_constants: T::Array[::String], @@ -445,22 +450,27 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke app_root: ::String, halt_upon_load_error: T::Boolean, compiler_options: T::Hash[::String, T.untyped], - lsp_addon: T::Boolean + lsp_addon: T::Boolean, + max_diff_lines: ::Integer ).void end - def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, skip_constant: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), compiler_options: T.unsafe(nil), lsp_addon: T.unsafe(nil)); end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, skip_constant: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), compiler_options: T.unsafe(nil), lsp_addon: T.unsafe(nil), max_diff_lines: T.unsafe(nil)); end private - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:93 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:96 sig { returns(T::Array[::String]) } def all_requested_constants; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:289 - sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:337 + sig { params(diff: T::Hash[::Pathname, ::Symbol], tmp_dir: ::Pathname).returns([::String, T::Boolean]) } + def build_diff_output(diff, tmp_dir); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:292 + sig { params(cause: ::Symbol, files: T::Array[::Pathname]).returns(::String) } def build_error_for_files(cause, files); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:213 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:216 sig do params( constant_name: ::String, @@ -471,7 +481,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke end def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:155 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:158 sig do params( constant_names: T::Array[::String], @@ -480,72 +490,72 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke end def constantize(constant_names, ignore_missing: T.unsafe(nil)); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:180 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:183 sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def constantize_compilers(compiler_names); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:349 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:399 sig { returns(T::Array[::String]) } def constants_from_requested_paths; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:116 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:119 sig { returns(::Tapioca::Dsl::Pipeline) } def create_pipeline; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:252 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:255 sig { params(constant_name: ::String).returns(::Pathname) } def dsl_rbi_filename(constant_name); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:141 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:144 sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:344 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:394 sig { params(constant: ::String).returns(::String) } def generate_command_for(constant); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:60 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:63 sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) } def generate_dsl_rbi_files(outpath, quiet:); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:103 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:106 sig { void } def load_application; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:231 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:234 sig { params(dir: ::Pathname).void } def perform_dsl_verification(dir); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:98 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:101 sig { returns(::Tapioca::Dsl::Pipeline) } def pipeline; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:240 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:243 sig { params(files: T::Set[::Pathname]).void } def purge_stale_dsl_rbi_files(files); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:339 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:389 sig { params(constant: ::String).returns(::String) } def rbi_filename_for(constant); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:320 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:370 sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } def rbi_files_in(path); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:298 - sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } - def report_diff_and_exit_if_out_of_date(diff, command); end + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:301 + sig { params(diff: T::Hash[::Pathname, ::Symbol], tmp_dir: ::Pathname, command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, tmp_dir:, command:); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:200 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:203 sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } def resolve(name); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:327 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:377 sig { params(class_name: ::String).returns(::String) } def underscore(class_name); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:257 - sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:260 + sig { params(tmp_dir: ::Pathname).returns(T::Hash[::Pathname, ::Symbol]) } def verify_dsl_rbi(tmp_dir:); end end @@ -585,63 +595,63 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command private - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:185 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:186 sig { returns(T::Array[::String]) } def added_rbis; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:246 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:247 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:64 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:65 sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } def compile_gem_rbi(gem); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:180 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:181 sig { params(gem_name: ::String).returns(::Pathname) } def existing_rbi(gem_name); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:228 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:229 sig { returns(T::Hash[::String, ::String]) } def existing_rbis; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:192 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:193 sig { params(gem_name: ::String).returns(::Pathname) } def expected_rbi(gem_name); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:234 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:235 sig { returns(T::Hash[::String, ::String]) } def expected_rbis; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:197 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:198 sig { params(gem_name: ::String).returns(T::Boolean) } def gem_rbi_exists?(gem_name); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:241 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:242 sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } def gem_rbi_filename(gem_name, version); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:251 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:252 sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } def merge_with_exported_rbi(gem, file); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:222 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:223 sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } def move(old_filename, new_filename); end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:132 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:133 sig { void } def perform_additions; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:105 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:106 sig { void } def perform_removals; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:175 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:176 sig { returns(T::Array[::String]) } def removed_rbis; end - # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:202 + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:203 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end end @@ -886,15 +896,11 @@ end # pkg:gem/tapioca#lib/tapioca/commands/dsl_generate.rb:6 class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl - # pkg:gem/tapioca#lib/tapioca/commands/dsl_generate.rb:8 - sig { params(only_bootsnap_rbs_cache: T::Boolean, kwargs: T.untyped).void } - def initialize(only_bootsnap_rbs_cache: T.unsafe(nil), **kwargs); end - private # @override # - # pkg:gem/tapioca#lib/tapioca/commands/dsl_generate.rb:17 + # pkg:gem/tapioca#lib/tapioca/commands/dsl_generate.rb:11 sig { override.void } def execute; end end @@ -920,7 +926,7 @@ class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem sig { override.void } def execute; end - # pkg:gem/tapioca#lib/tapioca/commands/gem_generate.rb:70 + # pkg:gem/tapioca#lib/tapioca/commands/gem_generate.rb:86 sig do params( gem: ::Tapioca::Gemfile::GemSpec, @@ -929,7 +935,7 @@ class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem end def gem_dependencies(gem, dependencies = T.unsafe(nil)); end - # pkg:gem/tapioca#lib/tapioca/commands/gem_generate.rb:52 + # pkg:gem/tapioca#lib/tapioca/commands/gem_generate.rb:64 sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def gems_to_generate(gem_names); end end @@ -1095,6 +1101,9 @@ Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) # pkg:gem/tapioca#lib/tapioca.rb:22 Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) +# pkg:gem/tapioca#lib/tapioca.rb:35 +Tapioca::DEFAULT_MAX_DIFF_LINES = T.let(T.unsafe(nil), Integer) + # pkg:gem/tapioca#lib/tapioca.rb:27 Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) @@ -1133,7 +1142,7 @@ class Tapioca::Dsl::Compiler ConstantType = type_member { { upper: T::Module[T.anything] } } - # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:89 + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:101 sig do params( pipeline: ::Tapioca::Dsl::Pipeline, @@ -1146,11 +1155,11 @@ class Tapioca::Dsl::Compiler # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. # - # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:108 + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:120 sig { params(error: ::String).void } def add_error(error); end - # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:98 + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:110 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end @@ -1160,7 +1169,7 @@ class Tapioca::Dsl::Compiler # @abstract # - # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:104 + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:116 sig { abstract.void } def decorate; end @@ -1174,21 +1183,21 @@ class Tapioca::Dsl::Compiler private - # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:157 + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:169 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } def compile_method_parameters_to_rbi(method_def); end - # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:193 + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:207 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } def compile_method_return_type_to_rbi(method_def); end - # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:144 + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:156 sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end # Get the types of each parameter from a method signature # - # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:116 + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:128 sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } def parameters_types_from_signature(method_def, signature); end @@ -1225,6 +1234,16 @@ class Tapioca::Dsl::Compiler sig { returns(T::Enumerable[T::Module[T.anything]]) } def all_modules; end + # Rails 8.1+ wraps deprecated constants in DeprecatedConstantProxy, which + # undefines most instance methods and warns from method_missing. Inspecting + # those modules during DSL discovery (is_a?, singleton_class, etc.) emits + # deprecation warnings even though Tapioca is only enumerating ObjectSpace. + # class_of uses Kernel#class so we can recognize the proxy without warning. + # + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:93 + sig { params(mod: T::Module[T.anything]).returns(T::Boolean) } + def deprecated_constant_proxy?(mod); end + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:60 sig do type_parameters(:U) @@ -1271,15 +1290,15 @@ class Tapioca::Dsl::Pipeline sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } def active_compilers; end - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:90 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:93 sig { params(error: ::String).void } def add_error(error); end - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:95 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:98 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:104 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:107 sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def compilers; end @@ -1314,15 +1333,15 @@ class Tapioca::Dsl::Pipeline private - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:173 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:176 sig { void } def abort_if_pending_migrations!; end - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:143 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:146 sig { params(constants: T::Set[T::Module[T.anything]]).returns(T::Set[T::Module[T.anything]]) } def filter_anonymous_constants(constants); end - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:113 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:116 sig do params( requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], @@ -1331,7 +1350,7 @@ class Tapioca::Dsl::Pipeline end def gather_active_compilers(requested_compilers, excluded_compilers); end - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:121 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:124 sig do params( requested_constants: T::Array[T::Module[T.anything]], @@ -1341,11 +1360,11 @@ class Tapioca::Dsl::Pipeline end def gather_constants(requested_constants, requested_paths, skipped_constants); end - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:148 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:151 sig { params(constant: T::Module[T.anything]).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end - # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:167 + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:170 sig { params(error: ::String).void } def report_error(error); end end @@ -1386,6 +1405,31 @@ end # pkg:gem/tapioca#lib/tapioca/executor.rb:6 Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer) +# pkg:gem/tapioca#lib/tapioca/helpers/file_helper.rb:7 +module Tapioca::FileHelper + # pkg:gem/tapioca#lib/tapioca/helpers/file_helper.rb:9 + sig do + params( + filename: ::Pathname, + old_path: T.any(::Pathname, ::String), + new_path: T.any(::Pathname, ::String) + ).returns(T.nilable(::String)) + end + def file_diff(filename, old_path, new_path); end + + private + + # pkg:gem/tapioca#lib/tapioca/helpers/file_helper.rb:37 + sig { params(message: ::String).void } + def error_msg(message); end +end + +# pkg:gem/tapioca#lib/tapioca/helpers/file_helper.rb:34 +Tapioca::FileHelper::CLEAR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/helpers/file_helper.rb:33 +Tapioca::FileHelper::RED = T.let(T.unsafe(nil), String) + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:5 module Tapioca::Gem; end @@ -1484,13 +1528,17 @@ class Tapioca::Gem::Listeners::Documentation < ::Tapioca::Gem::Listeners::Base private + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:85 + sig { params(definition: ::Rubydex::Definition).returns(T::Array[::String]) } + def comment_lines(definition); end + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:58 sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } def documentation_comments(name, sigs: T.unsafe(nil)); end # @override # - # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:88 + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:93 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end @@ -1570,6 +1618,20 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base private + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:201 + sig { params(method: ::UnboundMethod, constant: T::Module[T.anything]).returns(T.nilable(::UnboundMethod)) } + def attr_reader_for_writer(method, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:217 + sig do + params( + writer_method: ::UnboundMethod, + reader_method: ::UnboundMethod, + reader_signature: T.untyped + ).returns(T.untyped) + end + def build_attr_writer_signature(writer_method, reader_method, reader_signature); end + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:26 sig do params( @@ -1596,19 +1658,23 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base # @override # - # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:210 + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:276 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:202 + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:190 + sig { params(method: ::UnboundMethod, constant: T::Module[T.anything]).returns(T.untyped) } + def inferred_attr_writer_signature(method, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:268 sig { params(constant: T::Module[T.anything]).returns(T.nilable(::UnboundMethod)) } def initialize_method_for(constant); end - # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:175 + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:181 sig { params(mod: T::Module[T.anything]).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } def method_names_by_visibility(mod); end - # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:194 + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:260 sig do params( attached_class: T.nilable(T::Module[T.anything]), @@ -1627,7 +1693,7 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base # It walks up the ancestor tree via the `super_method` method; if any of the super # methods are owned by the constant, it means that the constant declares the method. # - # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:161 + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:167 sig { params(method: ::UnboundMethod, constant: T::Module[T.anything]).returns(T::Boolean) } def method_owned_by_constant?(method, constant); end @@ -1637,7 +1703,15 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end - # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:184 + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:239 + sig { params(method: ::UnboundMethod).returns(::UnboundMethod) } + def original_method(method); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:244 + sig { params(method: ::UnboundMethod, other_method: ::UnboundMethod).returns(T::Boolean) } + def same_source_location?(method, other_method); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:250 sig { params(constant: T::Module[T.anything], method_name: ::String).returns(T::Boolean) } def struct_method?(constant, method_name); end end @@ -2241,6 +2315,10 @@ class Tapioca::Gemfile sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def dependencies; end + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:52 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_gem_path?(path); end + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:40 sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) } def gem(gem_name); end @@ -2255,131 +2333,135 @@ class Tapioca::Gemfile private - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:101 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:114 sig { returns(::String) } def dir; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:54 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:59 + sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def excluded_gem_specs; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:67 sig { returns(::File) } def gemfile; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:96 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:109 sig { returns(T::Array[::Symbol]) } def groups; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:57 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:70 sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) } def load_dependencies; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:54 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:67 def lockfile; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:68 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:81 sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } def materialize_deps; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:91 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:104 sig { returns(::Bundler::Runtime) } def runtime; end end -# pkg:gem/tapioca#lib/tapioca/gemfile.rb:105 +# pkg:gem/tapioca#lib/tapioca/gemfile.rb:118 class Tapioca::Gemfile::GemSpec include ::Tapioca::GemHelper - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:137 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:150 sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } def initialize(spec); end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:147 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:160 sig { params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:172 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:185 sig { params(path: ::String).returns(T::Boolean) } def contains_path?(path); end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:162 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:175 sig { returns(T::Array[::Gem::Dependency]) } def dependencies; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:186 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:199 sig { returns(T::Boolean) } def export_rbi_files?; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:181 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:194 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:191 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:204 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:134 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:147 sig { returns(T::Array[::Pathname]) } def files; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:131 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:144 sig { returns(::String) } def full_gem_path; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:152 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:165 sig { params(gemfile_dir: ::String).returns(T::Boolean) } def ignore?(gemfile_dir); end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:157 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:170 sig { returns(::String) } def name; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:167 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:180 sig { returns(::String) } def rbi_file_name; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:203 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:216 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:131 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:144 def version; end private - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:214 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:227 sig { returns(T::Array[::Pathname]) } def collect_files; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:229 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:242 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:285 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:298 sig { returns(T::Boolean) } def gem_ignored?; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:264 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:277 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:234 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:247 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:243 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:256 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:257 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:270 sig { returns(::String) } def version_string; end class << self - # pkg:gem/tapioca#lib/tapioca/gemfile.rb:111 + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:124 sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } def spec_lookup_by_file_path; end end end -# pkg:gem/tapioca#lib/tapioca/gemfile.rb:120 +# pkg:gem/tapioca#lib/tapioca/gemfile.rb:133 Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) # pkg:gem/tapioca#lib/tapioca/gemfile.rb:10 @@ -2572,12 +2654,27 @@ class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader protected - # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:68 + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:101 sig { params(file: ::String, error: ::LoadError).void } def explain_failed_require(file, error); end + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:60 + sig do + params( + gemfile: ::Tapioca::Gemfile, + initialize_file: T.nilable(::String), + require_file: T.nilable(::String), + halt_upon_load_error: T::Boolean + ).void + end + def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:41 sig { void } + def load_gem_extensions; end + + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:74 + sig { void } def require_gem_file; end class << self @@ -2623,38 +2720,27 @@ class Tapioca::Loaders::Loader # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 # @without_runtime # - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:218 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:205 def eager_load_paths(engine); end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:182 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:169 sig { void } def eager_load_rails_app; end # @without_runtime # - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:161 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:148 def engines; end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:22 - sig do - params( - gemfile: ::Tapioca::Gemfile, - initialize_file: T.nilable(::String), - require_file: T.nilable(::String), - halt_upon_load_error: T::Boolean - ).void - end - def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end - - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:118 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:105 sig { void } def load_engines_in_classic_mode; end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:100 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:87 sig { void } def load_engines_in_zeitwerk_mode; end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:35 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:22 sig do params( environment_load: T::Boolean, @@ -2665,26 +2751,26 @@ class Tapioca::Loaders::Loader end def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:75 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:62 sig { void } def load_rails_engines; end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:203 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:190 sig { params(file: T.nilable(::String)).void } def require_helper(file); end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:89 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:76 def run_initializers; end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:175 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:162 sig { params(path: ::String).void } def safe_require(path); end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:143 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:130 sig { params(blk: T.proc.void).void } def with_rails_application(&blk); end - # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:136 + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:123 sig { returns(T::Boolean) } def zeitwerk_mode?; end end @@ -2731,11 +2817,25 @@ module Tapioca::RBIFilesHelper private - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:249 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:317 + sig { params(constant: ::String).void } + def add_payload_superclass_suppression_to_config(constant); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:285 + sig do + params( + errors: T::Array[::Spoom::Sorbet::Errors::Error], + gem_dir: ::String, + auto_strictness: T::Boolean + ).returns(T::Array[::Spoom::Sorbet::Errors::Error]) + end + def apply_validation_fixes(errors, gem_dir:, auto_strictness:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:253 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } def extract_methods_and_attrs(nodes); end - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:242 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:246 sig do params( nodes: T::Array[::RBI::Node], @@ -2745,37 +2845,56 @@ module Tapioca::RBIFilesHelper end def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:286 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:373 sig { params(path: ::String).returns(::String) } def gem_name_from_rbi_path(path); end - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:210 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:214 sig { params(nodes: T::Array[::RBI::Node], shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } def has_duplicated_methods_and_attrs?(nodes, shims_or_todos); end - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:202 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:206 sig { params(shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } def has_duplicated_mixins?(shims_or_todos); end - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:174 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:178 sig { params(all_nodes: T::Array[::RBI::Node], shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } def has_duplicated_scopes?(all_nodes, shims_or_todos); end - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:140 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:310 + sig { params(error: ::Spoom::Sorbet::Errors::Error, gem_dir: ::String, dsl_dir: ::String).returns(T::Boolean) } + def ignored_validation_error?(error, gem_dir:, dsl_dir:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:144 sig { params(index: ::RBI::Index, files: T::Array[::String], number_of_workers: T.nilable(::Integer)).void } def parse_and_index_files(index, files, number_of_workers:); end + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:274 + sig { params(error: ::Spoom::Sorbet::Errors::Error).returns(T.nilable(::String)) } + def payload_superclass_constant_from_error(error); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:305 + sig { params(error: ::Spoom::Sorbet::Errors::Error).returns(T::Boolean) } + def payload_superclass_error?(error); end + # Do the list of `nodes` sharing the same name have duplicates? # - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:157 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:161 sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) } def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end - # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:259 + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:346 sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } def update_gem_rbis_strictnesses(errors, gem_dir); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:266 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).void } + def update_sorbet_config_for_payload_superclass_redefinitions(errors); end end +# pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:262 +Tapioca::RBIFilesHelper::SUPPRESS_PAYLOAD_SUPERCLASS_REDEFINITION_FLAG = T.let(T.unsafe(nil), String) + # pkg:gem/tapioca#lib/tapioca/rbi_formatter.rb:5 class Tapioca::RBIFormatter < ::RBI::Formatter # pkg:gem/tapioca#lib/tapioca/rbi_formatter.rb:16 @@ -2793,6 +2912,10 @@ module Tapioca::RBIHelper extend ::Tapioca::SorbetHelper extend ::Tapioca::RBIHelper + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:115 + sig { params(type: ::Symbol, name: ::String).returns(T::Boolean) } + def anonymous_parameter_name?(type, name); end + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:80 sig { params(type: ::String).returns(::String) } def as_nilable_type(type); end @@ -2802,7 +2925,7 @@ module Tapioca::RBIHelper def as_non_nilable_type(type); end # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:61 - sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + sig { params(name: T.nilable(::String), type: ::String).returns(::RBI::TypedParam) } def create_block_param(name, type:); end # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:51 @@ -2814,7 +2937,7 @@ module Tapioca::RBIHelper def create_kw_param(name, type:); end # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:56 - sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + sig { params(name: T.nilable(::String), type: ::String).returns(::RBI::TypedParam) } def create_kw_rest_param(name, type:); end # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:36 @@ -2826,7 +2949,7 @@ module Tapioca::RBIHelper def create_param(name, type:); end # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:41 - sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + sig { params(name: T.nilable(::String), type: ::String).returns(::RBI::TypedParam) } def create_rest_param(name, type:); end # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:66 @@ -2881,6 +3004,15 @@ module Tapioca::RBS::BootsnapGuard def setup(**_kwargs); end end +# pkg:gem/tapioca#lib/tapioca/rbs/rewriter.rb:33 +module Tapioca::RBS::BootsnapIntegration + class << self + # pkg:gem/tapioca#lib/tapioca/rbs/rewriter.rb:38 + sig { void } + def setup; end + end +end + # pkg:gem/tapioca#lib/tapioca/rbs/rewriter.rb:10 class Tapioca::RBS::HostBootsnapSetupError < ::StandardError; end @@ -2940,10 +3072,10 @@ class Tapioca::Runtime::DynamicMixinCompiler # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:13 def class_attribute_writers; end - # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:134 + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:133 def compile_class_attributes(tree); end - # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:177 + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:176 def compile_mixes_in_class_methods(tree); end # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:10 @@ -2952,10 +3084,10 @@ class Tapioca::Runtime::DynamicMixinCompiler # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:10 def dynamic_includes; end - # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:129 + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:128 def empty_attributes?; end - # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:219 + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:218 def filtered_mixin?(qualified_mixin_name); end # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:16 @@ -2967,7 +3099,7 @@ class Tapioca::Runtime::DynamicMixinCompiler # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:16 def instance_attribute_writers; end - # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:212 + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:211 def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end end @@ -2992,10 +3124,10 @@ end # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:23 module Tapioca::Runtime::GenericTypeRegistry class << self - # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:73 + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:98 def generic_type_instance?(instance); end - # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:80 + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:105 def lookup_type_variables(constant); end # This method is responsible for building the name of the instantiated concrete type @@ -3011,7 +3143,7 @@ module Tapioca::Runtime::GenericTypeRegistry # # This method returns the created or cached clone of the constant. # - # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:57 + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:82 def register_type(constant, types); end # This method is called from intercepted calls to `type_member` and `type_template`. @@ -3024,28 +3156,52 @@ module Tapioca::Runtime::GenericTypeRegistry # Finally, the original `type_variable` is returned from this method, so that the caller # can return it from the original methods as well. # - # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:94 + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:119 def register_type_variable(constant, type_variable); end private - # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:103 + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:128 def create_generic_type(constant, name); end - # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:145 + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:170 def create_safe_subclass(constant); end end end -# pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:28 -class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple - # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:30 +# Subclasses `T::Types::Base` rather than `T::Types::Simple` so that all +# validation goes through the `valid?` override below. `Simple` fast paths +# check `raw_type` directly, which for us is the clone, not the underlying type. +# +# pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:31 +class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Base + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:36 def initialize(raw_type, underlying_type); end # @override # - # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:38 + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:57 + def build_type; end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:51 + def name; end + + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:33 + def raw_type; end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:45 def valid?(obj); end + + private + + # Matches the always-true `<=` we define on the clone in `create_generic_type`. + # + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:63 + def subtype_of_single?(type); end end # pkg:gem/tapioca#lib/tapioca/runtime/helpers.rb:6 @@ -3054,7 +3210,7 @@ Tapioca::Runtime::NOOP_METHOD = T.let(T.unsafe(nil), Proc) module Tapioca::Runtime::Reflection extend ::Tapioca::Runtime::Reflection - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:229 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:246 def abstract_type_of(constant); end # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:63 @@ -3069,7 +3225,7 @@ module Tapioca::Runtime::Reflection # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:42 def class_of(object); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:173 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:190 def const_source_location(constant_name); end # @without_runtime @@ -3099,25 +3255,25 @@ module Tapioca::Runtime::Reflection # class D < C; end # descendants_of(C) # => [B, A, D] # - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:164 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:181 def descendants_of(klass); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:215 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:232 def file_candidates_for(constant); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:235 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:252 def final_module?(constant); end # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:104 def inherited_ancestors_of(constant); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:146 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:163 def method_of(constant, method); end # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:52 def name_of(constant); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:141 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:158 def name_of_type(type); end # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:79 @@ -3140,13 +3296,13 @@ module Tapioca::Runtime::Reflection # case of an ActiveSupport.on_load hook. If none is found, it returns the location # labeled "
", which is the original call site. # - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:186 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:203 def resolve_loc(locations); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:240 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:257 def sealed_module?(constant); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:134 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:151 def signature_of(method); end # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:127 @@ -3160,19 +3316,19 @@ module Tapioca::Runtime::Reflection private - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:277 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:294 def child_module_for_parent_with_name(parent, name); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:293 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:310 def has_aliased_namespace?(name); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:288 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:305 def method_defined_by_forwardable_module?(method); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:263 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:280 def methods_for(constant); end - # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:247 + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:264 def relevant_methods_for(constant); end end diff --git a/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi b/sorbet/rbi/gems/unicode-display_width@3.3.0.rbi similarity index 100% rename from sorbet/rbi/gems/unicode-display_width@3.2.0.rbi rename to sorbet/rbi/gems/unicode-display_width@3.3.0.rbi diff --git a/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi b/sorbet/rbi/gems/unicode-emoji@4.3.0.rbi similarity index 53% rename from sorbet/rbi/gems/unicode-emoji@4.2.0.rbi rename to sorbet/rbi/gems/unicode-emoji@4.3.0.rbi index 811ce44..6e861c7 100644 --- a/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +++ b/sorbet/rbi/gems/unicode-emoji@4.3.0.rbi @@ -5,84 +5,6 @@ # Please instead update this file by running `bin/tapioca gem unicode-emoji`. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. -# This file was generated by a script, please do not edit it by hand. -# See `$ rake generate_constants` and data/generate_constants.rb for more info. # This file was generated by a script, please do not edit it by hand. # See `$ rake generate_constants` and data/generate_constants.rb for more info. # @@ -100,7 +22,7 @@ module Unicode::Emoji # Return Emoji properties of character as an Array or nil # See PROPERTY_NAMES constant for possible properties # - # Source: see https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt + # Source: see https://www.unicode.org/Public/18.0.0/ucd/emoji/emoji-data.txt # # pkg:gem/unicode-emoji#lib/unicode/emoji.rb:68 def properties(char); end @@ -209,7 +131,7 @@ Unicode::Emoji::LIST = T.let(T.unsafe(nil), Hash) # pkg:gem/unicode-emoji#lib/unicode/emoji/list.rb:9 Unicode::Emoji::LIST_REMOVED_KEYS = T.let(T.unsafe(nil), Array) -# Unicode properties, see https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt +# Unicode properties, see https://www.unicode.org/Public/18.0.0/ucd/emoji/emoji-data.txt # # pkg:gem/unicode-emoji#lib/unicode/emoji/constants.rb:13 Unicode::Emoji::PROPERTY_NAMES = T.let(T.unsafe(nil), Hash) @@ -224,64 +146,64 @@ Unicode::Emoji::RECOMMENDED_SUBDIVISION_FLAGS = T.let(T.unsafe(nil), Array) # pkg:gem/unicode-emoji#lib/unicode/emoji/lazy_constants.rb:54 Unicode::Emoji::RECOMMENDED_ZWJ_SEQUENCES = T.let(T.unsafe(nil), Array) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex.rb:6 Unicode::Emoji::REGEX = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_basic.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_basic.rb:6 Unicode::Emoji::REGEX_BASIC = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_emoji_keycap.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_emoji_keycap.rb:6 Unicode::Emoji::REGEX_EMOJI_KEYCAP = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_include_mqe.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_include_mqe.rb:6 Unicode::Emoji::REGEX_INCLUDE_MQE = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_include_mqe_uqe.rb:6 Unicode::Emoji::REGEX_INCLUDE_MQE_UQE = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_include_text.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_include_text.rb:6 Unicode::Emoji::REGEX_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_picto.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_picto.rb:6 Unicode::Emoji::REGEX_PICTO = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_picto_no_emoji.rb:6 Unicode::Emoji::REGEX_PICTO_NO_EMOJI = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_possible.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_possible.rb:6 Unicode::Emoji::REGEX_POSSIBLE = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_prop_component.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_prop_component.rb:6 Unicode::Emoji::REGEX_PROP_COMPONENT = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_prop_emoji.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_prop_emoji.rb:6 Unicode::Emoji::REGEX_PROP_EMOJI = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_prop_modifier.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_prop_modifier.rb:6 Unicode::Emoji::REGEX_PROP_MODIFIER = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_prop_modifier_base.rb:6 Unicode::Emoji::REGEX_PROP_MODIFIER_BASE = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_prop_presentation.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_prop_presentation.rb:6 Unicode::Emoji::REGEX_PROP_PRESENTATION = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_text.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_text.rb:6 Unicode::Emoji::REGEX_TEXT = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_text_presentation.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_text_presentation.rb:6 Unicode::Emoji::REGEX_TEXT_PRESENTATION = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_valid.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_valid.rb:6 Unicode::Emoji::REGEX_VALID = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_valid_include_text.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_valid_include_text.rb:6 Unicode::Emoji::REGEX_VALID_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_well_formed.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_well_formed.rb:6 Unicode::Emoji::REGEX_WELL_FORMED = T.let(T.unsafe(nil), Regexp) -# pkg:gem/unicode-emoji#lib/unicode/emoji/generated_native/regex_well_formed_include_text.rb:6 +# pkg:gem/unicode-emoji#lib/unicode/emoji/generated/regex_well_formed_include_text.rb:6 Unicode::Emoji::REGEX_WELL_FORMED_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp) # Two regional indicators make up a region