diff --git a/Gemfile.lock b/Gemfile.lock index 5f5e96807..43184392c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,7 +55,7 @@ GEM reline (0.3.8) io-console (~> 0.5) rexml (3.2.6) - rubocop (1.56.2) + rubocop (1.56.3) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -79,14 +79,14 @@ GEM rubocop (>= 0.90.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - sorbet (0.5.11011) - sorbet-static (= 0.5.11011) - sorbet-runtime (0.5.11011) - sorbet-static (0.5.11011-universal-darwin) - sorbet-static (0.5.11011-x86_64-linux) - sorbet-static-and-runtime (0.5.11011) - sorbet (= 0.5.11011) - sorbet-runtime (= 0.5.11011) + sorbet (0.5.11013) + sorbet-static (= 0.5.11013) + sorbet-runtime (0.5.11013) + sorbet-static (0.5.11013-universal-darwin) + sorbet-static (0.5.11013-x86_64-linux) + sorbet-static-and-runtime (0.5.11013) + sorbet (= 0.5.11013) + sorbet-runtime (= 0.5.11013) spoom (1.2.2) erubi (>= 1.10.0) sorbet (>= 0.5.10187) diff --git a/sorbet/rbi/gems/irb@1.7.0.rbi b/sorbet/rbi/gems/irb@1.8.0.rbi similarity index 100% rename from sorbet/rbi/gems/irb@1.7.0.rbi rename to sorbet/rbi/gems/irb@1.8.0.rbi diff --git a/sorbet/rbi/gems/minitest@5.19.0.rbi b/sorbet/rbi/gems/minitest@5.20.0.rbi similarity index 85% rename from sorbet/rbi/gems/minitest@5.19.0.rbi rename to sorbet/rbi/gems/minitest@5.20.0.rbi index cf760e917..23b4ff92d 100644 --- a/sorbet/rbi/gems/minitest@5.19.0.rbi +++ b/sorbet/rbi/gems/minitest@5.20.0.rbi @@ -12,7 +12,7 @@ module Minitest # Internal run method. Responsible for telling all Runnable # sub-classes to run. # - # source://minitest//lib/minitest.rb#173 + # source://minitest//lib/minitest.rb#176 def __run(reporter, options); end # A simple hook allowing you to run a block of code after everything @@ -20,12 +20,18 @@ module Minitest # # Minitest.after_run { p $debugging_info } # - # source://minitest//lib/minitest.rb#94 + # source://minitest//lib/minitest.rb#97 def after_run(&block); end + # source://minitest//lib/minitest.rb#19 + def allow_fork; end + + # source://minitest//lib/minitest.rb#19 + def allow_fork=(_arg0); end + # Registers Minitest to run at process exit # - # source://minitest//lib/minitest.rb#66 + # source://minitest//lib/minitest.rb#69 def autorun; end # source://minitest//lib/minitest.rb#19 @@ -37,7 +43,7 @@ module Minitest # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest//lib/minitest.rb#1099 + # source://minitest//lib/minitest.rb#1102 def clock_time; end # source://minitest//lib/minitest.rb#19 @@ -46,7 +52,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest//lib/minitest.rb#264 + # source://minitest//lib/minitest.rb#267 def filter_backtrace(bt); end # source://minitest//lib/minitest.rb#19 @@ -55,10 +61,10 @@ module Minitest # source://minitest//lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest//lib/minitest.rb#98 + # source://minitest//lib/minitest.rb#101 def init_plugins(options); end - # source://minitest//lib/minitest.rb#105 + # source://minitest//lib/minitest.rb#108 def load_plugins; end # source://minitest//lib/minitest.rb#19 @@ -67,7 +73,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest//lib/minitest.rb#186 + # source://minitest//lib/minitest.rb#189 def process_args(args = T.unsafe(nil)); end # source://minitest//lib/minitest.rb#19 @@ -92,10 +98,10 @@ module Minitest # Minitest.run_one_method(klass, runnable_method) # klass.new(runnable_method).run # - # source://minitest//lib/minitest.rb#140 + # source://minitest//lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest//lib/minitest.rb#1090 + # source://minitest//lib/minitest.rb#1093 def run_one_method(klass, method_name); end # source://minitest//lib/minitest.rb#19 @@ -109,7 +115,7 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest//lib/minitest.rb#618 +# source://minitest//lib/minitest.rb#621 class Minitest::AbstractReporter include ::Mutex_m @@ -123,13 +129,13 @@ class Minitest::AbstractReporter # # @return [Boolean] # - # source://minitest//lib/minitest.rb#652 + # source://minitest//lib/minitest.rb#655 def passed?; end # About to start running a test. This allows a reporter to show # that it is starting or that we are in the middle of a test run. # - # source://minitest//lib/minitest.rb#631 + # source://minitest//lib/minitest.rb#634 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -137,17 +143,17 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest//lib/minitest.rb#640 + # source://minitest//lib/minitest.rb#643 def record(result); end # Outputs the summary of the run. # - # source://minitest//lib/minitest.rb#646 + # source://minitest//lib/minitest.rb#649 def report; end # Starts reporting on the run. # - # source://minitest//lib/minitest.rb#624 + # source://minitest//lib/minitest.rb#627 def start; end # source://mutex_m/0.1.2/mutex_m.rb#78 @@ -162,20 +168,20 @@ end # Represents run failures. # -# source://minitest//lib/minitest.rb#935 +# source://minitest//lib/minitest.rb#938 class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#936 + # source://minitest//lib/minitest.rb#939 def error; end # Where was this run before an assertion was raised? # - # source://minitest//lib/minitest.rb#943 + # source://minitest//lib/minitest.rb#946 def location; end - # source://minitest//lib/minitest.rb#952 + # source://minitest//lib/minitest.rb#955 def result_code; end - # source://minitest//lib/minitest.rb#956 + # source://minitest//lib/minitest.rb#959 def result_label; end end @@ -618,60 +624,60 @@ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # # See Minitest.backtrace_filter=. # -# source://minitest//lib/minitest.rb#1067 +# source://minitest//lib/minitest.rb#1070 class Minitest::BacktraceFilter # Filter +bt+ to something useful. Returns the whole thing if # $DEBUG (ruby) or $MT_DEBUG (env). # - # source://minitest//lib/minitest.rb#1075 + # source://minitest//lib/minitest.rb#1078 def filter(bt); end end -# source://minitest//lib/minitest.rb#1069 +# source://minitest//lib/minitest.rb#1072 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest//lib/minitest.rb#884 +# source://minitest//lib/minitest.rb#887 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest//lib/minitest.rb#890 + # source://minitest//lib/minitest.rb#893 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest//lib/minitest.rb#902 + # source://minitest//lib/minitest.rb#905 def <<(reporter); end - # source://minitest//lib/minitest.rb#895 + # source://minitest//lib/minitest.rb#898 def io; end # @return [Boolean] # - # source://minitest//lib/minitest.rb#906 + # source://minitest//lib/minitest.rb#909 def passed?; end - # source://minitest//lib/minitest.rb#914 + # source://minitest//lib/minitest.rb#917 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#921 + # source://minitest//lib/minitest.rb#924 def record(result); end - # source://minitest//lib/minitest.rb#927 + # source://minitest//lib/minitest.rb#930 def report; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#888 + # source://minitest//lib/minitest.rb#891 def reporters; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#888 + # source://minitest//lib/minitest.rb#891 def reporters=(_arg0); end - # source://minitest//lib/minitest.rb#910 + # source://minitest//lib/minitest.rb#913 def start; end end @@ -689,48 +695,48 @@ end # # ... lots of test methods ... # end # -# source://minitest//lib/minitest.rb#1011 +# source://minitest//lib/minitest.rb#1014 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1016 + # source://minitest//lib/minitest.rb#1019 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1023 + # source://minitest//lib/minitest.rb#1026 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1033 + # source://minitest//lib/minitest.rb#1036 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1040 + # source://minitest//lib/minitest.rb#1043 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1047 + # source://minitest//lib/minitest.rb#1050 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1057 + # source://minitest//lib/minitest.rb#1060 def windows?(platform = T.unsafe(nil)); end end @@ -793,36 +799,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#683 +# source://minitest//lib/minitest.rb#686 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#684 + # source://minitest//lib/minitest.rb#687 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#691 + # source://minitest//lib/minitest.rb#694 def record(result); end end # Shared code for anything that can get passed to a Reporter. See # Minitest::Test & Minitest::Result. # -# source://minitest//lib/minitest.rb#514 +# source://minitest//lib/minitest.rb#517 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#534 + # source://minitest//lib/minitest.rb#537 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#555 + # source://minitest//lib/minitest.rb#558 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest//lib/minitest.rb#529 + # source://minitest//lib/minitest.rb#532 def location; end # Did this run pass? @@ -832,47 +838,47 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest//lib/minitest.rb#521 + # source://minitest//lib/minitest.rb#524 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest//lib/minitest.rb#541 + # source://minitest//lib/minitest.rb#544 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#548 + # source://minitest//lib/minitest.rb#551 def skipped?; end end -# source://minitest//lib/minitest.rb#659 +# source://minitest//lib/minitest.rb#662 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest//lib/minitest.rb#668 + # source://minitest//lib/minitest.rb#671 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest//lib/minitest.rb#661 + # source://minitest//lib/minitest.rb#664 def io; end # The IO used to report. # - # source://minitest//lib/minitest.rb#661 + # source://minitest//lib/minitest.rb#664 def io=(_arg0); end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#666 + # source://minitest//lib/minitest.rb#669 def options; end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#666 + # source://minitest//lib/minitest.rb#669 def options=(_arg0); end end @@ -882,80 +888,80 @@ end # blow up. By using Result.from(a_test) you can be reasonably sure # that the test result can be marshalled. # -# source://minitest//lib/minitest.rb#567 +# source://minitest//lib/minitest.rb#570 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest//lib/minitest.rb#601 + # source://minitest//lib/minitest.rb#604 def class_name; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#576 + # source://minitest//lib/minitest.rb#579 def klass; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#576 + # source://minitest//lib/minitest.rb#579 def klass=(_arg0); end # The location of the test method. # - # source://minitest//lib/minitest.rb#581 + # source://minitest//lib/minitest.rb#584 def source_location; end # The location of the test method. # - # source://minitest//lib/minitest.rb#581 + # source://minitest//lib/minitest.rb#584 def source_location=(_arg0); end - # source://minitest//lib/minitest.rb#605 + # source://minitest//lib/minitest.rb#608 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest//lib/minitest.rb#586 + # source://minitest//lib/minitest.rb#589 def from(runnable); end end end # re-open # -# source://minitest//lib/minitest.rb#277 +# source://minitest//lib/minitest.rb#280 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest//lib/minitest.rb#445 + # source://minitest//lib/minitest.rb#448 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#284 def assertions; end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#284 def assertions=(_arg0); end - # source://minitest//lib/minitest.rb#441 + # source://minitest//lib/minitest.rb#444 def failure; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#289 def failures; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#289 def failures=(_arg0); end - # source://minitest//lib/minitest.rb#427 + # source://minitest//lib/minitest.rb#430 def marshal_dump; end - # source://minitest//lib/minitest.rb#437 + # source://minitest//lib/minitest.rb#440 def marshal_load(ary); end # Metadata you attach to the test results that get sent to the reporter. @@ -965,29 +971,29 @@ class Minitest::Runnable # NOTE: this data *must* be plain (read: marshal-able) data! # Hashes! Arrays! Strings! # - # source://minitest//lib/minitest.rb#460 + # source://minitest//lib/minitest.rb#463 def metadata; end # Sets metadata, mainly used for +Result.from+. # - # source://minitest//lib/minitest.rb#467 + # source://minitest//lib/minitest.rb#470 def metadata=(_arg0); end # Returns true if metadata exists. # # @return [Boolean] # - # source://minitest//lib/minitest.rb#472 + # source://minitest//lib/minitest.rb#475 def metadata?; end # Name of the run. # - # source://minitest//lib/minitest.rb#304 + # source://minitest//lib/minitest.rb#307 def name; end # Set the name of the run. # - # source://minitest//lib/minitest.rb#311 + # source://minitest//lib/minitest.rb#314 def name=(o); end # Did this run pass? @@ -998,7 +1004,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#489 + # source://minitest//lib/minitest.rb#492 def passed?; end # Returns a single character string to print based on the result @@ -1007,14 +1013,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#498 + # source://minitest//lib/minitest.rb#501 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#479 + # source://minitest//lib/minitest.rb#482 def run; end # Was this run skipped? See #passed? for more information. @@ -1022,42 +1028,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#505 + # source://minitest//lib/minitest.rb#508 def skipped?; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#294 def time; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#294 def time=(_arg0); end - # source://minitest//lib/minitest.rb#293 + # source://minitest//lib/minitest.rb#296 def time_it; end class << self - # source://minitest//lib/minitest.rb#1109 + # source://minitest//lib/minitest.rb#1112 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest//lib/minitest.rb#318 + # source://minitest//lib/minitest.rb#321 def methods_matching(re); end - # source://minitest//lib/minitest.rb#397 + # source://minitest//lib/minitest.rb#400 def on_signal(name, action); end - # source://minitest//lib/minitest.rb#322 + # source://minitest//lib/minitest.rb#325 def reset; end # Responsible for running all runnable methods in a given class, # each in its own instance. Each instance is passed to the # reporter to record. # - # source://minitest//lib/minitest.rb#333 + # source://minitest//lib/minitest.rb#336 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1065,7 +1071,7 @@ class Minitest::Runnable # that subclasses can specialize the running of an individual # test. See Minitest::ParallelTest::ClassMethods for an example. # - # source://minitest//lib/minitest.rb#369 + # source://minitest//lib/minitest.rb#372 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1073,33 +1079,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#414 + # source://minitest//lib/minitest.rb#417 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest//lib/minitest.rb#421 + # source://minitest//lib/minitest.rb#424 def runnables; end # Defines the order to run tests (:random by default). Override # this or use a convenience method to change it for your tests. # - # source://minitest//lib/minitest.rb#378 + # source://minitest//lib/minitest.rb#381 def test_order; end - # source://minitest//lib/minitest.rb#382 + # source://minitest//lib/minitest.rb#385 def with_info_handler(reporter, &block); end end end -# source://minitest//lib/minitest.rb#395 +# source://minitest//lib/minitest.rb#398 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest//lib/minitest.rb#964 +# source://minitest//lib/minitest.rb#967 class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#965 + # source://minitest//lib/minitest.rb#968 def result_label; end end @@ -1123,113 +1129,113 @@ end # end # end # -# source://minitest//lib/minitest.rb#719 +# source://minitest//lib/minitest.rb#722 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest//lib/minitest.rb#763 + # source://minitest//lib/minitest.rb#766 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest//lib/minitest.rb#723 + # source://minitest//lib/minitest.rb#726 def assertions; end # Total number of assertions. # - # source://minitest//lib/minitest.rb#723 + # source://minitest//lib/minitest.rb#726 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest//lib/minitest.rb#728 + # source://minitest//lib/minitest.rb#731 def count; end # Total number of test cases. # - # source://minitest//lib/minitest.rb#728 + # source://minitest//lib/minitest.rb#731 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#756 + # source://minitest//lib/minitest.rb#759 def errors; end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#756 + # source://minitest//lib/minitest.rb#759 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#751 + # source://minitest//lib/minitest.rb#754 def failures; end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#751 + # source://minitest//lib/minitest.rb#754 def failures=(_arg0); end # @return [Boolean] # - # source://minitest//lib/minitest.rb#776 + # source://minitest//lib/minitest.rb#779 def passed?; end - # source://minitest//lib/minitest.rb#784 + # source://minitest//lib/minitest.rb#787 def record(result); end # Report on the tracked statistics. # - # source://minitest//lib/minitest.rb#794 + # source://minitest//lib/minitest.rb#797 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#733 + # source://minitest//lib/minitest.rb#736 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#733 + # source://minitest//lib/minitest.rb#736 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#761 + # source://minitest//lib/minitest.rb#764 def skips; end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#761 + # source://minitest//lib/minitest.rb#764 def skips=(_arg0); end - # source://minitest//lib/minitest.rb#780 + # source://minitest//lib/minitest.rb#783 def start; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#740 + # source://minitest//lib/minitest.rb#743 def start_time; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#740 + # source://minitest//lib/minitest.rb#743 def start_time=(_arg0); end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#746 + # source://minitest//lib/minitest.rb#749 def total_time; end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#746 + # source://minitest//lib/minitest.rb#749 def total_time=(_arg0); end end @@ -1241,48 +1247,48 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#814 +# source://minitest//lib/minitest.rb#817 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest//lib/minitest.rb#849 + # source://minitest//lib/minitest.rb#852 def aggregated_results(io); end # Returns the value of attribute old_sync. # - # source://minitest//lib/minitest.rb#817 + # source://minitest//lib/minitest.rb#820 def old_sync; end # Sets the attribute old_sync # # @param value the value to set the attribute old_sync to. # - # source://minitest//lib/minitest.rb#817 + # source://minitest//lib/minitest.rb#820 def old_sync=(_arg0); end - # source://minitest//lib/minitest.rb#832 + # source://minitest//lib/minitest.rb#835 def report; end # :startdoc: # - # source://minitest//lib/minitest.rb#820 + # source://minitest//lib/minitest.rb#823 def start; end - # source://minitest//lib/minitest.rb#844 + # source://minitest//lib/minitest.rb#847 def statistics; end - # source://minitest//lib/minitest.rb#869 + # source://minitest//lib/minitest.rb#872 def summary; end # :stopdoc: # - # source://minitest//lib/minitest.rb#816 + # source://minitest//lib/minitest.rb#819 def sync; end # :stopdoc: # - # source://minitest//lib/minitest.rb#816 + # source://minitest//lib/minitest.rb#819 def sync=(_arg0); end - # source://minitest//lib/minitest.rb#865 + # source://minitest//lib/minitest.rb#868 def to_s; end end @@ -1463,30 +1469,30 @@ Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) # Assertion wrapping an unexpected error that was raised during a run. # -# source://minitest//lib/minitest.rb#973 +# source://minitest//lib/minitest.rb#976 class Minitest::UnexpectedError < ::Minitest::Assertion # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest//lib/minitest.rb#977 + # source://minitest//lib/minitest.rb#980 def initialize(error); end - # source://minitest//lib/minitest.rb#982 + # source://minitest//lib/minitest.rb#985 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#975 + # source://minitest//lib/minitest.rb#978 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#975 + # source://minitest//lib/minitest.rb#978 def error=(_arg0); end - # source://minitest//lib/minitest.rb#986 + # source://minitest//lib/minitest.rb#989 def message; end - # source://minitest//lib/minitest.rb#991 + # source://minitest//lib/minitest.rb#994 def result_label; end end diff --git a/sorbet/rbi/gems/reline@0.3.5.rbi b/sorbet/rbi/gems/reline@0.3.8.rbi similarity index 100% rename from sorbet/rbi/gems/reline@0.3.5.rbi rename to sorbet/rbi/gems/reline@0.3.8.rbi diff --git a/sorbet/rbi/gems/rexml@3.2.5.rbi b/sorbet/rbi/gems/rexml@3.2.6.rbi similarity index 97% rename from sorbet/rbi/gems/rexml@3.2.5.rbi rename to sorbet/rbi/gems/rexml@3.2.6.rbi index a94e56718..c8d67b58d 100644 --- a/sorbet/rbi/gems/rexml@3.2.5.rbi +++ b/sorbet/rbi/gems/rexml@3.2.6.rbi @@ -101,18 +101,18 @@ class REXML::Attribute # # @return [Attribute] a new instance of Attribute # - # source://rexml//lib/rexml/attribute.rb#45 + # source://rexml//lib/rexml/attribute.rb#42 def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end # Returns true if other is an Attribute and has the same name and value, # false otherwise. # - # source://rexml//lib/rexml/attribute.rb#109 + # source://rexml//lib/rexml/attribute.rb#106 def ==(other); end # Returns a copy of this attribute # - # source://rexml//lib/rexml/attribute.rb#158 + # source://rexml//lib/rexml/attribute.rb#163 def clone; end # source://rexml//lib/rexml/attribute.rb#132 @@ -128,15 +128,15 @@ class REXML::Attribute # # Returns this attribute # - # source://rexml//lib/rexml/attribute.rb#166 + # source://rexml//lib/rexml/attribute.rb#171 def element=(element); end # Creates (and returns) a hash from both the name and value # - # source://rexml//lib/rexml/attribute.rb#114 + # source://rexml//lib/rexml/attribute.rb#111 def hash; end - # source://rexml//lib/rexml/attribute.rb#192 + # source://rexml//lib/rexml/attribute.rb#197 def inspect; end # Returns the namespace URL, if defined, or nil otherwise @@ -161,17 +161,17 @@ class REXML::Attribute # e.add_attribute("a", "b") # e.attribute("a").namespace # => "" # - # source://rexml//lib/rexml/attribute.rb#98 + # source://rexml//lib/rexml/attribute.rb#95 def namespace(arg = T.unsafe(nil)); end - # source://rexml//lib/rexml/attribute.rb#188 + # source://rexml//lib/rexml/attribute.rb#193 def node_type; end # The normalized value of this attribute. That is, the attribute with # entities intact. # - # source://rexml//lib/rexml/attribute.rb#18 - def normalized=(_arg0); end + # source://rexml//lib/rexml/attribute.rb#157 + def normalized=(new_normalized); end # Returns the namespace of the attribute. # @@ -183,14 +183,14 @@ class REXML::Attribute # a = Attribute.new( "x", "y" ) # a.prefix # -> "" # - # source://rexml//lib/rexml/attribute.rb#73 + # source://rexml//lib/rexml/attribute.rb#70 def prefix; end # Removes this Attribute from the tree, and returns true if successful # # This method is usually not called directly. # - # source://rexml//lib/rexml/attribute.rb#179 + # source://rexml//lib/rexml/attribute.rb#184 def remove; end # Returns the attribute value, with entities replaced @@ -205,21 +205,21 @@ class REXML::Attribute # b = Attribute.new( "ns:x", "y" ) # b.to_string # -> "ns:x='y'" # - # source://rexml//lib/rexml/attribute.rb#124 + # source://rexml//lib/rexml/attribute.rb#121 def to_string; end # Returns the UNNORMALIZED value of this attribute. That is, entities # have been expanded to their values # - # source://rexml//lib/rexml/attribute.rb#150 + # source://rexml//lib/rexml/attribute.rb#149 def value; end # Writes this attribute (EG, puts 'key="value"' to the output) # - # source://rexml//lib/rexml/attribute.rb#184 + # source://rexml//lib/rexml/attribute.rb#189 def write(output, indent = T.unsafe(nil)); end - # source://rexml//lib/rexml/attribute.rb#198 + # source://rexml//lib/rexml/attribute.rb#203 def xpath; end end @@ -978,7 +978,7 @@ class REXML::Document < ::REXML::Element # d.to_s # => "FooBar" # # When argument +document+ is given, it must be an existing - # document object, whose context and attributes (but not chidren) + # document object, whose context and attributes (but not children) # are cloned into the new document: # # d = REXML::Document.new(xml_string) @@ -2225,7 +2225,7 @@ class REXML::Element < ::REXML::Parent # :call-seq: # has_text? -> true or false # - # Returns +true if the element has one or more text noded, + # Returns +true+ if the element has one or more text noded, # +false+ otherwise: # # d = REXML::Document.new 'text' @@ -2473,7 +2473,7 @@ class REXML::Element < ::REXML::Parent # text(xpath = nil) -> text_string or nil # # Returns the text string from the first text node child - # in a specified element, if it exists, # +nil+ otherwise. + # in a specified element, if it exists, +nil+ otherwise. # # With no argument, returns the text from the first text node in +self+: # @@ -2481,7 +2481,7 @@ class REXML::Element < ::REXML::Parent # d.root.text.class # => String # d.root.text # => "some text " # - # With argument +xpath+, returns text from the the first text node + # With argument +xpath+, returns text from the first text node # in the element that matches +xpath+: # # d.root.text(1) # => "this is bold!" @@ -3252,6 +3252,9 @@ class REXML::Entity < ::REXML::Child # source://rexml//lib/rexml/entity.rb#85 def normalized; end + # source://rexml//lib/rexml/entity.rb#138 + def parent=(other); end + # Returns the value of attribute pubid. # # source://rexml//lib/rexml/entity.rb#22 @@ -3298,6 +3301,11 @@ class REXML::Entity < ::REXML::Child # source://rexml//lib/rexml/entity.rb#97 def write(out, indent = T.unsafe(nil)); end + private + + # source://rexml//lib/rexml/entity.rb#144 + def resolve_value; end + class << self # Evaluates whether the given string matches an entity definition, # returning true if so, and false otherwise. @@ -3554,6 +3562,54 @@ class REXML::Instruction < ::REXML::Child def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end end +# Adds named attributes to an object. +# +# source://rexml//lib/rexml/namespace.rb#7 +module REXML::Namespace + include ::REXML::XMLTokens + + # The name of the object, valid if set + # + # source://rexml//lib/rexml/namespace.rb#9 + def expanded_name; end + + # Fully expand the name, even if the prefix wasn't specified in the + # source file. + # + # source://rexml//lib/rexml/namespace.rb#57 + def fully_expanded_name; end + + # Compares names optionally WITH namespaces + # + # @return [Boolean] + # + # source://rexml//lib/rexml/namespace.rb#43 + def has_name?(other, ns = T.unsafe(nil)); end + + # The name of the object, valid if set + # + # source://rexml//lib/rexml/namespace.rb#9 + def name; end + + # Sets the name and the expanded name + # + # source://rexml//lib/rexml/namespace.rb#17 + def name=(name); end + + # The expanded name of the object, valid if name is set + # + # source://rexml//lib/rexml/namespace.rb#11 + def prefix; end + + # The expanded name of the object, valid if name is set + # + # source://rexml//lib/rexml/namespace.rb#11 + def prefix=(_arg0); end +end + +# source://rexml//lib/rexml/namespace.rb#13 +REXML::Namespace::NAME_WITHOUT_NAMESPACE = T.let(T.unsafe(nil), Regexp) + # source://rexml//lib/rexml/doctype.rb#280 class REXML::NotationDecl < ::REXML::Child # @return [NotationDecl] a new instance of NotationDecl @@ -3972,57 +4028,62 @@ end # There is strange, dark magic at work in this code. Beware. Go back! Go # back while you still can! # -# source://rexml//lib/rexml/parsers/xpathparser.rb#11 +# source://rexml//lib/rexml/parsers/xpathparser.rb#12 class REXML::Parsers::XPathParser include ::REXML::XMLTokens - # source://rexml//lib/rexml/parsers/xpathparser.rb#41 - def abbreviate(path); end + # source://rexml//lib/rexml/parsers/xpathparser.rb#42 + def abbreviate(path_or_parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#99 - def expand(path); end + # source://rexml//lib/rexml/parsers/xpathparser.rb#132 + def expand(path_or_parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#15 + # source://rexml//lib/rexml/parsers/xpathparser.rb#16 def namespaces=(namespaces); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#20 + # source://rexml//lib/rexml/parsers/xpathparser.rb#21 def parse(path); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#35 + # For backward compatibility + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + def preciate_to_string(parsed, &block); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#36 def predicate(path); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#138 - def predicate_to_string(path, &block); end + # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + def predicate_to_path(parsed, &block); end private # | AdditiveExpr ('+' | '-') MultiplicativeExpr # | MultiplicativeExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#455 + # source://rexml//lib/rexml/parsers/xpathparser.rb#505 def AdditiveExpr(path, parsed); end # | AndExpr S 'and' S EqualityExpr # | EqualityExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#388 + # source://rexml//lib/rexml/parsers/xpathparser.rb#438 def AndExpr(path, parsed); end # | EqualityExpr ('=' | '!=') RelationalExpr # | RelationalExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#407 + # source://rexml//lib/rexml/parsers/xpathparser.rb#457 def EqualityExpr(path, parsed); end # | FilterExpr Predicate # | PrimaryExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#558 + # source://rexml//lib/rexml/parsers/xpathparser.rb#608 def FilterExpr(path, parsed); end # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' # - # source://rexml//lib/rexml/parsers/xpathparser.rb#613 + # source://rexml//lib/rexml/parsers/xpathparser.rb#663 def FunctionCall(rest, parsed); end # LocationPath @@ -4030,69 +4091,72 @@ class REXML::Parsers::XPathParser # | '/' RelativeLocationPath? # | '//' RelativeLocationPath # - # source://rexml//lib/rexml/parsers/xpathparser.rb#193 + # source://rexml//lib/rexml/parsers/xpathparser.rb#243 def LocationPath(path, parsed); end # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr # | UnaryExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#478 + # source://rexml//lib/rexml/parsers/xpathparser.rb#528 def MultiplicativeExpr(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#293 + # source://rexml//lib/rexml/parsers/xpathparser.rb#343 def NodeTest(path, parsed); end # | OrExpr S 'or' S AndExpr # | AndExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#369 + # source://rexml//lib/rexml/parsers/xpathparser.rb#419 def OrExpr(path, parsed); end # | LocationPath # | FilterExpr ('/' | '//') RelativeLocationPath # - # source://rexml//lib/rexml/parsers/xpathparser.rb#540 + # source://rexml//lib/rexml/parsers/xpathparser.rb#590 def PathExpr(path, parsed); end # Filters the supplied nodeset on the predicate(s) # - # source://rexml//lib/rexml/parsers/xpathparser.rb#345 + # source://rexml//lib/rexml/parsers/xpathparser.rb#395 def Predicate(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#576 + # source://rexml//lib/rexml/parsers/xpathparser.rb#626 def PrimaryExpr(path, parsed); end # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr # | AdditiveExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#430 + # source://rexml//lib/rexml/parsers/xpathparser.rb#480 def RelationalExpr(path, parsed); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#217 + # source://rexml//lib/rexml/parsers/xpathparser.rb#267 def RelativeLocationPath(path, parsed); end # | '-' UnaryExpr # | UnionExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#503 + # source://rexml//lib/rexml/parsers/xpathparser.rb#553 def UnaryExpr(path, parsed); end # | UnionExpr '|' PathExpr # | PathExpr # - # source://rexml//lib/rexml/parsers/xpathparser.rb#521 + # source://rexml//lib/rexml/parsers/xpathparser.rb#571 def UnionExpr(path, parsed); end # get_group( '[foo]bar' ) -> ['bar', '[foo]'] # - # source://rexml//lib/rexml/parsers/xpathparser.rb#626 + # source://rexml//lib/rexml/parsers/xpathparser.rb#676 def get_group(string); end - # source://rexml//lib/rexml/parsers/xpathparser.rb#644 + # source://rexml//lib/rexml/parsers/xpathparser.rb#694 def parse_args(string); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#224 + def quote_literal(literal); end end -# source://rexml//lib/rexml/parsers/xpathparser.rb#289 +# source://rexml//lib/rexml/parsers/xpathparser.rb#339 REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) # Returns a 1-1 map of the nodeset @@ -4106,7 +4170,7 @@ REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) # | PI '(' LITERAL ')' PI # | '[' expr ']' Predicate # -# source://rexml//lib/rexml/parsers/xpathparser.rb#288 +# source://rexml//lib/rexml/parsers/xpathparser.rb#338 REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) # source://rexml//lib/rexml/doctype.rb#10 @@ -4401,7 +4465,7 @@ class REXML::Text < ::REXML::Child # source://rexml//lib/rexml/text.rb#131 def check(string, pattern, doctype); end - # source://rexml//lib/rexml/text.rb#405 + # source://rexml//lib/rexml/text.rb#407 def expand(ref, doctype, filter); end # Escapes all possible entities @@ -4416,7 +4480,7 @@ class REXML::Text < ::REXML::Child # Unescapes all possible entities # - # source://rexml//lib/rexml/text.rb#392 + # source://rexml//lib/rexml/text.rb#394 def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end end end diff --git a/sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi b/sorbet/rbi/gems/rubocop-minitest@0.31.1.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi rename to sorbet/rbi/gems/rubocop-minitest@0.31.1.rbi index a31818e7e..02ab7e21b 100644 --- a/sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi +++ b/sorbet/rbi/gems/rubocop-minitest@0.31.1.rbi @@ -1516,39 +1516,38 @@ RuboCop::Cop::Minitest::RefuteEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # bad # assert("rubocop-minitest" != actual) -# assert(! "rubocop-minitest" == actual) # # # good # refute_equal("rubocop-minitest", actual) # -# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#17 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#16 class RuboCop::Cop::Minitest::RefuteEqual < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::ArgumentRangeHelper extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#24 + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#23 def assert_not_equal(param0 = T.unsafe(nil)); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#28 + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#27 def on_send(node); end private - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#50 + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#49 def original_usage(first_part, custom_message); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#46 + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#45 def preferred_usage(first_arg, second_arg, custom_message = T.unsafe(nil)); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#54 + # source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#53 def process_not_equal(node); end end -# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#21 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#20 RuboCop::Cop::Minitest::RefuteEqual::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#22 +# source://rubocop-minitest//lib/rubocop/cop/minitest/refute_equal.rb#21 RuboCop::Cop::Minitest::RefuteEqual::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the use of `refute(object)` over `assert_equal(false, object)`. @@ -2430,7 +2429,7 @@ module RuboCop::Cop::MinitestExplorationHelpers # @api private # @return [Boolean] # - # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_exploration_helpers.rb#113 + # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_exploration_helpers.rb#112 def lifecycle_hook_method?(node); end # @api private diff --git a/sorbet/rbi/gems/rubocop-shopify@2.13.0.rbi b/sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi similarity index 100% rename from sorbet/rbi/gems/rubocop-shopify@2.13.0.rbi rename to sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi similarity index 68% rename from sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi index 63d013ee0..787dd0abd 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi @@ -4,19 +4,19 @@ # This is an autogenerated file for types exported from the `rubocop-sorbet` gem. # Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#2 +# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#3 module RuboCop; end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#6 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#4 module RuboCop::Cop; end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#7 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#5 module RuboCop::Cop::Sorbet; end -# This cop disallows using `.override(allow_incompatible: true)`. +# Disallows using `.override(allow_incompatible: true)`. # Using `allow_incompatible` suggests a violation of the Liskov # Substitution Principle, meaning that a subclass is not a valid -# subtype of it's superclass. This Cop prevents these design smells +# subtype of its superclass. This Cop prevents these design smells # from occurring. # # @example @@ -28,26 +28,33 @@ module RuboCop::Cop::Sorbet; end # sig.override # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#21 -class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#35 - def allow_incompatible?(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#39 - def allow_incompatible_override?(param0 = T.unsafe(nil)); end +class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#55 + def on_block(node); end - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#31 - def not_nil?(node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#55 + def on_numblock(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#48 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#49 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#22 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#41 + def override?(param0 = T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#36 def sig?(param0); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#27 + def sig_dot_override?(param0 = T.unsafe(nil)); end end -# This cop disallows binding the return value of `T.any`, `T.all`, `T.enum` +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#22 +RuboCop::Cop::Sorbet::AllowIncompatibleOverride::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#24 +RuboCop::Cop::Sorbet::AllowIncompatibleOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows binding the return value of `T.any`, `T.all`, `T.enum` # to a constant directly. To bind the value, one must use `T.type_alias`. # # @example @@ -58,60 +65,47 @@ end # # good # FooOrBar = T.type_alias { T.any(Foo, Bar) } # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#18 -class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#116 - def autocorrect(node); end +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#18 +class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#19 - def binding_unaliased_type?(param0 = T.unsafe(nil)); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#65 + def on_casgn(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#51 - def dynamic_type_creation_with_block?(param0 = T.unsafe(nil)); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#48 + def requires_type_alias?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#66 - def generic_parameter_decl_block_call?(param0 = T.unsafe(nil)); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#38 + def type_alias_with_block?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#60 - def generic_parameter_decl_call?(param0 = T.unsafe(nil)); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#29 + def type_alias_without_block(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#72 - def method_needing_aliasing_on_t?(param0); end + private - # @return [Boolean] + # Given nested send nodes, returns the leaf with explicit receiver. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#85 - def not_dynamic_type_creation_with_block?(node); end - - # @return [Boolean] + # i.e. in Ruby # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#89 - def not_generic_parameter_decl?(node); end - - # @return [Boolean] + # a.b.c.d.e.f + # ^^^ # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#93 - def not_nil?(node); end - - # @return [Boolean] + # i.e. in AST # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#81 - def not_t_let?(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#97 - def on_casgn(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#41 - def t_let?(param0 = T.unsafe(nil)); end + # (send (send (send (send (send (send nil :a) :b) :c) :d) :e) :f) + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#98 + def send_leaf(node); end +end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#32 - def using_deprecated_type_alias_syntax?(param0 = T.unsafe(nil)); end +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#21 +RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::MSG = T.let(T.unsafe(nil), String) - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#23 - def using_type_alias?(param0 = T.unsafe(nil)); end -end +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#23 +RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::WITHOUT_BLOCK_MSG = T.let(T.unsafe(nil), String) -# This cop ensures that callback conditionals are bound to the right type +# Ensures that callback conditionals are bound to the right type # so that they are type checked properly. # # Auto-correction is unsafe because other libraries define similar style callbacks as Rails, but don't always need @@ -143,17 +137,17 @@ end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#35 class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#47 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#75 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#99 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#127 def on_send(node); end end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#36 RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array) -# This cop disallows the usage of `checked(true)`. This usage could cause +# Disallows the usage of `checked(true)`. This usage could cause # confusion; it could lead some people to believe that a method would be checked # even if runtime checks have not been enabled on the class or globally. # Additionally, in the event where checks are enabled, `checked(true)` would @@ -171,17 +165,17 @@ RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(ni class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#25 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#26 def offending_node(param0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#36 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#37 def on_signature(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#29 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#30 RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) -# This cop disallows the calls that are used to get constants fom Strings +# Disallows the calls that are used to get constants fom Strings # such as +constantize+, +const_get+, and +constants+. # # The goal of this cop is to make the code easier to statically analyze, @@ -210,16 +204,16 @@ RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), Str # # good # { "User" => User }.fetch(class_name) # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#36 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#38 def constant_from_string?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#41 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#42 def on_send(node); end end -# This cop checks for blank lines after signatures. +# Checks for blank lines after signatures. # # It also suggests an autocorrect # @@ -250,7 +244,7 @@ class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Sorbet::Signatur def next_method(node); end end -# This cop checks that the Sorbet sigil comes as the first magic comment in the file. +# Checks that the Sorbet sigil comes as the first magic comment in the file. # # The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal. # @@ -283,31 +277,31 @@ class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSig # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#91 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#92 def check_magic_comments_order(tokens); end # Get all the tokens in `processed_source` that match `MAGIC_REGEX` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#83 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#84 def extract_magic_comments(processed_source); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#67 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#68 RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#69 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#70 RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#68 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#69 RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#78 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#79 RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#71 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#72 RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) -# This cop checks that every method definition and attribute accessor has a Sorbet signature. +# Checks that every method definition and attribute accessor has a Sorbet signature. # # It also suggest an autocorrect with placeholders so the following code: # @@ -334,83 +328,83 @@ class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::Signatur # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#30 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#35 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#36 def accessor?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#55 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#56 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#39 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#40 def on_def(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#43 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#44 def on_defs(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#47 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#48 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#51 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#52 def on_signature(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#74 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#75 def scope(node); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#82 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#84 def check_node(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#93 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#95 def param_type_placeholder; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#97 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#99 def return_type_placeholder; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#101 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#103 class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion # @return [SigSuggestion] a new instance of SigSuggestion # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#106 def initialize(indent, param_placeholder, return_placeholder); end # Returns the value of attribute params. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 def params; end # Sets the attribute params # # @param value the value to set the attribute params to. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 def params=(_arg0); end # Returns the value of attribute returns. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 def returns; end # Sets the attribute returns # # @param value the value to set the attribute returns to. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 def returns=(_arg0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#112 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#114 def to_autocorrect; end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#124 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#126 def generate_params; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#135 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#138 def generate_return; end end -# This cop checks that there is only one Sorbet sigil in a given file +# Checks that there is only one Sorbet sigil in a given file # # For example, the following class with two sigils # @@ -430,7 +424,7 @@ end class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#39 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#40 def autocorrect(_node); end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#29 @@ -438,11 +432,11 @@ class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSi protected - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#55 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#56 def extract_all_sigils(processed_source); end end -# This cop makes the Sorbet `false` sigil mandatory in all files. +# Makes the Sorbet `false` sigil mandatory in all files. # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/false_sigil.rb#10 class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil @@ -450,7 +444,7 @@ class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end -# This cop ensures RBI shims do not include a call to extend T::Sig +# Ensures RBI shims do not include a call to extend T::Sig # or to extend T::Helpers # # @example @@ -471,42 +465,58 @@ end # end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#25 -class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Cop +class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#39 - def autocorrect(node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#33 + def extend_t_sig_or_helpers?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#35 - def extend_t_helpers?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#31 - def extend_t_sig?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#47 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#37 def on_send(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#28 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#29 RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#29 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#30 RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Correct `send` expressions in include statements by constant literals. +# +# Sorbet, the static checker, is not (yet) able to support constructs on the +# following form: +# +# ```ruby +# class MyClass +# include send_expr +# end +# ``` +# +# Multiple occurences of this can be found in Shopify's code base like: +# +# ```ruby +# include Rails.application.routes.url_helpers +# ``` +# or +# ```ruby +# include Polaris::Engine.helpers +# ``` +# # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#29 class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop # @return [ForbidIncludeConstLiteral] a new instance of ForbidIncludeConstLiteral # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#40 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#41 def initialize(*_arg0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#56 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#60 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#34 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#35 def not_lit_const_include?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#45 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#46 def on_send(node); end # Returns the value of attribute used_names. @@ -525,7 +535,7 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#30 RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) -# This cop makes sure that RBI files are always located under the defined allowed paths. +# Makes sure that RBI files are always located under the defined allowed paths. # # Options: # @@ -554,19 +564,38 @@ class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Cop def allowed_paths; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#27 -class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#30 - def not_lit_const_superclass?(param0 = T.unsafe(nil)); end +# Correct superclass `send` expressions by constant literals. +# +# Sorbet, the static checker, is not (yet) able to support constructs on the +# following form: +# +# ```ruby +# class Foo < send_expr; end +# ``` +# +# Multiple occurences of this can be found in Shopify's code base like: +# +# ```ruby +# class ShopScope < Component::TrustedIdScope[ShopIdentity::ShopId] +# ``` +# or +# ```ruby +# class ApiClientEligibility < Struct.new(:api_client, :match_results, :shop) +# ``` +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#28 +class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#32 + def dynamic_superclass?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#38 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#36 def on_class(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#28 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#29 RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) -# This cop disallows using `T.unsafe` anywhere. +# Disallows using `T.unsafe` anywhere. # # @example # @@ -577,15 +606,21 @@ RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), S # foo # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#17 -class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#20 +class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#24 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#18 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#22 def t_unsafe?(param0 = T.unsafe(nil)); end end -# This cop disallows using `T.untyped` anywhere. +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#18 +RuboCop::Cop::Sorbet::ForbidTUnsafe::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#19 +RuboCop::Cop::Sorbet::ForbidTUnsafe::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.untyped` anywhere. # # @example # @@ -598,15 +633,21 @@ end # def foo(my_argument); end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#20 -class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#23 +class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#27 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#21 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#25 def t_untyped?(param0 = T.unsafe(nil)); end end -# This cop disallows use of `T.untyped` or `T.nilable(T.untyped)` +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#21 +RuboCop::Cop::Sorbet::ForbidTUntyped::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#22 +RuboCop::Cop::Sorbet::ForbidTUntyped::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows use of `T.untyped` or `T.nilable(T.untyped)` # as a prop type for `T::Struct` or `T::ImmutableStruct`. # # @example @@ -624,33 +665,32 @@ end # end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#25 -class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#52 +class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#54 def on_class(node); end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#44 def subclass_of_t_struct?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#32 - def t_immutable_struct(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#40 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#39 def t_nilable_untyped(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#28 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#29 def t_struct(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#36 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#34 def t_untyped(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#48 + # Search for untyped prop/const declarations and capture their types + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#50 def untyped_props(param0); end end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#26 RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) -# This cop makes the Sorbet typed sigil mandatory in all files. +# Makes the Sorbet typed sigil mandatory in all files. # # Options: # @@ -667,7 +707,7 @@ class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil def require_sigil_on_all_files?; end end -# This cop makes the Sorbet `ignore` sigil mandatory in all files. +# Makes the Sorbet `ignore` sigil mandatory in all files. # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb#10 class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil @@ -675,7 +715,54 @@ class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end -# This cop checks for the ordering of keyword arguments required by +# Disallows declaring implicit conversion methods. +# Since Sorbet is a nominal (not structural) type system, +# implicit conversion is currently unsupported. +# +# @example +# +# # bad +# def to_str; end +# +# # good +# def to_str(x); end +# +# # bad +# def self.to_str; end +# +# # good +# def self.to_str(x); end +# +# # bad +# alias to_str to_s +# @note Since the arity of aliased methods is not checked, false positives may result. +# @see https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#31 +class RuboCop::Cop::Sorbet::ImplicitConversionMethod < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#37 + def on_alias(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#42 + def on_def(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#42 + def on_defs(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#50 + def on_send(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#32 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::IMPLICIT_CONVERSION_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#33 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#35 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the ordering of keyword arguments required by # sorbet-runtime. The ordering requires that all keyword arguments # are at the end of the parameters list, and all keyword arguments # with a default value must be after those without default values. @@ -697,22 +784,75 @@ class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::Si private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#34 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#35 def check_order_for_kwoptargs(parameters); end end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#8 module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#15 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end class << self - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#9 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#10 def prepended(base); end end end -# This cop ensures one ancestor per requires_ancestor line +# Checks for the obsolete pattern for initializing instance variables that was required for older Sorbet +# +# It's no longer required, as of Sorbet 0.5.10210 +# See https://sorbet.org/docs/type-assertions#put-type-assertions-behind-memoization +# +# @example +# +# # bad +# sig { returns(Foo) } +# def foo +# @foo = T.let(@foo, T.nilable(Foo)) +# @foo ||= Foo.new +# end +# +# # bad +# sig { returns(Foo) } +# def foo +# # This would have been a mistake, causing the memoized value to be discarded and recomputed on every call. +# @foo = T.let(nil, T.nilable(Foo)) +# @foo ||= Foo.new +# end +# +# # good +# sig { returns(Foo) } +# def foo +# @foo ||= T.let(Foo.new, T.nilable(Foo)) +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#37 +class RuboCop::Cop::Sorbet::ObsoleteStrictMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Sorbet::TargetSorbetVersion + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#51 + def legacy_memoization_pattern?(param0 = T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#62 + def on_begin(node); end + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#86 + def relevant_file?(file); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#47 +RuboCop::Cop::Sorbet::ObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) + +# Ensures one ancestor per requires_ancestor line # rather than chaining them as a comma-separated list. # # @example @@ -730,30 +870,30 @@ end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#24 class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#35 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#38 def abstract?(param0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#51 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#56 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#31 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#33 def more_than_one_ancestor(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#45 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#49 def on_class(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#39 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#42 def on_module(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#27 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#28 def requires_ancestors(param0); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#67 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#72 def new_ra_line(indent_count); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#61 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#66 def process_node(node); end end @@ -779,42 +919,41 @@ RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String) # end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#28 -class RuboCop::Cop::Sorbet::RedundantExtendTSig < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#42 - def autocorrect(node); end +class RuboCop::Cop::Sorbet::RedundantExtendTSig < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#32 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#35 def extend_t_sig?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#36 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#39 def on_send(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#29 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#31 RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#30 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#32 RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#15 class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::SignatureCop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#54 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#59 def autocorrect(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#34 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#35 def on_signature(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#30 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#31 def root_call(param0); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#96 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#101 def call_chain(sig_child_node); end # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#92 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#97 def can_autocorrect?; end # This method exists to reparse the current node with modern features enabled. @@ -822,13 +961,13 @@ class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::Signat # "index sends" (i.e. `[]` calls) back to index accessors (i.e. as `foo[bar]``). # Otherwise, we would get the unparsed node as `foo.[](bar)`. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#83 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#88 def node_reparsed_with_modern_features(node); end end # Create a subclass of AST Builder that has modern features turned on # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#72 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#77 class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#16 @@ -840,23 +979,26 @@ RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash) # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#11 class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#30 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#33 def on_block(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#34 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#33 + def on_numblock(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#39 def on_signature(_); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#14 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#15 def signature?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#22 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#24 def with_runtime?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#26 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#29 def without_runtime?(param0 = T.unsafe(nil)); end end -# This cop ensures empty class/module definitions in RBI files are +# Ensures empty class/module definitions in RBI files are # done on a single line rather than being split across multiple lines. # # @example @@ -869,29 +1011,25 @@ end # module SomeModule; end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#17 -class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#28 - def autocorrect(node); end +class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#24 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#22 def on_class(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#20 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#22 def on_module(node); end - protected + private # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#34 - def convert_newlines(source); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#38 - def process_node(node); end + def convert_newlines_to_semicolons(source); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#18 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#20 RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) -# This cop makes the Sorbet `strict` sigil mandatory in all files. +# Makes the Sorbet `strict` sigil mandatory in all files. # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#10 class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil @@ -899,7 +1037,7 @@ class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end -# This cop makes the Sorbet `strong` sigil mandatory in all files. +# Makes the Sorbet `strong` sigil mandatory in all files. # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strong_sigil.rb#10 class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil @@ -907,7 +1045,43 @@ class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end -# This cop makes the Sorbet `true` sigil mandatory in all files. +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#6 +module RuboCop::Cop::Sorbet::TargetSorbetVersion + mixes_in_class_methods ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#24 + def enabled_for_sorbet_static_version?; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#40 + def read_sorbet_static_version_from_bundler_lock_file; end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#31 + def target_sorbet_static_version_from_bundler_lock_file; end + + class << self + # @private + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#8 + def included(target); end + end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#13 +module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + # The version of the Sorbet static type checker required by this cop + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#15 + def minimum_target_sorbet_static_version(version); end + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#19 + def support_target_sorbet_static_version?(version); end +end + +# Makes the Sorbet `true` sigil mandatory in all files. # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/true_sigil.rb#10 class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil @@ -915,7 +1089,7 @@ class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end -# This cop ensures all constants used as `T.type_alias` are using CamelCase. +# Ensures all constants used as `T.type_alias` are using CamelCase. # # @example # @@ -926,18 +1100,18 @@ end # FooOrBar = T.type_alias { T.any(Foo, Bar) } # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#17 -class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#20 - def casgn_type_alias?(param0 = T.unsafe(nil)); end - +class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Base # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#32 def on_casgn(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#21 + def underscored_type_alias?(param0 = T.unsafe(nil)); end end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#18 RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) -# This cop checks that every Ruby file contains a valid Sorbet sigil. +# Checks that every Ruby file contains a valid Sorbet sigil. # Adapted from: https://gist.github.com/clarkdave/85aca4e16f33fd52aceb6a0a29936e52 # # Options: @@ -945,66 +1119,75 @@ RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) # * `RequireSigilOnAllFiles`: make offense if the Sorbet typed is not found in the file (default: false) # * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false') # * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one +# * `ExactStrictness`: If set, make offense if the strictness level in the file is different than this one # -# If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. +# If an `ExactStrictness` level is specified, it will be used in offense messages and autocorrect. +# Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#18 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#20 class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#33 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#35 def autocorrect(_node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#21 + # So we can properly subclass this cop + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#23 def investigate(processed_source); end protected # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#68 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#70 def check_sigil_present(sigil); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#125 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#130 def check_strictness_level(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#103 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#108 def check_strictness_not_empty(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#114 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#119 def check_strictness_valid(sigil, strictness); end + # Default is `nil` + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#180 + def exact_strictness; end + # extraction # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#56 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#58 def extract_sigil(processed_source); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#62 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#64 def extract_strictness(sigil); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#155 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#174 def minimum_strictness; end # Default is `false` # # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#144 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#163 def require_sigil_on_all_files?; end # Default is `'false'` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#149 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#168 def suggested_strictness; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#84 - def suggested_strictness_level(minimum_strictness, suggested_strictness); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#86 + def suggested_strictness_level; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#52 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#54 RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#51 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#53 RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) module RuboCop::Cop::Style; end @@ -1013,16 +1196,16 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour end -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#3 +# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#4 module RuboCop::Sorbet; end -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#11 +# source://rubocop-sorbet//lib/rubocop/sorbet.rb#12 RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash) -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#10 +# source://rubocop-sorbet//lib/rubocop/sorbet.rb#11 RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#7 +# source://rubocop-sorbet//lib/rubocop/sorbet.rb#8 class RuboCop::Sorbet::Error < ::StandardError; end # Because RuboCop doesn't yet support plugins, we have to monkey patch in a @@ -1031,13 +1214,13 @@ class RuboCop::Sorbet::Error < ::StandardError; end # source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#9 module RuboCop::Sorbet::Inject class << self - # source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#10 + # source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#11 def defaults!; end end end -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#9 +# source://rubocop-sorbet//lib/rubocop/sorbet.rb#10 RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#4 +# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#5 RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop@1.52.1.rbi b/sorbet/rbi/gems/rubocop@1.56.3.rbi similarity index 96% rename from sorbet/rbi/gems/rubocop@1.52.1.rbi rename to sorbet/rbi/gems/rubocop@1.56.3.rbi index 315e23113..5703f4a02 100644 --- a/sorbet/rbi/gems/rubocop@1.52.1.rbi +++ b/sorbet/rbi/gems/rubocop@1.56.3.rbi @@ -20,6 +20,10 @@ class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet end +class Regexp::Expression::Quantifier + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + # source://rubocop//lib/rubocop/version.rb#3 module RuboCop; end @@ -96,7 +100,7 @@ class RuboCop::CLI # source://rubocop//lib/rubocop/cli.rb#152 def act_on_options; end - # source://rubocop//lib/rubocop/cli.rb#186 + # source://rubocop//lib/rubocop/cli.rb#189 def apply_default_formatter; end # source://rubocop//lib/rubocop/cli.rb#121 @@ -104,7 +108,7 @@ class RuboCop::CLI # @raise [Finished] # - # source://rubocop//lib/rubocop/cli.rb#177 + # source://rubocop//lib/rubocop/cli.rb#178 def handle_exiting_options; end # source://rubocop//lib/rubocop/cli.rb#140 @@ -412,6 +416,18 @@ end # source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#9 RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) +# Start Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/lsp.rb#10 +class RuboCop::CLI::Command::Lsp < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 + def run; end +end + # Shows the given cops, or all cops by default, and their configurations # for the current directory. # @@ -1481,7 +1497,7 @@ class RuboCop::ConfigLoaderResolver # @api private # # source://rubocop//lib/rubocop/config_loader_resolver.rb#45 - def fix_include_paths(base_config_path, hash, key, value); end + def fix_include_paths(base_config_path, hash, path, key, value); 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 @@ -1490,7 +1506,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#98 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#99 def merge(base_hash, derived_hash, **opts); end # Merges the given configuration with the default one. If @@ -1501,7 +1517,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#74 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#75 def merge_with_default(config, config_file, unset_nil:); end # An `Enabled: true` setting in user configuration for a cop overrides an @@ -1509,7 +1525,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#118 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#119 def override_department_setting_for_cops(base_hash, derived_hash); end # If a cop was previously explicitly enabled, but then superseded by the @@ -1517,7 +1533,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#135 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#136 def override_enabled_for_disabled_departments(base_hash, derived_hash); end # @api private @@ -1527,7 +1543,7 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#54 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#55 def resolve_inheritance_from_gems(hash); end # @api private @@ -1539,79 +1555,79 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#207 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#208 def base_configs(path, inherit_from, file); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#175 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#176 def determine_inherit_mode(hash, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#151 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#152 def disabled?(hash, department); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#155 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#156 def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#268 def gem_config_path(gem_name, relative_config_path); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#245 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 def handle_disabled_by_default(config, new_default_configuration); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#219 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#220 def inherited_file(path, inherit_from, file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#203 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#204 def merge_hashes?(base_hash, derived_hash, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#240 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#241 def remote_file?(uri); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#195 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#196 def should_merge?(mode, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#199 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#200 def should_override?(mode, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#181 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#182 def should_union?(derived_hash, base_hash, root_mode, key); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#263 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#264 def transform(config, &block); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#164 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#165 def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end end @@ -1899,22 +1915,28 @@ class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Ru # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 def alternative; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#35 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 def alternatives; end # @api private + # @return [Boolean] # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + def applies_to_current_ruby_version?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#47 def reason; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#51 def severity; end end @@ -3083,7 +3105,7 @@ class RuboCop::Cop::Base # time as this cop # # @api public - # @return [Array] + # @return [Array] # # source://rubocop//lib/rubocop/cop/base.rb#59 def autocorrect_incompatible_with; end @@ -3276,38 +3298,121 @@ module RuboCop::Cop::Bundler; end # gem 'rubocop', '~> 0.90.0' # end # -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#38 +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#39 class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#57 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#58 def gem_declarations(param0); end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#44 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#45 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#66 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#67 def conditional_declaration?(nodes); end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#59 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#60 def duplicated_gem_nodes; end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#80 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#81 def register_offense(node, gem_name, line_of_first_occurrence); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#74 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#75 def within_conditional?(node, conditional_node); end end -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#41 +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#42 RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) +# A Gem group, or a set of groups, should be listed only once in a Gemfile. +# +# For example, if the values of `source`, `git`, `platforms`, or `path` +# surrounding `group` are different, no offense will be registered: +# +# [source,ruby] +# ----- +# platforms :ruby do +# group :default do +# gem 'openssl' +# end +# end +# +# platforms :jruby do +# group :default do +# gem 'jruby-openssl' +# end +# end +# ----- +# +# @example +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :development do +# gem 'rubocop-rails' +# end +# +# # bad (same set of groups declared twice) +# group :development, :test do +# gem 'rubocop' +# end +# +# group :test, :development do +# gem 'rspec' +# end +# +# # good +# group :development do +# gem 'rubocop' +# end +# +# group :development, :test do +# gem 'rspec' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# gem 'rspec', groups: [:development, :test] +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#58 +class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#66 + def group_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#82 + def duplicated_group_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#105 + def find_source_key(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#115 + def group_attributes(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#94 + def register_offense(node, group_name, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61 +RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#63 +RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array) + # Each gem in the Gemfile should have a comment explaining # its purpose in the project, or the reason for its version # or source. @@ -3746,31 +3851,37 @@ RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe # gem 'rubocop' # # gem 'rspec' -# -# # good only if TreatCommentsAsGroupSeparators is true +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad # # For code quality # gem 'rubocop' # # For tests # gem 'rspec' # -# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#27 +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base include ::RuboCop::Cop::OrderedGemNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#56 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#64 def gem_declarations(param0); end - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#43 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#49 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#57 def previous_declaration(node); end end -# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#31 +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#39 RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) # Common functionality for checking assignment nodes. @@ -5788,34 +5899,40 @@ RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) # spec.add_runtime_dependency 'rubocop' # # spec.add_runtime_dependency 'rspec' -# -# # good only if TreatCommentsAsGroupSeparators is true +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad # # For code quality # spec.add_dependency 'rubocop' # # For tests # spec.add_dependency 'rspec' # -# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#53 +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base include ::RuboCop::Cop::OrderedGemNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#87 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#95 def dependency_declarations(param0); end - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#69 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#82 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#90 def get_dependency_name(node); end - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#76 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#84 def previous_declaration(node); end end -# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#57 +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#65 RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) # Requires a gemspec to have `rubygems_mfa_required` metadata set. @@ -6771,7 +6888,7 @@ module RuboCop::Cop::Heredoc # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#28 def delimiter_string(node); end - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#32 + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#34 def heredoc_type(node); end # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#23 @@ -6899,74 +7016,74 @@ class RuboCop::Cop::LambdaLiteralToMethodCorrector # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#115 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#118 def arg_to_unparenthesized_call?; end # Returns the value of attribute arguments. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def arguments; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#99 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#102 def arguments_begin_pos; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#95 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#98 def arguments_end_pos; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#107 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#110 def block_begin; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#103 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#106 def block_end; end # Returns the value of attribute block_node. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def block_node; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#56 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#59 def insert_arguments(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#40 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#43 def insert_separating_space(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#85 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#88 def lambda_arg_string; end # Returns the value of attribute method. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def method; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#89 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#92 def needs_separating_space?; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#50 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#53 def remove_arguments(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#63 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#66 def remove_leading_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#71 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#74 def remove_trailing_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#33 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#36 def remove_unparenthesized_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#76 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#79 def replace_delimiters(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#46 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#49 def replace_selector(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#111 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#114 def selector_end; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#131 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#134 def separating_space?; end end @@ -7791,7 +7908,7 @@ RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#135 +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#142 class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base include ::RuboCop::Cop::VisibilityHelp include ::RuboCop::Cop::CommentsHelp @@ -7800,35 +7917,35 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base # Validates code style on class declaration. # Add offense when find a node out of expected order. # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#151 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 def on_class(class_node); end # Validates code style on class declaration. # Add offense when find a node out of expected order. # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#151 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 def on_sclass(class_node); end private # Autocorrect by swapping between two nodes autocorrecting them # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#167 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#174 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#298 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#305 def begin_pos_with_comment(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#321 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#328 def buffer; end # Setting categories hash allow you to group methods in group to match # in the {expected_order}. # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#333 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#340 def categories; end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#227 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#234 def class_elements(class_node); end # Classifies a node to match with something in the {expected_order} @@ -7840,21 +7957,21 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base # by method name # @return String otherwise trying to {humanize_node} of the current node # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#187 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#194 def classify(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#264 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#271 def dynamic_constant?(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#288 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#295 def end_position_for(node); end # Load expected order from `ExpectedOrder` config. # Define new terms in the expected order by adding new {categories}. # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#327 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#334 def expected_order; end # Categorize a node according to the {expected_order} @@ -7864,51 +7981,51 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base # @param node to be analysed. # @return [String] with the key category or the `method_name` as string # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#205 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#212 def find_category(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#317 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#324 def find_heredoc(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#255 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#262 def humanize_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#239 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#246 def ignore?(node, classification); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#246 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#253 def ignore_for_autocorrect?(node, sibling); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#282 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#289 def marked_as_private_constant?(node, name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#272 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#279 def private_constant?(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#313 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#320 def start_line_position(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#218 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#225 def walk_over_nested_class_definition(class_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#309 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#316 def whole_line_comment_at_line?(line); end end -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#140 +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#147 RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#147 +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#154 RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) # Checks the indentation of here document closings. @@ -8600,7 +8717,23 @@ end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#67 RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) -# Enforces empty line after guard clause +# Enforces empty line after guard clause. +# +# This cop allows `# :nocov:` directive after guard clause because +# SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: +# +# [source,ruby] +# ---- +# def foo +# # :nocov: +# return if condition +# # :nocov: +# bar +# end +# ---- +# +# Refer to SimpleCov's documentation for more details: +# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code # # @example # @@ -8633,90 +8766,101 @@ RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#38 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#54 class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::PathUtil extend ::RuboCop::Cop::Util - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#46 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#63 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#65 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#84 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#87 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#106 def contains_guard_clause?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#80 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#99 def correct_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#160 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#179 def heredoc?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#153 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#172 def heredoc_line(node, heredoc_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#129 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#148 def last_heredoc_argument(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#143 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#162 def last_heredoc_argument_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#172 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#191 def multiple_statements_on_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#98 - def next_line_empty?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#121 + def next_line_allowed_directive_comment?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#91 - def next_line_empty_or_enable_directive_comment?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#117 + def next_line_empty?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#102 - def next_line_enable_directive_comment?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#110 + def next_line_empty_or_allowed_directive_comment?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#108 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#127 def next_line_rescue_or_ensure?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#122 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#141 def next_sibling_empty_or_guard_clause?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#113 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#132 def next_sibling_parent_empty_or_else?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#164 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#183 def offense_location(node); end + + # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: + # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#200 + def simplecov_directive_comment?(comment); end end -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#44 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#60 RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#43 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#59 RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#61 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + # Checks for a newline after the final magic comment. # # @example @@ -8874,19 +9018,14 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # `AllowAdjacentOneLineDefs` configures whether adjacent # one-line definitions are considered an offense. # -# @example AllowAdjacentOneLineDefs: false +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. # # # bad -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end +# def a +# end +# def b +# end # @example # # # good @@ -8950,21 +9089,26 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # class ErrorB < BaseError; end # # class ErrorC < BaseError; end -# @example EmptyLineBetweenMethodDefs: true (default) -# # checks for empty lines between method definitions. +# @example AllowAdjacentOneLineDefs: false # # # bad -# def a -# end -# def b -# end +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end # # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#144 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#145 def autocorrect(corrector, prev_def, node, count); end # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#130 @@ -8983,73 +9127,84 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#290 def allowance_range?; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#251 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#274 def autocorrect_insert_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#244 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 def autocorrect_remove_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#208 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#227 def blank_lines_count_between(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#162 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#171 def candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#172 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 def class_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#232 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#255 def def_end(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#228 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#163 + def def_location(correction_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#247 def def_start(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#236 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#178 + def empty_line_between_macros; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#259 def end_loc(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#186 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#205 def expected_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#204 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#223 def line_count_allowed?(count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#220 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#239 def lines_between_defs(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#216 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 + def macro_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#235 def maximum_empty_lines; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#180 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#199 def message(node, count: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#168 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 def method_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#212 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#231 def minimum_empty_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#176 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 def module_candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 def multiple_blank_lines_groups?(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#258 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#281 def node_type(node); end class << self @@ -9723,36 +9878,42 @@ class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCo include ::RuboCop::Cop::Layout::EmptyLinesAroundBody extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_block(node); end + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 def on_def(node); end # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#72 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#74 def on_kwbegin(node); end + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_numblock(node); end + private - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#79 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 def check_body(body, line_of_def_or_kwbegin); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#106 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 def keyword_locations(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#123 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 def keyword_locations_in_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#119 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#121 def keyword_locations_in_rescue(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#94 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 def last_rescue_and_end_on_same_line(body); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#98 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#100 def message(location, keyword); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#102 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 def style; end end @@ -11008,16 +11169,22 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # Alternatively you can specify multiple allowed styles. That's done by # passing a list of styles to EnforcedStyles. # -# @example EnforcedLastArgumentHashStyle: ignore_explicit -# # Ignore only explicit hashes. -# +# @example EnforcedHashRocketStyle: key (default) # # bad -# do_something(foo: 1, -# bar: 2) +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } # # # good -# do_something({foo: 1, -# bar: 2}) +# { +# :foo => bar, +# :ba => baz +# } # @example EnforcedHashRocketStyle: separator # # bad # { @@ -11136,22 +11303,16 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # # good # do_something(foo: 1, # bar: 2) -# @example EnforcedHashRocketStyle: key (default) +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. +# # # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } +# do_something(foo: 1, +# bar: 2) # # # good -# { -# :foo => bar, -# :ba => baz -# } +# do_something({foo: 1, +# bar: 2}) # # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base @@ -11498,71 +11659,72 @@ class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::Heredoc extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#33 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#36 def on_heredoc(node); end private - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#117 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#120 def adjust_minus(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#112 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115 def adjust_squiggly(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#141 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#144 def base_indent_level(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#152 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#155 def heredoc_body(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#156 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159 def heredoc_end(node); end # Returns '~', '-' or nil # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#148 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#151 def heredoc_indent_type(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#123 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126 def indented_body(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#130 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#133 def indented_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#88 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#91 def line_too_long?(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103 def longest_line(lines); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#108 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111 def max_line_length; end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#66 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#69 def message(heredoc_indent_type); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#54 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#57 def register_offense(node, heredoc_indent_type); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#76 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79 def type_message(indentation_width, current_indent_type); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#104 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#107 def unlimited_heredoc_length?; end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#84 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#87 def width_message(indentation_width); end end -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#29 +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#32 RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#31 +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#34 RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) # Checks for inconsistent indentation. @@ -12222,35 +12384,38 @@ class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#105 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#113 def autocorrect(corrector, offense_range, insert_pos, spaces); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#101 - def continuation?(line); end + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#106 + def continuation?(line, line_num, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#138 def enforced_style_leading?; end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#79 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#76 + def investigate(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#84 def investigate_leading_style(first_line, second_line, end_of_first_line); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#90 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#95 def investigate_trailing_style(first_line, second_line, end_of_first_line); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#110 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#118 def leading_offense_range(end_of_first_line, matches); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#122 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 def message(_range); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#75 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#72 def raw_lines(node); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#116 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#124 def trailing_offense_range(end_of_first_line, matches); end end @@ -12412,7 +12577,7 @@ class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::C include ::RuboCop::Cop::Alignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#95 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#97 def autocorrect(corrector, node); end # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#83 @@ -12420,26 +12585,26 @@ class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::C private - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#135 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#137 def add_offense_and_correction(node, message); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#107 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#109 def always_indented?(dstr_node); end - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#126 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#128 def base_column(child); end - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#111 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#113 def check_aligned(children, start_index); end - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#120 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#122 def check_indented(children); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#101 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#103 def strings_concatenated_with_backslash?(dstr_node); end end @@ -13898,60 +14063,68 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#51 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#64 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#72 def check_assignment(node, _rhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#112 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 def comment_within?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#82 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#90 def configured_to_not_be_inspected?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#106 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#114 def convertible_block?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#132 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#68 + def end_with_percent_blank_string?(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#142 def max_line_length; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#77 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#85 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#89 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 def other_cop_takes_precedence?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#70 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#78 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#95 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 def single_line_block_chain_enabled?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#99 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#107 def suitable_as_single_line?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#123 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 def to_single_line(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#118 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#128 def too_long?(node); end end @@ -14163,6 +14336,13 @@ class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#21 def space_style_before_rcurly; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#32 + def before_semicolon?(token); end end # Checks for space between a method name and a left parenthesis in defs. @@ -14607,7 +14787,7 @@ RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), # foo &. bar # foo &. bar&. buzz # RuboCop:: Cop -# RuboCop:: Cop:: Cop +# RuboCop:: Cop:: Base # :: RuboCop::Cop # # # good @@ -14619,7 +14799,7 @@ RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), # foo&.bar # foo&.bar&.buzz # RuboCop::Cop -# RuboCop::Cop::Cop +# RuboCop::Cop::Base # ::RuboCop::Cop # # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#37 @@ -14773,49 +14953,49 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#236 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#238 def align_hash_cop_config; end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#181 def autocorrect(corrector, range); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#163 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#165 def check_operator(type, operator, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#189 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#191 def enclose_operator_with_space(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#216 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#218 def excess_leading_space?(type, operator, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#231 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#233 def excess_trailing_space?(right_operand, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#248 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#250 def force_equal_sign_alignment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#240 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#242 def hash_table_style?; end # @yield [msg] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#174 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#176 def offense(type, operator, with_space, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#202 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#204 def offense_message(type, operator, with_space, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#159 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#161 def operator_with_regular_syntax?(send_node); end # @return [Boolean] @@ -14825,12 +15005,12 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#252 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254 def should_not_have_surrounding_space?(operator); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#244 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#246 def space_around_exponent_operator?; end class << self @@ -15979,13 +16159,18 @@ class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#79 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#90 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#80 def ends_in_end?(processed_source); end - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#89 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#94 def message(wanted_blank_lines, blank_lines); end - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#66 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#67 def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end end @@ -17136,18 +17321,23 @@ class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#98 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#95 + def assumed_usage_context?(node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#102 def chained_method_name(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#92 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#89 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#85 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 def debugger_methods; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#81 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 def message(node); end end @@ -17609,6 +17799,7 @@ end RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) # Checks for duplicated keys in hash literals. +# This cop considers both primitive types and constants for the hash keys. # # This cop mirrors a warning in Ruby 2.2. # @@ -17623,15 +17814,15 @@ RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) # # hash = { food: 'apple', other_food: 'orange' } # -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#22 class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base include ::RuboCop::Cop::Duplication - # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#26 + # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#27 def on_hash(node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#24 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#25 RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) # Checks for duplicated magic comments. @@ -17926,26 +18117,40 @@ class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop: include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#36 + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#37 def each_repeated_character_class_element_loc(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#27 + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#29 def on_regexp(node); end private - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#83 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#102 + def escaped_octal?(string); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#54 + def group_expressions(node, expressions); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#110 def interpolation_locs(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#65 - def skip_expression?(expr); end + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#106 + def octal?(char); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#71 + def pop_octal_digits(current_child, expressions); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#78 - def start_with_escaped_zero_number?(current_child, next_child); end + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#89 + def skip_expression?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#80 + def source_range(children); end # Since we blank interpolations with a space for every char of the interpolation, we would # mark every space (except the first) as duplicate if we do not skip regexp_parser nodes @@ -17953,13 +18158,16 @@ class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop: # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#72 + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#96 def within_interpolation?(node, child); end end # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#25 RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#27 +RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::OCTAL_DIGITS_AFTER_ESCAPE = T.let(T.unsafe(nil), Integer) + # Checks for duplicate ``require``s and ``require_relative``s. # # @example @@ -19888,6 +20096,13 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), # Autocorrection is not supported because the position of `super` cannot be # determined automatically. # +# `Object` and `BasicObject` are allowed by this cop because of their +# stateless nature. However, sometimes you might want to allow other parent +# classes from this cop, for example in the case of an abstract class that is +# not meant to be called with `super`. In those cases, you can use the +# `AllowedParentClasses` option to specify which classes should be allowed +# *in addition to* `Object` and `BasicObject`. +# # @example # # bad # class Employee < Person @@ -19934,63 +20149,148 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), # end # end # -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#63 +# # good +# class ClassWithNoParent +# def initialize +# do_something +# end +# end +# @example AllowedParentClasses: [MyAbstractClass] +# # good +# class MyConcreteClass < MyAbstractClass +# def initialize +# do_something +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#85 class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#77 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#99 def class_new_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#83 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#93 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#149 + def allowed_class?(node); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#153 + def allowed_classes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127 def callback_method_def?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#111 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#133 def contains_super?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#137 def inside_class_with_stateful_parent?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#101 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#123 def offender?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127 - def stateless_class?(node); end end -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#74 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#96 RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#65 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#87 RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#69 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#91 RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#64 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#86 RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#70 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#92 RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#67 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#89 RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) +# Checks for mixed-case character ranges since they include likely unintended characters. +# +# Offenses are registered for regexp character classes like `/[A-z]/` +# as well as range objects like `('A'..'z')`. +# +# NOTE: Range objects cannot be autocorrected. +# +# @example +# +# # bad +# r = /[A-z]/ +# +# # good +# r = /[A-Za-z]/ +# +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#28 +class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#56 + def each_unsafe_regexp_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_irange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#48 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#72 + def build_source_range(range_start, range_end); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#76 + def range_for(char); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#82 + def range_pairs(expr); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#102 + def rewrite_regexp_range(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#92 + def skip_expression?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#96 + def skip_range?(range_start, range_end); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#86 + def unsafe_range?(range_start, range_end); end +end + +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#32 +RuboCop::Cop::Lint::MixedCaseRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#35 +RuboCop::Cop::Lint::MixedCaseRange::RANGES = T.let(T.unsafe(nil), Array) + # Do not mix named captures and numbered captures in a Regexp literal # because numbered capture is ignored if they're mixed. # Replace numbered captures with non-capturing groupings or @@ -20058,14 +20358,17 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # Checks for nested method definitions. # -# @example AllowedPatterns: ['baz'] -# # good -# def foo(obj) -# obj.do_baz do +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo # def bar # end # end -# end # @example # # # good @@ -20128,17 +20431,14 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example -# -# # bad -# -# # `bar` definition actually produces methods in the same scope -# # as the outer `foo` method. Furthermore, the `bar` method -# # will be redefined every time `foo` is invoked. -# def foo +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do # def bar # end # end +# end # # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base @@ -20365,64 +20665,64 @@ class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#75 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#77 def explicit_not_force?(param0); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#70 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#72 def force?(param0); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#79 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#81 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#65 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#67 def receiver_and_method_name(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#60 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#62 def send_exist_node(param0); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#96 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#98 def allowable_use_with_if?(if_node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#120 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#122 def autocorrect(corrector, node, range); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#131 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#133 def autocorrect_replace_method(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#148 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#152 def force_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#156 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#160 def force_method_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#152 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#156 def force_option?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#90 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#92 def if_node_child?(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#111 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#113 def message_change_force_method(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#115 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#117 def message_remove_file_exist_check(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#100 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#102 def register_offense(node, exist_node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#138 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#140 def replacement_method(node); end end @@ -20438,6 +20738,9 @@ RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.un # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#48 RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#55 +RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) @@ -20686,69 +20989,69 @@ class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#102 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#103 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#92 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#93 def to_method(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#97 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#98 def to_method_symbol(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#160 def allow_receiver?(receiver); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#167 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#172 def allowed_method_name?(name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#177 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#182 def conversion_method?(method_name); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#141 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#146 def correct_method(node, receiver); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#145 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#150 def correct_sym_method(to_method); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#124 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#129 def handle_as_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#109 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#110 def handle_conversion_method(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#185 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#190 def ignored_class?(name); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#181 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#186 def ignored_classes; end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#150 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#171 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#176 def top_receiver(node); end end -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#88 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#78 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#79 RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#90 RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#84 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#85 RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) # Checks for uses of numbered parameter assignment. @@ -21481,6 +21784,79 @@ RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#37 RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for redundant quantifiers inside Regexp literals. +# +# It is always allowed when interpolation is used in a regexp literal, +# because it's unknown what kind of string will be expanded as a result: +# +# [source,ruby] +# ---- +# /(?:a*#{interpolation})?/x +# ---- +# +# @example +# # bad +# /(?:x+)+/ +# +# # good +# /(?:x)+/ +# +# # good +# /(?:x+)/ +# +# # bad +# /(?:x+)?/ +# +# # good +# /(?:x)*/ +# +# # good +# /(?:x*)/ +# +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#34 +class RuboCop::Cop::Lint::RedundantRegexpQuantifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#42 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#83 + def character_set?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#61 + def each_redundantly_quantified_pair(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#87 + def mergeable_quantifier(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#103 + def merged_quantifier(exp1, exp2); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#119 + def message(group, child, replacement); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#115 + def quantifier_range(group, child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#75 + def redundant_group?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#79 + def redundantly_quantifiable?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#38 +RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let(T.unsafe(nil), String) + # Checks for unnecessary `require` statement. # # The following features are unnecessary `require` statement because @@ -21515,9 +21891,12 @@ class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#52 + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57 def on_send(node); end + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#53 + def pp_const?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#47 def redundant_require_statement?(param0 = T.unsafe(nil)); end @@ -21525,13 +21904,13 @@ class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#71 - def redundant_feature?(feature_name); end + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#87 + def need_to_require_pp?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#82 - def use_pretty_print_method?; end + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#76 + def redundant_feature?(feature_name); end end # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 @@ -22826,6 +23205,11 @@ class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93 def find_conditional_node_from_ascendant(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100 + def node_or_its_ascendant_conditional?(node); end + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 def ractor_block?(param0 = T.unsafe(nil)); end @@ -24369,12 +24753,18 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # scope. # The basic idea for this cop was from the warning of `ruby -cw`: # -# assigned but unused variable - foo +# [source,console] +# ---- +# assigned but unused variable - foo +# ---- # # Currently this cop has advanced logic that detects unreferenced # reassignments and properly handles varied cases such as branch, loop, # rescue, ensure, etc. # +# NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables +# can lead to a syntax error, so this case is not autocorrected. +# # @example # # # bad @@ -24392,70 +24782,83 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # do_something(some_var) # end # -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#39 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 def autocorrect(corrector, assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#54 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + def chained_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 def check_for_unused_assignments(variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#120 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146 def collect_variable_like_names(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#74 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79 def message_for_useless_assignment(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#80 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107 def message_specification(assignment, variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#90 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 def multiple_assignment_message(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85 + def offense_range(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 def operator_assignment_message(scope, assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#153 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179 def remove_exception_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#177 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203 def remove_local_variable_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#166 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 def remove_trailing_character_from_operator(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 def rename_variable_with_underscore(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#170 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196 def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end # TODO: More precise handling (rescue, ensure, nested begin, etc.) # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#110 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 def return_value_node_of_scope(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93 + def sequential_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 def similar_name_message(variable); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155 def variable_like_method_invocation?(node); end class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#46 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#44 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless `else` in `begin..end` without `rescue`. @@ -24919,43 +25322,34 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/void.rb#200 + # source://rubocop//lib/rubocop/cop/lint/void.rb#194 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#196 + # source://rubocop//lib/rubocop/cop/lint/void.rb#190 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#188 - def autocorrect_void_literal(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#172 + # source://rubocop//lib/rubocop/cop/lint/void.rb#178 def autocorrect_void_op(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#192 - def autocorrect_void_self(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#184 - def autocorrect_void_var(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#87 def check_begin(node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#93 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#122 + # source://rubocop//lib/rubocop/cop/lint/void.rb#128 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#146 + # source://rubocop//lib/rubocop/cop/lint/void.rb#152 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#130 + # source://rubocop//lib/rubocop/cop/lint/void.rb#136 def check_self(node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#113 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#138 + # source://rubocop//lib/rubocop/cop/lint/void.rb#144 def check_void_expression(node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#104 @@ -24963,7 +25357,7 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#164 + # source://rubocop//lib/rubocop/cop/lint/void.rb#170 def in_void_context?(node); end end @@ -25913,18 +26307,18 @@ class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#175 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#182 def another_args?(node); end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#42 def build_foldable_checks(types); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#83 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#90 def classlike_code_length(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#131 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#138 def classlike_node?(node); end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#66 @@ -25932,53 +26326,61 @@ class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#156 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#163 def count_comments?; end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#119 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#126 def each_top_level_descendant(node, types, &block); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#139 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#146 def extract_body(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#135 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#142 def foldable_node?(node); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#114 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#121 def heredoc_length(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#79 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#86 def heredoc_node?(node); end # Returns true for lines that shall not be included in the count. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#152 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#159 def irrelevant_line?(source_line); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#103 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#110 def line_numbers_of_inner_nodes(node, *types); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#99 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#106 def namespace_module?(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#186 + def node_with_heredoc?(node); end + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#60 def normalize_foldable_types(types); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#160 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#167 def omit_length(descendant); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#171 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#178 def parenthesized?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#190 + def source_from_node_with_heredoc(node); end end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#13 @@ -27204,12 +27606,12 @@ class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#49 + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#51 def forbidden_delimiters; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#39 + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#41 def meaningful_delimiters?(node); end end @@ -27983,9 +28385,22 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # can be used to specify whether method names and symbols should be checked. # Both are enabled by default. # -# @example AllowedPatterns: ['_v\d+\z'] +# @example EnforcedStyle: normalcase (default) +# # bad +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method1(arg_1); end +# # # good -# :some_sym_v1 +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method1(arg1); end # @example EnforcedStyle: snake_case # # bad # :some_sym1 @@ -28047,22 +28462,9 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # @example AllowedIdentifiers: [capture3] # # good # expect(Open3).to receive(:capture3) -# @example EnforcedStyle: normalcase (default) -# # bad -# :some_sym_1 -# variable_1 = 1 -# -# def some_method_1; end -# -# def some_method1(arg_1); end -# +# @example AllowedPatterns: ['_v\d+\z'] # # good -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method1(arg1); end +# :some_sym_v1 # # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base @@ -28739,25 +29141,20 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93 def aligned_assignment?(range, line); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#91 - def aligned_char?(range, line); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70 def aligned_comment_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#107 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105 def aligned_identical?(range, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#83 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#81 def aligned_operator?(range, line); end # @return [Boolean] @@ -28782,10 +29179,10 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#100 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#98 def aligned_with_append_operator?(range, line); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#111 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#109 def aligned_with_assignment(token, line_range); end # @return [Boolean] @@ -28811,7 +29208,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#87 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#85 def aligned_words?(range, line); end # @return [Boolean] @@ -28819,16 +29216,16 @@ module RuboCop::Cop::PrecedingFollowingAlignment # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10 def allow_for_alignment?; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#129 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#127 def assignment_lines; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#133 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#131 def assignment_tokens; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#149 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#147 def relevant_assignment_lines(line_range); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#176 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#174 def remove_optarg_equals(asgn_tokens, processed_source); end end @@ -30107,9 +30504,6 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/alias.rb#150 - def identifier(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#51 def on_alias(node); end @@ -30145,9 +30539,12 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/alias.rb#135 def correct_alias_to_alias_method(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#144 + # source://rubocop//lib/rubocop/cop/style/alias.rb#142 def correct_alias_with_symbol_args(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/alias.rb#147 + def identifier(node); end + # source://rubocop//lib/rubocop/cop/style/alias.rb#113 def lexical_scope_type(node); end @@ -30279,6 +30676,12 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # This cop identifies places where `do_something(*args, &block)` # can be replaced by `do_something(...)`. # +# In Ruby 3.2, anonymous args/kwargs forwarding has been added. +# +# This cop also identifies places where `use_args(*args)`/`use_kwargs(**kwargs)` can be +# replaced by `use_args(*)`/`use_kwargs(**)`; if desired, this functionality can be disabled +# by setting UseAnonymousForwarding: false. +# # @example # # bad # def foo(*args, &block) @@ -30294,7 +30697,25 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(...) # bar(...) # end -# @example AllowOnlyRestArgument: true (default) +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) +# # bad +# def foo(*args, **kwargs) +# args_only(*args) +# kwargs_only(**kwargs) +# end +# +# # good +# def foo(*, **) +# args_only(*) +# kwargs_only(**) +# end +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs) +# args_only(*args) +# kwargs_only(**kwargs) +# end +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) # # good # def foo(*args) # bar(*args) @@ -30303,7 +30724,7 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**kwargs) # bar(**kwargs) # end -# @example AllowOnlyRestArgument: false +# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) # # bad # # The following code can replace the arguments with `...`, # # but it will change the behavior. Because `...` forwards block also. @@ -30315,59 +30736,192 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # bar(**kwargs) # end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#49 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#75 class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#72 - def forwarding_method_arguments?(param0 = T.unsafe(nil), param1, param2, param3); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#84 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#84 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#64 - def only_rest_arguments?(param0 = T.unsafe(nil), param1); end + private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#59 - def use_rest_arguments?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#122 + def add_forward_all_offenses(node, send_classifications, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#233 + def add_parens_if_missing(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#131 + def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#225 + def allow_only_rest_arguments?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#217 + def arguments_range(node, first_node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 + def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159 + def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#114 + def extract_forwardable_args(args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 + def non_splat_or_block_pass_lvar_references(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#118 + def only_forwards_all?(send_classifications); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#207 + def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#191 + def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#199 + def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#229 + def use_anonymous_forwarding?; end +end + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#83 +RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#86 +RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#82 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#85 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#87 +RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) + +# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 +class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier + extend ::RuboCop::AST::NodePattern::Macros + + # @return [SendNodeClassifier] a new instance of SendNodeClassifier + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252 + def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#280 + def classification; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#247 + def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#274 + def forwarded_block_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 + def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#268 + def forwarded_kwrest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#262 + def forwarded_rest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#244 + def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#116 - def all_lvars_as_forwarding_method_arguments?(def_node, forwarding_method); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#348 + def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 - def allow_only_rest_arguments?; end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#344 + def additional_kwargs_or_forwarded_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#143 - def arguments_range(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 + def allow_offense_for_no_block?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 + def any_arg_referenced?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#313 + def arguments; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#103 - def extract_argument_names_from(args); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#292 + def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#110 - def forwarding_method?(node, rest_arg, kwargs, block_arg); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352 + def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#125 - def register_offense_to_forwarding_method_arguments(forwarding_method); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#309 + def forwarded_rest_and_kwrest_args; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 - def register_offense_to_method_definition_arguments(method_definition); end -end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362 + def no_additional_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 + def no_post_splat_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#305 + def offensive_block_forwarding?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 + def referenced_block_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#321 + def referenced_kwrest_arg?; end -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#56 -RuboCop::Cop::Style::ArgumentsForwarding::MSG = T.let(T.unsafe(nil), String) + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#317 + def referenced_rest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#301 + def ruby_32_missing_rest_or_kwest?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#333 + def target_ruby_version; end +end # Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. # @@ -30415,6 +30969,15 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) # The `array1.intersect?(array2)` method is faster than # `(array1 & array2).any?` and is more readable. # +# In cases like the following, compatibility is not ensured, +# so it will not be detected when using block argument. +# +# [source,ruby] +# ---- +# ([1] & [1,2]).any? { |x| false } # => false +# [1].intersect?([1,2]) { |x| false } # => true +# ---- +# # @example # # bad # (array1 & array2).any? @@ -30436,46 +30999,46 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) # array1.intersect?(array2) # !array1.intersect?(array2) # -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#40 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#49 class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#65 def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#70 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#79 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#47 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#86 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 def bad_intersection_check?(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#98 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#106 def message(receiver, argument, method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102 def straight?(method_name); end end -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#64 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73 RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#67 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#68 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#66 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75 RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) # Checks for uses of "*" as a substitute for _join_. @@ -30892,13 +31455,24 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # `lambda`, `proc`, and `it` are their defaults. # Additional methods can be added to the `AllowedMethods`. # -# @example AllowedPatterns: ['map'] +# @example EnforcedStyle: line_count_based (default) +# # bad - single line block +# items.each do |item| item / 5 end # -# # good +# # good - single line block +# items.each { |item| item / 5 } +# +# # bad - multi-line block # things.map { |thing| # something = thing.some_method # process(something) # } +# +# # good - multi-line block +# things.map do |thing| +# something = thing.some_method +# process(something) +# end # @example EnforcedStyle: semantic # # Prefer `do...end` over `{...}` for procedural blocks. # @@ -31019,25 +31593,14 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # something = thing.some_method # process(something) # } -# @example EnforcedStyle: line_count_based (default) -# # bad - single line block -# items.each do |item| item / 5 end -# -# # good - single line block -# items.each { |item| item / 5 } +# @example AllowedPatterns: ['map'] # -# # bad - multi-line block +# # good # things.map { |thing| # something = thing.some_method # process(something) # } # -# # good - multi-line block -# things.map do |thing| -# something = thing.some_method -# process(something) -# end -# # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle @@ -31059,7 +31622,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#458 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#459 def array_or_range?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#208 @@ -31067,7 +31630,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#462 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#463 def begin_required?(block_node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#236 @@ -31075,7 +31638,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#399 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 def braces_for_chaining_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#248 @@ -31083,25 +31646,25 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#376 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 def braces_required_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#380 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#381 def braces_required_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#409 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 def braces_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#454 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#455 def conditional?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#413 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 def correction_would_break_code?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#309 @@ -31109,12 +31672,12 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#423 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#424 def functional_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#419 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#420 def functional_method?(method_name); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 @@ -31122,7 +31685,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#384 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 def line_count_based_block_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#218 @@ -31136,12 +31699,12 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#431 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#432 def procedural_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#427 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 def procedural_oneliners_may_have_braces?; end # @return [Boolean] @@ -31165,17 +31728,17 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#447 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 def return_value_of_scope?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#435 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#436 def return_value_used?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#388 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#389 def semantic_block_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 @@ -31215,27 +31778,27 @@ RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(n # Corrector to correct conditional assignment in `case` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#603 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#605 class RuboCop::Cop::Style::CaseCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#608 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#610 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#618 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#620 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#638 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#640 def extract_branches(case_node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#632 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#634 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#648 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#650 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -31665,28 +32228,28 @@ class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#85 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#87 def class_name(class_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#105 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#107 def class_name_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#121 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#123 def offense_range(receiver_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#109 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#111 def require_cbase?(class_node); end - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#117 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#119 def trim_string_quotes(class_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#113 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#115 def unable_to_determine_type?(class_node); end end @@ -32151,7 +32714,7 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#78 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#79 def on_for(node); end # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66 @@ -32161,20 +32724,20 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#89 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#90 def collection_looping_method?(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#107 def combine_with_left_sibling(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#94 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95 def same_collection_looping_block?(node, sibling); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#103 def same_collection_looping_for?(node, sibling); end end @@ -32948,22 +33511,22 @@ RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), # # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#440 module RuboCop::Cop::Style::ConditionalCorrectorHelper - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#459 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 def assignment(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#489 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#491 def correct_branches(corrector, branches); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#466 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#468 def correct_if_branches(corrector, cop, node); end # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#441 def remove_whitespace_in_branches(corrector, branch, condition, column); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#476 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#478 def replace_branch_assignment(corrector, branch); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#452 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 def white_space_range(node, column); end end @@ -34098,30 +34661,33 @@ class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#44 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46 def on_case(case_node); end private - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#58 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63 def autocorrect(corrector, case_node); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#65 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70 def correct_case_when(corrector, case_node, when_nodes); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#77 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82 def correct_when_conditions(corrector, when_nodes); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#92 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97 def keep_first_when_comment(case_range, corrector); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#102 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107 def replace_then_with_line_break(corrector, conditions, when_node); end end # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42 RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43 +RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array) + # Checks for empty else-clauses, possibly including comments and/or an # explicit `nil` depending on the EnforcedStyle. # @@ -35781,10 +36347,14 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # if the number of them is less than or equals to # `MaxUnannotatedPlaceholdersAllowed`. # -# @example AllowedPatterns: ['redirect'] +# @example EnforcedStyle: annotated (default) +# +# # bad +# format('%{greeting}', greeting: 'Hello') +# format('%s', 'Hello') # # # good -# redirect('foo/%{bar_id}') +# format('%s', greeting: 'Hello') # @example EnforcedStyle: template # # # bad @@ -35828,14 +36398,10 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # # # bad # redirect('foo/%{bar_id}') -# @example EnforcedStyle: annotated (default) -# -# # bad -# format('%{greeting}', greeting: 'Hello') -# format('%s', 'Hello') +# @example AllowedPatterns: ['redirect'] # # # good -# format('%s', greeting: 'Hello') +# redirect('foo/%{bar_id}') # # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85 class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base @@ -35989,10 +36555,10 @@ class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#176 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#178 def disabled_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#188 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#190 def enable_comment(corrector); end # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#120 @@ -36004,34 +36570,34 @@ class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#114 def ensure_no_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#212 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#214 def following_comment; end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#150 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#152 def frozen_string_literal_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#194 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#196 def insert_comment(corrector); end # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#137 def last_special_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#204 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#206 def line_range(line); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#156 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#158 def missing_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#162 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#164 def missing_true_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#208 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#210 def preceding_comment; end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#184 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#186 def remove_comment(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#168 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#170 def unnecessary_comment_offense(processed_source); end end @@ -36410,62 +36976,62 @@ end # # bad # Hash[*ary] # -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#34 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#54 def hash_from_array?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#46 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#56 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#128 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#138 def allowed_splat_argument?; end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#121 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#131 def args_to_hash(args); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#108 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#118 def multi_argument(node); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#84 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#94 def register_offense_for_hash(node, hash_argument); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#93 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 def register_offense_for_zip_method(node, zip_method); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#113 def requires_parens?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#61 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#71 def single_argument(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#78 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#88 def use_zip_method_without_argument?(first_argument); end end -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#39 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#49 RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#38 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#48 RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#40 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#50 RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#37 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#47 RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#41 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#51 RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for uses of `each_key` and `each_value` Hash methods. @@ -36710,22 +37276,15 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # * either - accepts both shorthand and explicit use of hash literal value # * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash # -# @example EnforcedShorthandSyntax: consistent -# -# # bad - `foo` and `bar` values can be omitted -# {foo: foo, bar: bar} -# -# # bad - `bar` value can be omitted -# {foo:, bar: bar} -# -# # bad - mixed syntaxes -# {foo:, bar: baz} +# @example EnforcedStyle: ruby19 (default) +# # bad +# {:a => 2} +# {b: 1, :c => 2} # # # good -# {foo:, bar:} -# -# # good - can't omit `baz` -# {foo: foo, bar: baz} +# {a: 2, b: 1} +# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol +# {d: 1, 'e' => 2} # technically not forbidden # @example EnforcedStyle: hash_rockets # # bad # {a: 1, b: 2} @@ -36773,15 +37332,22 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good # {foo:, bar:} -# @example EnforcedStyle: ruby19 (default) -# # bad -# {:a => 2} -# {b: 1, :c => 2} +# @example EnforcedShorthandSyntax: consistent +# +# # bad - `foo` and `bar` values can be omitted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} # # # good -# {a: 2, b: 1} -# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol -# {d: 1, 'e' => 2} # technically not forbidden +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} # # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113 class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base @@ -37057,7 +37623,7 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140 def check_branches(node, branches); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#167 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#168 def check_expressions(node, expressions, insert_position); end # @return [Boolean] @@ -37068,26 +37634,26 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base # `elsif` branches show up in the if node as nested `else` branches. We # need to recursively iterate over all `else` branches. # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#204 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#208 def expand_elses(branch); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#219 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223 def head(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#188 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#192 def last_child_of_parent?(node); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#198 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#202 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#194 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#198 def single_child_branch?(branch_node); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#215 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#219 def tail(node); end end @@ -37096,24 +37662,24 @@ RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), St # Corrector to correct conditional assignment in `if` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#558 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#560 class RuboCop::Cop::Style::IfCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#563 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#565 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#567 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#569 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#581 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#583 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#588 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#590 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -38156,34 +38722,34 @@ class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#28 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#29 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#62 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#67 def explicit_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#58 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#63 def implicit_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#46 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#50 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#55 def prefer(node); end end -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#25 +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#27 RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for string literal concatenation at @@ -38287,12 +38853,22 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # NOTE: If one of these configuration is set to nil, any capitalization is allowed. # -# @example ValueCapitalization: uppercase +# @example EnforcedStyle: snake_case (default) +# # The `snake_case` style will enforce that the frozen string literal +# # comment is written in snake case. (Words separated by underscores) # # bad # # frozen-string-literal: true # +# module Bar +# # ... +# end +# # # good -# # frozen-string-literal: TRUE +# # frozen_string_literal: false +# +# module Bar +# # ... +# end # @example EnforcedStyle: kebab_case # # The `kebab_case` style will enforce that the frozen string literal # # comment is written in kebab case. (Words separated by hyphens) @@ -38345,22 +38921,12 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # # good # # frozen-string-literal: TRUE -# @example EnforcedStyle: snake_case (default) -# # The `snake_case` style will enforce that the frozen string literal -# # comment is written in snake case. (Words separated by underscores) +# @example ValueCapitalization: uppercase # # bad # # frozen-string-literal: true # -# module Bar -# # ... -# end -# # # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end +# # frozen-string-literal: TRUE # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base @@ -38706,13 +39272,27 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # - Parentheses are required in anonymous arguments, keyword arguments # and block passing in Ruby 3.2. # -# @example AllowParenthesesInStringInterpolation: true +# @example EnforcedStyle: require_parentheses (default) +# +# # bad +# array.delete e # # # good -# "#{t('this.is.good')}" +# array.delete(e) # # # good -# "#{t 'this.is.also.good'}" +# # Operators don't need parens +# foo == bar +# +# # good +# # Setter methods don't need parens +# foo.bar = baz +# +# # okay with `puts` listed in `AllowedMethods` +# puts 'test' +# +# # okay with `^assert` listed in `AllowedPatterns` +# assert_equal 'test', x # @example EnforcedStyle: omit_parentheses # # # bad @@ -38811,27 +39391,13 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # "#{t 'this.is.better'}" -# @example EnforcedStyle: require_parentheses (default) -# -# # bad -# array.delete e -# -# # good -# array.delete(e) +# @example AllowParenthesesInStringInterpolation: true # # # good -# # Operators don't need parens -# foo == bar +# "#{t('this.is.good')}" # # # good -# # Setter methods don't need parens -# foo.bar = baz -# -# # okay with `puts` listed in `AllowedMethods` -# puts 'test' -# -# # okay with `^assert` listed in `AllowedPatterns` -# assert_equal 'test', x +# "#{t 'this.is.also.good'}" # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202 class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base @@ -38886,12 +39452,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#158 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#165 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#161 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] @@ -38901,17 +39467,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#211 def assignment_in_condition?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 @@ -38919,7 +39485,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#141 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#142 def call_as_argument_or_chain?(node); end # @return [Boolean] @@ -38932,6 +39498,11 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 def call_in_logical_operators?(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#148 + def call_in_match_pattern?(node); end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 @@ -38949,22 +39520,22 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#137 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#138 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#214 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#190 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#147 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 def hash_literal_in_arguments?(node); end # @return [Boolean] @@ -38974,7 +39545,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -38992,7 +39563,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#186 def logical_operator?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 @@ -39008,7 +39579,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#194 def regexp_slash_literal?(node); end # @return [Boolean] @@ -39018,7 +39589,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#171 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#178 def splat?(node); end # @return [Boolean] @@ -39033,12 +39604,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#182 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#198 def unary_literal?(node); end end @@ -40465,7 +41036,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.7.0/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#15 + # source://rubocop-sorbet/0.7.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 @@ -40483,7 +41054,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.7.0/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#10 + # source://rubocop-sorbet/0.7.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -43111,6 +43682,8 @@ RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # array.join('') # [1, 2, 3].join("") # array.sum(0) +# exit(true) +# exit!(false) # string.split(" ") # "first\nsecond".split(" ") # string.chomp("\n") @@ -43121,37 +43694,42 @@ RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # array.join # [1, 2, 3].join # array.sum +# exit +# exit! # string.split # "first second".split # string.chomp # string.chomp! # A.foo # -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#53 +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#88 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 def argument_range(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#86 def redundant_arg_for_method(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#74 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#79 def redundant_argument?(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#61 RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#62 +RuboCop::Cop::Style::RedundantArgument::NO_RECEIVER_METHODS = T.let(T.unsafe(nil), Array) + # Checks for the instantiation of array using redundant `Array` constructor. # Autocorrect replaces to array literal which is the simplest and fastest. # @@ -43730,6 +44308,31 @@ end # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#46 RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String) +# Checks for uses a redundant current directory in path. +# +# @example +# +# # bad +# require_relative './path/to/feature' +# +# # good +# require_relative 'path/to/feature' +# +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#16 +class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) + # Checks for redundant uses of double splat hash braces. # # @example @@ -44518,16 +45121,16 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36 def arg_in_call_with_block?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#220 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#222 def first_send_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#225 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#227 def first_super_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#230 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#232 def first_yield_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140 def interpolation?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#27 @@ -44574,36 +45177,36 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#234 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#236 def call_chain_starts_with_int?(begin_node, send_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#127 def check(begin_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#142 def check_send(begin_node, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#149 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#151 def check_unary(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#175 def disallowed_literal?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107 def empty_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#110 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#112 def first_arg_begins_with_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#215 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217 def first_argument?(node); end # @return [Boolean] @@ -44613,12 +45216,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#171 def keyword_ancestor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#188 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#190 def keyword_with_redundant_parentheses?(node); end # @return [Boolean] @@ -44628,20 +45231,20 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#201 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 def method_call_with_redundant_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#117 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119 def method_chain_begins_with_hash_literal?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#159 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#161 def offense(node, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#211 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#213 def only_begin_arg?(args); end # @return [Boolean] @@ -44651,12 +45254,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#179 def raised_to_power_negative_numeric?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#167 def suspect_unary?(node); end # @return [Boolean] @@ -44755,6 +45358,72 @@ RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), Stri # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#31 RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.unsafe(nil), Regexp) +# Identifies places where argument can be replaced from +# a deterministic regexp to a string. +# +# @example +# # bad +# 'foo'.byteindex(/f/) +# 'foo'.byterindex(/f/) +# 'foo'.gsub(/f/, 'x') +# 'foo'.gsub!(/f/, 'x') +# 'foo'.partition(/f/) +# 'foo'.rpartition(/f/) +# 'foo'.scan(/f/) +# 'foo'.split(/f/) +# 'foo'.start_with?(/f/) +# 'foo'.sub(/f/, 'x') +# 'foo'.sub!(/f/, 'x') +# +# # good +# 'foo'.byteindex('f') +# 'foo'.byterindex('f') +# 'foo'.gsub('f', 'x') +# 'foo'.gsub!('f', 'x') +# 'foo'.partition('f') +# 'foo'.rpartition('f') +# 'foo'.scan('f') +# 'foo'.split('f') +# 'foo'.start_with?('f') +# 'foo'.sub('f', 'x') +# 'foo'.sub!('f', 'x') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 +class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 + def determinist_regexp?(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 + def preferred_argument(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 + def replacement(regexp_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#42 +RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#38 +RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) + # Checks for unnecessary single-element Regexp character classes. # # @example @@ -44908,26 +45577,26 @@ class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#60 def allowed_escape?(node, char, index, within_character_class); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#75 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#76 def char_class_begins_or_ends_with_escaped_hyphen?(node, index); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#91 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#92 def delimiter?(node, char); end # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. # It's for compatibility with regexp_parser 1.8 and will never be maintained. # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#99 def each_escape(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#126 def escape_range_at_index(node, index); end end @@ -44962,13 +45631,18 @@ RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsaf # return something # end # -# # good +# # bad # def test # return something if something_else # end # # # good # def test +# something if something_else +# end +# +# # good +# def test # if x # elsif y # else @@ -44985,79 +45659,79 @@ RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsaf # return x, y # end # -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#50 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#58 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#63 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#104 def add_braces(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#94 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 def add_brackets(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#164 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#169 def allow_multiple_return_values?; end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#159 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#164 def check_begin_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#110 def check_branch(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#133 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#138 def check_case_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#154 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#159 def check_ensure_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#143 def check_if_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#150 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#155 def check_resbody_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#145 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#150 def check_rescue_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#121 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#126 def check_return_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#75 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#80 def correct_with_arguments(return_node, corrector); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#71 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#76 def correct_without_arguments(return_node, corrector); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#90 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#95 def hash_without_braces?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#168 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#173 def message(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#54 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#59 RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#60 RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#56 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#61 RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for redundant uses of `self`. @@ -45322,12 +45996,12 @@ class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#64 def multiple_statements?(branch); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#72 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#74 def register_offense(if_node, offense_branch, opposite_branch, keyword); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#68 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#70 def self_assign?(variable, branch); end # @return [Boolean] @@ -45556,7 +46230,7 @@ class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#171 def disabling_interpolation?(range); end # @return [Boolean] @@ -45576,7 +46250,7 @@ class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#167 def literal_in_interpolated_or_multiline_string?(node); end # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#59 @@ -46119,6 +46793,71 @@ RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/return_nil.rb#36 RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) +# Checks if `return` or `return nil` is used in predicate method definitions. +# +# @example +# # bad +# def foo? +# return if condition +# +# do_something? +# end +# +# # bad +# def foo? +# return nil if condition +# +# do_something? +# end +# +# # good +# def foo? +# return false if condition +# +# do_something? +# end +# @example AllowedMethods: ['foo?'] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# @example AllowedPatterns: [/foo/] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#50 +class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 + def return_nil?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 + def nil_node_at_the_end_of_method_body(body); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 + def register_offense(offense_node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 +RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) + # Transforms usages of a method call safeguarded by a non `nil` # check for the variable whose method is being called to # safe navigation (`&.`). If there is a method chain, all of the methods @@ -46573,48 +47312,48 @@ class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/semicolon.rb#64 def check_for_line_terminator_or_opener; end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#73 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#70 def each_semicolon; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#105 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102 def exist_semicolon_after_left_curly_brace?(tokens); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#113 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#110 def exist_semicolon_after_left_string_interpolation_brace?(tokens); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#101 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#98 def exist_semicolon_before_right_curly_brace?(tokens); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#109 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106 def exist_semicolon_before_right_string_interpolation_brace?(tokens); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#137 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#134 def expressions_per_line(exprs); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#151 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 def find_range_node(token_before_semicolon); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#143 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#140 def find_semicolon_positions(line); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#157 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#154 def range_nodes; end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#117 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114 def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#86 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#83 def semicolon_position(tokens); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#82 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#79 def tokens_for_lines; end class << self @@ -47087,10 +47826,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#240 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242 def allow_modifier?; end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#225 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227 def arguments_range(node); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 @@ -47120,13 +47859,13 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#182 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184 def correct_outer_condition(corrector, condition); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#195 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 def insert_bang(corrector, node, is_modify_form); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#208 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210 def insert_bang_for_and(corrector, node); end # @return [Boolean] @@ -47136,15 +47875,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246 def outer_condition_modify_form?(node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#236 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 def replace_condition(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#220 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222 def require_parentheses?(condition); end # @return [Boolean] @@ -47157,7 +47896,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#231 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 def wrap_condition?(node); end class << self @@ -47761,40 +48500,67 @@ end # source://rubocop//lib/rubocop/cop/style/string_literals.rb#35 RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) -# Checks that quotes inside the string interpolation +# Checks that quotes inside string, symbol, and regexp interpolations # match the configured preference. # # @example EnforcedStyle: single_quotes (default) # # bad -# result = "Tests #{success ? "PASS" : "FAIL"}" +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ # # # good -# result = "Tests #{success ? 'PASS' : 'FAIL'}" +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ # @example EnforcedStyle: double_quotes # # bad -# result = "Tests #{success ? 'PASS' : 'FAIL'}" +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ # # # good -# result = "Tests #{success ? "PASS" : "FAIL"}" +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ # -# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#22 +# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#42 class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::StringLiteralsHelp include ::RuboCop::Cop::StringHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#28 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#48 def autocorrect(corrector, node); end + # Cop classes that include the StringHelp module usually ignore regexp + # nodes. Not so for this cop, which is why we override the on_regexp + # definition with an empty one. + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#55 + def on_regexp(node); end + private - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#34 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#59 def message(_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#41 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#66 def offense?(node); end end @@ -47985,6 +48751,15 @@ RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), # # # bad # [:foo, :bar, :baz] +# +# # bad (contains spaces) +# %i[foo\ bar baz\ quux] +# +# # bad (contains [] with spaces) +# %i[foo \[ \]] +# +# # bad (contains () with spaces) +# %i(foo \( \)) # @example EnforcedStyle: brackets # # good # [:foo, :bar, :baz] @@ -47992,7 +48767,7 @@ RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), # # bad # %i[foo bar baz] # -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#31 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#40 class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::ArrayMinSize include ::RuboCop::Cop::ArraySyntax @@ -48001,48 +48776,62 @@ class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#48 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66 def on_array(node); end private - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#67 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96 def build_bracketed_array(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#90 - def symbol_without_quote?(string); end + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78 + def complex_content?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#60 - def symbols_contain_spaces?(node); end + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119 + def symbol_without_quote?(string); end - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#82 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 def to_symbol_literal(string); end class << self # Returns the value of attribute largest_brackets. # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#45 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 def largest_brackets; end # Sets the attribute largest_brackets # # @param value the value to set the attribute largest_brackets to. # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#45 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 def largest_brackets=(_arg0); end end end -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#42 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#51 RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#41 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#52 +RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50 RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57 +RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53 +RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array) + # Checks symbol literal syntax. # # @example @@ -48071,9 +48860,13 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # `define_method?` methods are allowed by default. # These are customizable with `AllowedMethods` option. # -# @example AllowedPatterns: ['map'] (default) -# # good +# @example +# # bad # something.map { |s| s.upcase } +# something.map { _1.upcase } +# +# # good +# something.map(&:upcase) # @example AllowMethodsWithArguments: false (default) # # bad # something.do_something(foo) { |o| o.bar } @@ -48103,13 +48896,9 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # @example AllowedPatterns: [] (default) # # bad # something.map { |s| s.upcase } -# @example -# # bad -# something.map { |s| s.upcase } -# something.map { _1.upcase } -# +# @example AllowedPatterns: ['map'] (default) # # good -# something.map(&:upcase) +# something.map { |s| s.upcase } # # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#87 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base @@ -48200,38 +48989,38 @@ RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#498 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#500 class RuboCop::Cop::Style::TernaryCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#503 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#505 def correct(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#507 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#509 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#521 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#523 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#534 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#536 def element_assignment?(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#538 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#540 def extract_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#551 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#553 def move_branch_inside_condition(corrector, branch, assignment); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#546 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#548 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#525 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#527 def ternary(node); end end end @@ -49053,11 +49842,27 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods # are allowed by default. These are customizable with `AllowedMethods` option. # -# @example AllowedMethods: ['allowed_method'] -# # good -# def allowed_method +# @example +# # bad +# def foo # @foo # end +# +# def bar=(val) +# @bar = val +# end +# +# def self.baz +# @baz +# end +# +# # good +# attr_reader :foo +# attr_writer :bar +# +# class << self +# attr_reader :baz +# end # @example ExactNameMatch: true (default) # # good # def name @@ -49109,26 +49914,10 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # def self.foo # @foo # end -# @example -# # bad -# def foo -# @foo -# end -# -# def bar=(val) -# @bar = val -# end -# -# def self.baz -# @baz -# end -# +# @example AllowedMethods: ['allowed_method'] # # good -# attr_reader :foo -# attr_writer :bar -# -# class << self -# attr_reader :baz +# def allowed_method +# @foo # end # # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 @@ -49670,6 +50459,49 @@ RuboCop::Cop::Style::WordArray::ARRAY_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/word_array.rb#78 RuboCop::Cop::Style::WordArray::PERCENT_MSG = T.let(T.unsafe(nil), String) +# Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse` with +# `File.read` argument. +# +# NOTE: `YAML.safe_load_file` was introduced in Ruby 3.0. +# +# @example +# +# # bad +# YAML.load(File.read(path)) +# YAML.parse(File.read(path)) +# +# # good +# YAML.load_file(path) +# YAML.parse_file(path) +# +# # bad +# YAML.safe_load(File.read(path)) # Ruby 3.0 and newer +# +# # good +# YAML.safe_load_file(path) # Ruby 3.0 and newer +# +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#27 +class RuboCop::Cop::Style::YAMLFileRead < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#41 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#34 + def yaml_file_read?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#60 + def offense_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#30 +RuboCop::Cop::Style::YAMLFileRead::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#31 +RuboCop::Cop::Style::YAMLFileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Enforces or forbids Yoda conditions, # i.e. comparison operations where the order of expression is reversed. # eg. `5 == x` @@ -49733,15 +50565,15 @@ class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#147 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#149 def actual_code_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#143 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#145 def constant_portion?(node); end - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#136 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#138 def corrected_code(node); end # @return [Boolean] @@ -49756,38 +50588,38 @@ class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#171 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#173 def interpolation?(node); end - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#132 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#134 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#155 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#157 def non_equality_operator?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#159 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#161 def noncommutative_operator?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#167 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#169 def program_name?(name); end - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#151 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#153 def reverse_comparison(operator); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#163 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#165 def source_file_path_constant?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#121 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#122 def valid_yoda?(node); end # @return [Boolean] @@ -49825,61 +50657,62 @@ RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Ha # config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i # ---- # -# @example SupportedOperators: ['*', '+', '&''] +# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default) # # bad -# 1 + x # 10 * y +# 1 + x # 1 & z +# 1 | x +# 1 ^ x # 1 + CONST # # # good -# 60 * 24 -# x + 1 # y * 10 +# x + 1 # z & 1 +# x | 1 +# x ^ 1 # CONST + 1 +# 60 * 24 # -# # good -# 1 | x -# -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#39 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40 class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#46 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#50 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#72 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#73 def constant_portion?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#80 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#81 def offended_ancestor?(node); end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#84 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#85 def offended_nodes; end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#76 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#77 def supported_operators; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#68 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#69 def yoda_expression_constant?(lhs, rhs); end end -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#42 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43 RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#44 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45 RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for numeric comparisons that can be replaced @@ -50768,6 +51601,55 @@ RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) # source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) +# Helper to abstract complexity of building range pairs +# with octal escape reconstruction (needed for regexp_parser < 2.7). +# +# source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#8 +class RuboCop::Cop::Utils::RegexpRanges + # @return [RegexpRanges] a new instance of RegexpRanges + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#11 + def initialize(root); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#18 + def compound_token; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#24 + def pairs; end + + # Returns the value of attribute root. + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#9 + def root; end + + private + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#78 + def compose_range(expressions, current); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#90 + def escaped_octal?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#94 + def octal_digit?(char); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#98 + def pop_octal_digits(expressions); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#44 + def populate(expr); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#32 + def populate_all; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#63 + def process_set(expressions, current); end +end + # This force provides a way to track local variables and scopes of Ruby. # Cops interact with this force need to override some of the hook methods. # @@ -51046,7 +51928,10 @@ class RuboCop::Cop::VariableForce::Assignment private - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#120 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#125 + def find_multiple_assignment_node(grandparent_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#121 def for_assignment_node; end # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104 @@ -51055,7 +51940,7 @@ class RuboCop::Cop::VariableForce::Assignment # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#96 def operator_assignment_node; end - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#113 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#114 def rest_assignment_node; end end @@ -52323,9 +53208,9 @@ end # Provide `CharacterSet` with `begin` and `end` locations. # -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#77 +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#79 module RuboCop::Ext::RegexpParser::Expression::CharacterSet - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#78 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#80 def build_location; end end @@ -52445,32 +53330,31 @@ end module RuboCop::FileFinder # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#17 + # source://rubocop//lib/rubocop/file_finder.rb#13 def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#24 + # source://rubocop//lib/rubocop/file_finder.rb#20 def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#32 + # source://rubocop//lib/rubocop/file_finder.rb#28 def traverse_files_upwards(filename, start_dir, stop_dir); end class << self # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#9 - def root_level=(level); end + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level; end # @api private - # @return [Boolean] # - # source://rubocop//lib/rubocop/file_finder.rb#13 - def root_level?(path, stop_dir); end + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level=(_arg0); end end end @@ -53433,10 +54317,10 @@ RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(ni RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#17 -RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) +RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::NullPresenter) # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#16 -RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) +RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::NullPresenter) # This formatter display dots for files with no offenses and # letters for files with problems in the them. In the end it @@ -53671,6 +54555,230 @@ class RuboCop::Lockfile def parser; end end +# source://rubocop//lib/rubocop/lsp/logger.rb#13 +module RuboCop::Lsp; end + +# Log for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/logger.rb#16 +class RuboCop::Lsp::Logger + class << self + # @api private + # + # source://rubocop//lib/rubocop/lsp/logger.rb#17 + def log(message); end + end +end + +# Routes for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/routes.rb#18 +class RuboCop::Lsp::Routes + # @api private + # @return [Routes] a new instance of Routes + # + # source://rubocop//lib/rubocop/lsp/routes.rb#25 + def initialize(server); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#31 + def for(name); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#38 + def handle_initialize(request); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#61 + def handle_initialized(_request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#170 + def handle_method_missing(request); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#67 + def handle_shutdown(request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#159 + def handle_unsupported_method(request, method = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#208 + def diagnostic(file_uri, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#178 + def extract_initialization_options_from(request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#188 + def format_file(file_uri, command: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#222 + def remove_file_protocol_from(uri); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#226 + def to_diagnostic(offense); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#238 + def to_range(location); end + + class << self + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#19 + def handle(name, &block); end + end +end + +# Runtime for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/runtime.rb#16 +class RuboCop::Lsp::Runtime + # @api private + # @return [Runtime] a new instance of Runtime + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#19 + def initialize(config_store); end + + # This abuses the `--stdin` option of rubocop and reads the formatted text + # from the `options[:stdin]` that rubocop mutates. This depends on + # `parallel: false` as well as the fact that RuboCop doesn't otherwise dup + # or reassign that options object. Risky business! + # + # Reassigning `options[:stdin]` is done here: + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/team.rb#L131 + # Printing `options[:stdin]` + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cli/command/execute_runner.rb#L95 + # Setting `parallel: true` would break this here: + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/runner.rb#L72 + # + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#38 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def layout_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def lint_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#55 + def offenses(path, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def safe_autocorrect=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#77 + def config_only_options; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#84 + def redirect_stdout(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#92 + def run_rubocop(options, path); end +end + +# Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/server.rb#21 +class RuboCop::Lsp::Server + # @api private + # @return [Server] a new instance of Server + # + # source://rubocop//lib/rubocop/lsp/server.rb#22 + def initialize(config_store); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#56 + def configure(options); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#48 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#52 + def offenses(path, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#29 + def start; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#62 + def stop(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#44 + def write(response); end +end + +# Severity for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/severity.rb#7 +class RuboCop::Lsp::Severity + class << self + # @api private + # + # source://rubocop//lib/rubocop/lsp/severity.rb#17 + def find_by(rubocop_severity); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/lsp/severity.rb#8 +RuboCop::Lsp::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + # Parse different formats of magic comments. # # @abstract parent of three different magic comment handlers @@ -54025,7 +55133,7 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#219 + # source://rubocop//lib/rubocop/options.rb#228 def add_additional_modes(opts); end # the autocorrect command-line arguments map to the autocorrect @options values like so: @@ -54037,62 +55145,67 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#136 + # source://rubocop//lib/rubocop/options.rb#139 def add_autocorrection_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#201 + # source://rubocop//lib/rubocop/options.rb#204 def add_cache_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#70 + # source://rubocop//lib/rubocop/options.rb#73 def add_check_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#159 + # source://rubocop//lib/rubocop/options.rb#162 def add_config_generation_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#177 + # source://rubocop//lib/rubocop/options.rb#180 def add_cop_selection_csv_option(option, opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#231 + # source://rubocop//lib/rubocop/options.rb#240 def add_general_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#101 + # source://rubocop//lib/rubocop/options.rb#211 + def add_lsp_option(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#104 def add_output_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#243 + # source://rubocop//lib/rubocop/options.rb#252 def add_profile_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#208 + # source://rubocop//lib/rubocop/options.rb#217 def add_server_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#192 + # source://rubocop//lib/rubocop/options.rb#195 def add_severity_option(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#52 + # source://rubocop//lib/rubocop/options.rb#53 def define_options; end # @api private # - # source://rubocop//lib/rubocop/options.rb#253 + # source://rubocop//lib/rubocop/options.rb#262 def handle_deprecated_option(old_option, new_option); end # Finds the option in `args` starting with -- and converts it to a symbol, @@ -54100,7 +55213,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#287 + # source://rubocop//lib/rubocop/options.rb#296 def long_opt_symbol(args); end # Sets a value in the @options hash, based on the given long option and its @@ -54108,17 +55221,17 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#276 + # source://rubocop//lib/rubocop/options.rb#285 def option(opts, *args); end # @api private # - # source://rubocop//lib/rubocop/options.rb#258 + # source://rubocop//lib/rubocop/options.rb#267 def rainbow; end # @api private # - # source://rubocop//lib/rubocop/options.rb#292 + # source://rubocop//lib/rubocop/options.rb#301 def require_feature(file); end # Creates a section of options in order to separate them visually when @@ -54126,7 +55239,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#268 + # source://rubocop//lib/rubocop/options.rb#277 def section(opts, heading, &_block); end end @@ -54149,125 +55262,125 @@ RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop//lib/rubocop/options.rb#488 +# source://rubocop//lib/rubocop/options.rb#497 module RuboCop::OptionsHelp; end # @api private # -# source://rubocop//lib/rubocop/options.rb#490 +# source://rubocop//lib/rubocop/options.rb#499 RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/options.rb#489 +# source://rubocop//lib/rubocop/options.rb#498 RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/options.rb#492 +# source://rubocop//lib/rubocop/options.rb#501 RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) # Validates option arguments and the options' compatibility with each other. # # @api private # -# source://rubocop//lib/rubocop/options.rb#302 +# source://rubocop//lib/rubocop/options.rb#311 class RuboCop::OptionsValidator # @api private # @return [OptionsValidator] a new instance of OptionsValidator # - # source://rubocop//lib/rubocop/options.rb#340 + # source://rubocop//lib/rubocop/options.rb#349 def initialize(options); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#462 + # source://rubocop//lib/rubocop/options.rb#471 def boolean_or_empty_cache?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#428 + # source://rubocop//lib/rubocop/options.rb#437 def disable_parallel_when_invalid_option_combo; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#454 + # source://rubocop//lib/rubocop/options.rb#463 def display_only_fail_level_offenses_with_autocorrect?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#458 + # source://rubocop//lib/rubocop/options.rb#467 def except_syntax?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#466 + # source://rubocop//lib/rubocop/options.rb#475 def incompatible_options; end # @api private # - # source://rubocop//lib/rubocop/options.rb#441 + # source://rubocop//lib/rubocop/options.rb#450 def invalid_arguments_for_parallel; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#449 + # source://rubocop//lib/rubocop/options.rb#458 def only_includes_redundant_disable?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#375 + # source://rubocop//lib/rubocop/options.rb#384 def validate_auto_gen_config; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#414 + # source://rubocop//lib/rubocop/options.rb#423 def validate_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#478 + # source://rubocop//lib/rubocop/options.rb#487 def validate_cache_enabled_for_cache_root; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#349 + # source://rubocop//lib/rubocop/options.rb#358 def validate_compatibility; end # @api private # - # source://rubocop//lib/rubocop/options.rb#344 + # source://rubocop//lib/rubocop/options.rb#353 def validate_cop_options; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#396 + # source://rubocop//lib/rubocop/options.rb#405 def validate_display_only_correctable_and_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#388 + # source://rubocop//lib/rubocop/options.rb#397 def validate_display_only_failed; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#405 + # source://rubocop//lib/rubocop/options.rb#414 def validate_display_only_failed_and_display_only_correctable; end # @api private # @raise [OptionParser::MissingArgument] # - # source://rubocop//lib/rubocop/options.rb#470 + # source://rubocop//lib/rubocop/options.rb#479 def validate_exclude_limit_option; end class << self @@ -54276,14 +55389,14 @@ class RuboCop::OptionsValidator # # @api private # - # source://rubocop//lib/rubocop/options.rb#309 + # source://rubocop//lib/rubocop/options.rb#318 def validate_cop_list(names); end private # @api private # - # source://rubocop//lib/rubocop/options.rb#326 + # source://rubocop//lib/rubocop/options.rb#335 def format_message_from(name, cop_names); end end end @@ -54789,7 +55902,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#233 + # source://rubocop//lib/rubocop/result_cache.rb#237 def context_checksum(team, options); end # @api private @@ -54808,7 +55921,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#217 + # source://rubocop//lib/rubocop/result_cache.rb#221 def relevant_options_digest(options); end # The checksum of the RuboCop program running the inspection. @@ -54834,7 +55947,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#224 + # source://rubocop//lib/rubocop/result_cache.rb#228 def team_checksum(team); end class << self @@ -55023,7 +56136,7 @@ class RuboCop::Runner # source://rubocop//lib/rubocop/runner.rb#414 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#468 + # source://rubocop//lib/rubocop/runner.rb#470 def get_processed_source(file); end # source://rubocop//lib/rubocop/runner.rb#342 @@ -55074,7 +56187,7 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#490 + # source://rubocop//lib/rubocop/runner.rb#492 def standby_team(config); end # @return [Boolean] @@ -55186,18 +56299,18 @@ class RuboCop::TargetFinder # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#145 + # source://rubocop//lib/rubocop/target_finder.rb#149 def all_cops_include; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#116 + # source://rubocop//lib/rubocop/target_finder.rb#120 def combined_exclude_glob_patterns(base_dir); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#172 + # source://rubocop//lib/rubocop/target_finder.rb#176 def configured_include?(file); end # @api private @@ -55242,63 +56355,63 @@ class RuboCop::TargetFinder # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#176 + # source://rubocop//lib/rubocop/target_finder.rb#180 def included_file?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#180 + # source://rubocop//lib/rubocop/target_finder.rb#184 def process_explicit_path(path, mode); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#149 + # source://rubocop//lib/rubocop/target_finder.rb#153 def ruby_executable?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#123 + # source://rubocop//lib/rubocop/target_finder.rb#127 def ruby_extension?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#127 + # source://rubocop//lib/rubocop/target_finder.rb#131 def ruby_extensions; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#168 + # source://rubocop//lib/rubocop/target_finder.rb#172 def ruby_file?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#134 + # source://rubocop//lib/rubocop/target_finder.rb#138 def ruby_filename?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#138 + # source://rubocop//lib/rubocop/target_finder.rb#142 def ruby_filenames; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#160 + # source://rubocop//lib/rubocop/target_finder.rb#164 def ruby_interpreters(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#164 + # source://rubocop//lib/rubocop/target_finder.rb#168 def stdin?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#108 + # source://rubocop//lib/rubocop/target_finder.rb#112 def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end # Finds all Ruby source files under the current or other supplied @@ -55331,7 +56444,7 @@ class RuboCop::TargetFinder # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#197 + # source://rubocop//lib/rubocop/target_finder.rb#201 def order; end end @@ -55349,34 +56462,34 @@ class RuboCop::TargetRuby # @api private # @return [TargetRuby] a new instance of TargetRuby # - # source://rubocop//lib/rubocop/target_ruby.rb#248 + # source://rubocop//lib/rubocop/target_ruby.rb#252 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#264 + # source://rubocop//lib/rubocop/target_ruby.rb#268 def rubocop_version_with_support; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#252 + # source://rubocop//lib/rubocop/target_ruby.rb#256 def source; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_ruby.rb#260 + # source://rubocop//lib/rubocop/target_ruby.rb#264 def supported?; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#256 + # source://rubocop//lib/rubocop/target_ruby.rb#260 def version; end class << self # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#234 + # source://rubocop//lib/rubocop/target_ruby.rb#238 def supported_versions; end end end @@ -55414,18 +56527,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#222 +# source://rubocop//lib/rubocop/target_ruby.rb#226 class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#223 + # source://rubocop//lib/rubocop/target_ruby.rb#227 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#229 + # source://rubocop//lib/rubocop/target_ruby.rb#233 def find_version; end end @@ -55438,11 +56551,11 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source extend ::RuboCop::AST::NodePattern::Macros # source://rubocop//lib/rubocop/target_ruby.rb#159 - def gem_requirement?(param0 = T.unsafe(nil)); end + def gem_requirement_versions(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#163 + # source://rubocop//lib/rubocop/target_ruby.rb#165 def name; end # source://rubocop//lib/rubocop/target_ruby.rb#154 @@ -55452,37 +56565,37 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#210 + # source://rubocop//lib/rubocop/target_ruby.rb#214 def find_default_minimal_known_ruby(right_hand_side); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#169 + # source://rubocop//lib/rubocop/target_ruby.rb#171 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#179 + # source://rubocop//lib/rubocop/target_ruby.rb#181 def gemspec_filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#186 + # source://rubocop//lib/rubocop/target_ruby.rb#188 def gemspec_filepath; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#206 + # source://rubocop//lib/rubocop/target_ruby.rb#210 def version_from_array(array); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#191 + # source://rubocop//lib/rubocop/target_ruby.rb#193 def version_from_gemspec_file(file); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#196 + # source://rubocop//lib/rubocop/target_ruby.rb#198 def version_from_right_hand_side(right_hand_side); end end @@ -55566,7 +56679,7 @@ RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#238 +# source://rubocop//lib/rubocop/target_ruby.rb#242 RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) # A place where information about a target ruby version is found. diff --git a/sorbet/rbi/gems/spoom@1.2.1.rbi b/sorbet/rbi/gems/spoom@1.2.2.rbi similarity index 79% rename from sorbet/rbi/gems/spoom@1.2.1.rbi rename to sorbet/rbi/gems/spoom@1.2.2.rbi index 9393e9b4c..32c4b320c 100644 --- a/sorbet/rbi/gems/spoom@1.2.1.rbi +++ b/sorbet/rbi/gems/spoom@1.2.2.rbi @@ -359,19 +359,19 @@ module Spoom::Context::Bundle # Run a command with `bundle` in this context directory # - # source://spoom//lib/spoom/context/bundle.rb#27 + # source://spoom//lib/spoom/context/bundle.rb#33 sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end # Run a command `bundle exec` in this context directory # - # source://spoom//lib/spoom/context/bundle.rb#40 + # source://spoom//lib/spoom/context/bundle.rb#46 sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end # Run `bundle install` in this context directory # - # source://spoom//lib/spoom/context/bundle.rb#34 + # source://spoom//lib/spoom/context/bundle.rb#40 sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end @@ -379,19 +379,29 @@ module Spoom::Context::Bundle # # Returns `nil` if `gem` cannot be found in the Gemfile. # - # source://spoom//lib/spoom/context/bundle.rb#48 + # source://spoom//lib/spoom/context/bundle.rb#62 sig { params(gem: ::String).returns(T.nilable(::String)) } def gem_version_from_gemfile_lock(gem); end - # Read the `contents` of the Gemfile in this context directory + # source://spoom//lib/spoom/context/bundle.rb#51 + sig { returns(T::Hash[::String, ::Bundler::LazySpecification]) } + def gemfile_lock_specs; end + + # Read the contents of the Gemfile in this context directory # # source://spoom//lib/spoom/context/bundle.rb#15 sig { returns(T.nilable(::String)) } def read_gemfile; end - # Set the `contents` of the Gemfile in this context directory + # Read the contents of the Gemfile.lock in this context directory # # source://spoom//lib/spoom/context/bundle.rb#21 + sig { returns(T.nilable(::String)) } + def read_gemfile_lock; end + + # Set the `contents` of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#27 sig { params(contents: ::String, append: T::Boolean).void } def write_gemfile!(contents, append: T.unsafe(nil)); end end @@ -421,11 +431,21 @@ module Spoom::Context::FileSystem sig { params(relative_path: ::String).returns(::String) } def absolute_path_to(relative_path); end + # source://spoom//lib/spoom/context/file_system.rb#53 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).returns(T::Array[::String]) + end + def collect_files(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + # Delete this context and its content # # Warning: it will `rm -rf` the context directory on the file system. # - # source://spoom//lib/spoom/context/file_system.rb#88 + # source://spoom//lib/spoom/context/file_system.rb#105 sig { void } def destroy!; end @@ -437,7 +457,7 @@ module Spoom::Context::FileSystem # Does `relative_path` point to an existing file in this context directory? # - # source://spoom//lib/spoom/context/file_system.rb#48 + # source://spoom//lib/spoom/context/file_system.rb#65 sig { params(relative_path: ::String).returns(T::Boolean) } def file?(relative_path); end @@ -461,7 +481,7 @@ module Spoom::Context::FileSystem # Move the file or directory from `from_relative_path` to `to_relative_path` # - # source://spoom//lib/spoom/context/file_system.rb#78 + # source://spoom//lib/spoom/context/file_system.rb#95 sig { params(from_relative_path: ::String, to_relative_path: ::String).void } def move!(from_relative_path, to_relative_path); end @@ -469,13 +489,13 @@ module Spoom::Context::FileSystem # # Will raise if the file doesn't exist. # - # source://spoom//lib/spoom/context/file_system.rb#56 + # source://spoom//lib/spoom/context/file_system.rb#73 sig { params(relative_path: ::String).returns(::String) } def read(relative_path); end # Remove the path at `relative_path` (recursive + force) in this context directory # - # source://spoom//lib/spoom/context/file_system.rb#72 + # source://spoom//lib/spoom/context/file_system.rb#89 sig { params(relative_path: ::String).void } def remove!(relative_path); end @@ -483,7 +503,7 @@ module Spoom::Context::FileSystem # # Append to the file if `append` is true. # - # source://spoom//lib/spoom/context/file_system.rb#64 + # source://spoom//lib/spoom/context/file_system.rb#81 sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end end @@ -506,21 +526,27 @@ module Spoom::Context::Git sig { params(ref: ::String).returns(::Spoom::ExecResult) } def git_checkout!(ref: T.unsafe(nil)); end - # Run `git add . && git commit` in this context directory + # Run `git checkout -b ` in this context directory # # source://spoom//lib/spoom/context/git.rb#68 - sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).void } + 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 + # + # source://spoom//lib/spoom/context/git.rb#78 + 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 # - # source://spoom//lib/spoom/context/git.rb#79 + # source://spoom//lib/spoom/context/git.rb#89 sig { returns(T.nilable(::String)) } def git_current_branch; end # Run `git diff` in this context directory # - # source://spoom//lib/spoom/context/git.rb#88 + # source://spoom//lib/spoom/context/git.rb#98 sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_diff(*arg); end @@ -535,21 +561,27 @@ module Spoom::Context::Git # Get the last commit in the currently checked out branch # - # source://spoom//lib/spoom/context/git.rb#94 + # source://spoom//lib/spoom/context/git.rb#104 sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } def git_last_commit(short_sha: T.unsafe(nil)); end - # source://spoom//lib/spoom/context/git.rb#105 + # source://spoom//lib/spoom/context/git.rb#115 sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_log(*arg); end - # source://spoom//lib/spoom/context/git.rb#110 + # Run `git push ` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#121 + sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) } + def git_push!(remote, ref, force: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#126 sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_show(*arg); end # Is there uncommited changes in this context directory? # - # source://spoom//lib/spoom/context/git.rb#116 + # source://spoom//lib/spoom/context/git.rb#132 sig { params(path: ::String).returns(T::Boolean) } def git_workdir_clean?(path: T.unsafe(nil)); end end @@ -562,35 +594,35 @@ module Spoom::Context::Sorbet # Does this context has a `sorbet/config` file? # - # source://spoom//lib/spoom/context/sorbet.rb#102 + # source://spoom//lib/spoom/context/sorbet.rb#119 sig { returns(T::Boolean) } def has_sorbet_config?; end # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) # - # source://spoom//lib/spoom/context/sorbet.rb#125 + # source://spoom//lib/spoom/context/sorbet.rb#142 sig { params(relative_path: ::String).returns(T.nilable(::String)) } def read_file_strictness(relative_path); end # Read the contents of `sorbet/config` in this context directory # - # source://spoom//lib/spoom/context/sorbet.rb#113 + # source://spoom//lib/spoom/context/sorbet.rb#130 sig { returns(::String) } def read_sorbet_config; end - # source://spoom//lib/spoom/context/sorbet.rb#107 + # source://spoom//lib/spoom/context/sorbet.rb#124 sig { returns(::Spoom::Sorbet::Config) } def sorbet_config; end # Get the commit introducing the `sorbet/config` file # - # source://spoom//lib/spoom/context/sorbet.rb#131 + # source://spoom//lib/spoom/context/sorbet.rb#148 sig { returns(T.nilable(::Spoom::Git::Commit)) } def sorbet_intro_commit; end # Get the commit removing the `sorbet/config` file # - # source://spoom//lib/spoom/context/sorbet.rb#143 + # source://spoom//lib/spoom/context/sorbet.rb#160 sig { returns(T.nilable(::Spoom::Git::Commit)) } def sorbet_removal_commit; end @@ -608,7 +640,7 @@ module Spoom::Context::Sorbet # List all files typechecked by Sorbet from its `config` that matches `strictness` # - # source://spoom//lib/spoom/context/sorbet.rb#87 + # source://spoom//lib/spoom/context/sorbet.rb#104 sig do params( strictness: ::String, @@ -632,13 +664,13 @@ module Spoom::Context::Sorbet sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end - # source://spoom//lib/spoom/context/sorbet.rb#93 + # source://spoom//lib/spoom/context/sorbet.rb#110 sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) } def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end # Set the `contents` of `sorbet/config` in this context directory # - # source://spoom//lib/spoom/context/sorbet.rb#119 + # source://spoom//lib/spoom/context/sorbet.rb#136 sig { params(contents: ::String, append: T::Boolean).void } def write_sorbet_config!(contents, append: T.unsafe(nil)); end end @@ -713,11 +745,6 @@ class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card # source://spoom//lib/spoom/coverage/report.rb#115 sig { override.returns(::String) } def html; end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://spoom//lib/spoom/coverage/report.rb#153 @@ -869,9 +896,6 @@ class Spoom::Coverage::D3::Base # source://spoom//lib/spoom/coverage/d3/base.rb#26 sig { returns(::String) } def header_style; end - - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end end end @@ -934,7 +958,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -961,9 +985,6 @@ class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base # source://spoom//lib/spoom/coverage/d3/pie.rb#25 sig { returns(::String) } def header_style; end - - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end end end @@ -1056,9 +1077,6 @@ class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base # source://spoom//lib/spoom/coverage/d3/timeline.rb#25 sig { returns(::String) } def header_style; end - - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end end end @@ -1150,11 +1168,6 @@ class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline # source://spoom//lib/spoom/coverage/d3/timeline.rb#336 sig { override.returns(::String) } def script; end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://spoom//lib/spoom/coverage/d3/timeline.rb#232 @@ -1215,11 +1228,6 @@ class Spoom::Coverage::Page < ::Spoom::Coverage::Template # source://spoom//lib/spoom/coverage/report.rb#47 sig { returns(::String) } def title; end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://spoom//lib/spoom/coverage/report.rb#44 @@ -1290,7 +1298,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1340,10 +1348,473 @@ class Spoom::Coverage::Template # source://spoom//lib/spoom/coverage/report.rb#28 sig { returns(::String) } def html; end +end + +# source://spoom//lib/spoom/deadcode/erb.rb#27 +module Spoom::Deadcode + class << self + # source://spoom//lib/spoom/deadcode.rb#49 + sig { params(index: ::Spoom::Deadcode::Index, erb: ::String, file: ::String).void } + def index_erb(index, erb, file:); end + + # source://spoom//lib/spoom/deadcode.rb#38 + sig { params(index: ::Spoom::Deadcode::Index, ruby: ::String, file: ::String).void } + def index_ruby(index, ruby, file:); end + end +end + +# A definition is a class, module, method, constant, etc. being defined in the code +# +# source://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::Deadcode::Location + const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) + + # source://spoom//lib/spoom/deadcode/definition.rb#78 + sig { void } + def alive!; end + + # Status + # + # source://spoom//lib/spoom/deadcode/definition.rb#73 + sig { returns(T::Boolean) } + def alive?; end + + # Kind + # + # source://spoom//lib/spoom/deadcode/definition.rb#41 + sig { returns(T::Boolean) } + def attr_reader?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#46 + sig { returns(T::Boolean) } + def attr_writer?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#51 + sig { returns(T::Boolean) } + def class?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#56 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#83 + sig { returns(T::Boolean) } + def dead?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#93 + sig { void } + def ignored!; end + + # source://spoom//lib/spoom/deadcode/definition.rb#88 + sig { returns(T::Boolean) } + def ignored?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#61 + sig { returns(T::Boolean) } + def method?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#66 + sig { returns(T::Boolean) } + def module?; end + + class << self + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/definition.rb#10 +class Spoom::Deadcode::Definition::Kind < ::T::Enum + enums do + AttrReader = new + AttrWriter = new + Class = new + Constant = new + Method = new + Module = new + end +end + +# source://spoom//lib/spoom/deadcode/definition.rb#21 +class Spoom::Deadcode::Definition::Status < ::T::Enum + enums do + ALIVE = new + DEAD = new + IGNORED = new + end +end + +# Custom engine to handle ERB templates as used by Rails +# +# source://spoom//lib/spoom/deadcode/erb.rb#29 +class Spoom::Deadcode::ERB < ::Erubi::Engine + # source://spoom//lib/spoom/deadcode/erb.rb#33 + sig { params(input: T.untyped, properties: T.untyped).void } + def initialize(input, properties = T.unsafe(nil)); end + + private + + # source://spoom//lib/spoom/deadcode/erb.rb#83 + sig { params(code: T.untyped).void } + def add_code(code); end + + # source://spoom//lib/spoom/deadcode/erb.rb#66 + sig { params(indicator: T.untyped, code: T.untyped).void } + def add_expression(indicator, code); end + + # source://spoom//lib/spoom/deadcode/erb.rb#89 + sig { params(_: T.untyped).void } + def add_postamble(_); end + + # source://spoom//lib/spoom/deadcode/erb.rb#48 + sig { params(text: T.untyped).void } + def add_text(text); end + + # source://spoom//lib/spoom/deadcode/erb.rb#95 + sig { params(src: T.untyped).void } + def flush_newline_if_pending(src); end +end + +# source://spoom//lib/spoom/deadcode/erb.rb#63 +Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode.rb#18 +class Spoom::Deadcode::Error < ::Spoom::Error + abstract! + + # source://spoom//lib/spoom/deadcode.rb#25 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end + +# source://spoom//lib/spoom/deadcode/index.rb#6 +class Spoom::Deadcode::Index + # source://spoom//lib/spoom/deadcode/index.rb#16 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/deadcode/index.rb#51 + sig { returns(T::Array[::Spoom::Deadcode::Definition]) } + def all_definitions; end + + # source://spoom//lib/spoom/deadcode/index.rb#56 + sig { returns(T::Array[::Spoom::Deadcode::Reference]) } + def all_references; end + + # Indexing + # + # source://spoom//lib/spoom/deadcode/index.rb#24 + sig { params(definition: ::Spoom::Deadcode::Definition).void } + def define(definition); end + + # source://spoom//lib/spoom/deadcode/index.rb#10 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } + def definitions; end + + # Utils + # + # source://spoom//lib/spoom/deadcode/index.rb#46 + sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } + def definitions_for_name(name); end + + # Mark all definitions having a reference of the same name as `alive` + # + # To be called once all the files have been indexed and all the definitions and references discovered. + # + # source://spoom//lib/spoom/deadcode/index.rb#37 + sig { void } + def finalize!; end + + # source://spoom//lib/spoom/deadcode/index.rb#29 + sig { params(reference: ::Spoom::Deadcode::Reference).void } + def reference(reference); end + + # source://spoom//lib/spoom/deadcode/index.rb#13 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) } + def references; end +end + +# source://spoom//lib/spoom/deadcode/indexer.rb#6 +class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor + # source://spoom//lib/spoom/deadcode/indexer.rb#16 + sig { params(path: ::String, source: ::String, index: ::Spoom::Deadcode::Index).void } + def initialize(path, source, index); end + + # @return [String] + # + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + def file_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#13 + sig { returns(::Spoom::Deadcode::Index) } + def index; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + sig { returns(::String) } + def path; end + + # Visit + # + # source://spoom//lib/spoom/deadcode/indexer.rb#34 + sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } + def visit(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#44 + sig { override.params(node: ::SyntaxTree::AliasNode).void } + def visit_alias(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#49 + sig { override.params(node: ::SyntaxTree::ARef).void } + def visit_aref(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#56 + sig { override.params(node: ::SyntaxTree::ARefField).void } + def visit_aref_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#63 + sig { override.params(node: ::SyntaxTree::ArgBlock).void } + def visit_arg_block(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#77 + sig { override.params(node: ::SyntaxTree::Binary).void } + def visit_binary(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#93 + sig { override.params(node: ::SyntaxTree::CallNode).void } + def visit_call(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#105 + sig { override.params(node: ::SyntaxTree::ClassDeclaration).void } + def visit_class(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#118 + sig { override.params(node: ::SyntaxTree::Command).void } + def visit_command(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#130 + sig { override.params(node: ::SyntaxTree::CommandCall).void } + def visit_command_call(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#143 + sig { override.params(node: ::SyntaxTree::Const).void } + def visit_const(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#148 + sig { override.params(node: ::SyntaxTree::ConstPathField).void } + def visit_const_path_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#158 + sig { override.params(node: ::SyntaxTree::DefNode).void } + def visit_def(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#166 + sig { override.params(node: ::SyntaxTree::Field).void } + def visit_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#182 + sig { override.params(node: ::SyntaxTree::ModuleDeclaration).void } + def visit_module(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#194 + sig { override.params(node: ::SyntaxTree::OpAssign).void } + def visit_opassign(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#203 + sig { params(send: ::Spoom::Deadcode::Send).void } + def visit_send(send); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#238 + sig { override.params(node: ::SyntaxTree::SymbolLiteral).void } + def visit_symbol_literal(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#247 + sig { override.params(node: ::SyntaxTree::TopConstField).void } + def visit_top_const_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#252 + sig { override.params(node: ::SyntaxTree::VarField).void } + def visit_var_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#269 + sig { override.params(node: ::SyntaxTree::VCall).void } + def visit_vcall(node); end + + private + + # source://spoom//lib/spoom/deadcode/indexer.rb#382 + sig do + params( + node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward)) + ).returns(T::Array[::SyntaxTree::Node]) + end + def call_args(node); end + + # Definition indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#278 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_attr_reader(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#289 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_attr_writer(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#300 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_class(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#311 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_constant(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#322 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_method(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#333 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_module(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#368 + sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } + def node_location(node); end + + # Node utils + # + # source://spoom//lib/spoom/deadcode/indexer.rb#358 + sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } + def node_string(node); end + + # Reference indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#346 + sig { params(name: ::String, node: ::SyntaxTree::Node).void } + def reference_constant(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#351 + sig { params(name: ::String, node: ::SyntaxTree::Node).void } + def reference_method(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#373 + sig { params(node: ::SyntaxTree::Node).returns(::String) } + def symbol_string(node); end +end + +# source://spoom//lib/spoom/deadcode.rb#32 +class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error; end + +# source://spoom//lib/spoom/deadcode/location.rb#6 +class Spoom::Deadcode::Location + include ::Comparable + + # source://spoom//lib/spoom/deadcode/location.rb#37 + sig do + params( + file: ::String, + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).void + end + def initialize(file, start_line, start_column, end_line, end_column); end + + # source://spoom//lib/spoom/deadcode/location.rb#46 + sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } + def <=>(other); end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#26 + def end_column; end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#26 + def end_line; end + + # source://spoom//lib/spoom/deadcode/location.rb#23 + sig { returns(::String) } + def file; end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#26 + def start_column; end + + # source://spoom//lib/spoom/deadcode/location.rb#26 + sig { returns(::Integer) } + def start_line; end + + # source://spoom//lib/spoom/deadcode/location.rb#53 + sig { returns(::String) } + def to_s; end class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end + # source://spoom//lib/spoom/deadcode/location.rb#17 + sig { params(file: ::String, location: ::SyntaxTree::Location).returns(::Spoom::Deadcode::Location) } + def from_syntax_tree(file, location); end + end +end + +# source://spoom//lib/spoom/deadcode/location.rb#11 +class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end + +# source://spoom//lib/spoom/deadcode.rb#31 +class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end + +# A reference is a call to a method or a constant +# +# source://spoom//lib/spoom/deadcode/reference.rb#7 +class Spoom::Deadcode::Reference < ::T::Struct + const :kind, ::Spoom::Deadcode::Reference::Kind + const :name, ::String + const :location, ::Spoom::Deadcode::Location + + # Kind + # + # source://spoom//lib/spoom/deadcode/reference.rb#24 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/deadcode/reference.rb#29 + sig { returns(T::Boolean) } + def method?; end + + class << self + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/reference.rb#10 +class Spoom::Deadcode::Reference::Kind < ::T::Enum + enums do + Constant = new + Method = new + end +end + +# An abstraction to simplify handling of SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall and +# SyntaxTree::VCall nodes. +# +# source://spoom//lib/spoom/deadcode/send.rb#8 +class Spoom::Deadcode::Send < ::T::Struct + const :node, ::SyntaxTree::Node + const :name, ::String + const :recv, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + const :args, T::Array[::SyntaxTree::Node], default: T.unsafe(nil) + const :block, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + + class << self + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 + def inherited(s); end end end @@ -1362,7 +1833,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1374,41 +1845,55 @@ class Spoom::FileCollector # If `allow_extensions` is empty, all files are collected. # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected. # - # source://spoom//lib/spoom/file_collector.rb#21 - sig { params(allow_extensions: T::Array[::String], exclude_patterns: T::Array[::String]).void } - def initialize(allow_extensions: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + # If `allow_mime_types` is empty, all files are collected. + # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in + # the list. + # + # source://spoom//lib/spoom/file_collector.rb#26 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).void + end + def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end # source://spoom//lib/spoom/file_collector.rb#9 sig { returns(T::Array[::String]) } def files; end - # source://spoom//lib/spoom/file_collector.rb#33 + # source://spoom//lib/spoom/file_collector.rb#39 sig { params(path: ::String).void } def visit_path(path); end - # source://spoom//lib/spoom/file_collector.rb#28 + # source://spoom//lib/spoom/file_collector.rb#34 sig { params(paths: T::Array[::String]).void } def visit_paths(paths); end private - # source://spoom//lib/spoom/file_collector.rb#50 + # source://spoom//lib/spoom/file_collector.rb#56 sig { params(path: ::String).returns(::String) } def clean_path(path); end - # source://spoom//lib/spoom/file_collector.rb#67 + # source://spoom//lib/spoom/file_collector.rb#73 sig { params(path: ::String).returns(T::Boolean) } def excluded_file?(path); end - # source://spoom//lib/spoom/file_collector.rb#75 + # source://spoom//lib/spoom/file_collector.rb#88 sig { params(path: ::String).returns(T::Boolean) } def excluded_path?(path); end - # source://spoom//lib/spoom/file_collector.rb#62 + # source://spoom//lib/spoom/file_collector.rb#97 + sig { params(path: ::String).returns(T.nilable(::String)) } + def mime_type_for(path); end + + # source://spoom//lib/spoom/file_collector.rb#68 sig { params(path: ::String).void } def visit_directory(path); end - # source://spoom//lib/spoom/file_collector.rb#55 + # source://spoom//lib/spoom/file_collector.rb#61 sig { params(path: ::String).void } def visit_file(path); end end @@ -1556,7 +2041,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1607,11 +2092,6 @@ class Spoom::FileTree::Visitor # source://spoom//lib/spoom/file_tree.rb#124 sig { params(tree: ::Spoom::FileTree).void } def visit_tree(tree); end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://spoom//lib/spoom/context/git.rb#5 @@ -1627,7 +2107,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end # Parse a line formated as `%h %at` into a `Commit` @@ -1739,7 +2219,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1772,7 +2252,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1830,7 +2310,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1855,7 +2335,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1866,19 +2346,15 @@ end # # source://spoom//lib/spoom/sorbet/lsp/base.rb#12 class Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#19 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 sig { void } def initialize; end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#24 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#21 sig { returns(T::Hash[T.untyped, T.untyped]) } def as_json; end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 - sig { returns(::String) } - def jsonrpc; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#32 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#29 sig { params(args: T.untyped).returns(::String) } def to_json(*args); end end @@ -1887,17 +2363,17 @@ end # # A processed notification message must not send a response back. They work like events. # -# source://spoom//lib/spoom/sorbet/lsp/base.rb#64 +# source://spoom//lib/spoom/sorbet/lsp/base.rb#58 class Spoom::LSP::Notification < ::Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#74 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } def initialize(method, params); end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#62 sig { returns(::String) } def method; end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#71 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#65 sig { returns(T::Hash[T.untyped, T.untyped]) } def params; end end @@ -1922,7 +2398,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1960,7 +2436,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1969,21 +2445,17 @@ end # # Every processed request must send a response back to the sender of the request. # -# source://spoom//lib/spoom/sorbet/lsp/base.rb#40 +# source://spoom//lib/spoom/sorbet/lsp/base.rb#37 class Spoom::LSP::Request < ::Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#53 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } def initialize(id, method, params); end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#41 sig { returns(::Integer) } def id; end - # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 - sig { returns(::String) } - def method; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#50 + # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 sig { returns(T::Hash[T.untyped, T.untyped]) } def params; end end @@ -2030,7 +2502,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -2076,55 +2548,46 @@ class Spoom::LSP::SymbolPrinter < ::Spoom::Printer # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 sig { returns(T::Set[::Integer]) } def seen; end - - # @return [Set] - # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 - def seen=(_arg0); end end -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# # source://spoom//lib/spoom/printer.rb#7 class Spoom::Printer include ::Spoom::Colorize - abstract! - - # source://spoom//lib/spoom/printer.rb#19 + # source://spoom//lib/spoom/printer.rb#17 sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end # Colorize `string` with color if `@colors` # - # source://spoom//lib/spoom/printer.rb#80 + # source://spoom//lib/spoom/printer.rb#78 sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } def colorize(string, *color); end # Decrease indent level # - # source://spoom//lib/spoom/printer.rb#33 + # source://spoom//lib/spoom/printer.rb#31 sig { void } def dedent; end # Increase indent level # - # source://spoom//lib/spoom/printer.rb#27 + # source://spoom//lib/spoom/printer.rb#25 sig { void } def indent; end - # source://spoom//lib/spoom/printer.rb#16 + # source://spoom//lib/spoom/printer.rb#14 sig { returns(T.any(::IO, ::StringIO)) } def out; end # @return [IO, StringIO] # - # source://spoom//lib/spoom/printer.rb#16 + # source://spoom//lib/spoom/printer.rb#14 def out=(_arg0); end # Print `string` into `out` # - # source://spoom//lib/spoom/printer.rb#39 + # source://spoom//lib/spoom/printer.rb#37 sig { params(string: T.nilable(::String)).void } def print(string); end @@ -2132,32 +2595,27 @@ class Spoom::Printer # # Does not use colors unless `@colors`. # - # source://spoom//lib/spoom/printer.rb#49 + # source://spoom//lib/spoom/printer.rb#47 sig { params(string: T.nilable(::String), color: ::Spoom::Color).void } def print_colored(string, *color); end # Print `string` with indent and newline # - # source://spoom//lib/spoom/printer.rb#64 + # source://spoom//lib/spoom/printer.rb#62 sig { params(string: T.nilable(::String)).void } def printl(string); end # Print a new line into `out` # - # source://spoom//lib/spoom/printer.rb#58 + # source://spoom//lib/spoom/printer.rb#56 sig { void } def printn; end # Print an indent space into `out` # - # source://spoom//lib/spoom/printer.rb#74 + # source://spoom//lib/spoom/printer.rb#72 sig { void } def printt; end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://spoom//lib/spoom.rb#10 diff --git a/sorbet/rbi/gems/stringio@3.0.6.rbi b/sorbet/rbi/gems/stringio@3.0.7.rbi similarity index 100% rename from sorbet/rbi/gems/stringio@3.0.6.rbi rename to sorbet/rbi/gems/stringio@3.0.7.rbi diff --git a/sorbet/rbi/gems/tapioca@0.11.6.rbi b/sorbet/rbi/gems/tapioca@0.11.8.rbi similarity index 90% rename from sorbet/rbi/gems/tapioca@0.11.6.rbi rename to sorbet/rbi/gems/tapioca@0.11.8.rbi index ad846fef4..9aa9cfe7d 100644 --- a/sorbet/rbi/gems/tapioca@0.11.6.rbi +++ b/sorbet/rbi/gems/tapioca@0.11.8.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem tapioca`. class Bundler::Dependency < ::Gem::Dependency - include ::Tapioca::Gemfile::AutoRequireHook + include ::Tapioca::BundlerExt::AutoRequireHook end # We need to do the alias-method-chain dance since Bootsnap does the same, @@ -35,7 +35,7 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.0.16/lib/rbi/model.rb#115 + # source://rbi/0.0.17/lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -45,19 +45,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.0.16/lib/rbi/model.rb#122 + # source://rbi/0.0.17/lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.0.16/lib/rbi/printer.rb#224 + # source://rbi/0.0.17/lib/rbi/printer.rb#226 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi/0.0.16/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.0.17/lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.0.16/lib/rbi/rewriters/annotate.rb#48 + # source://rbi/0.0.17/lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end @@ -121,23 +121,23 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi/0.0.16/lib/rbi/rewriters/deannotate.rb#40 + # source://rbi/0.0.17/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.0.16/lib/rbi/model.rb#128 + # source://rbi/0.0.17/lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.0.16/lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi/0.0.17/lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end - # source://rbi/0.0.16/lib/rbi/index.rb#64 + # source://rbi/0.0.17/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.0.16/lib/rbi/rewriters/merge_trees.rb#318 + # source://rbi/0.0.17/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -148,23 +148,23 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.0.16/lib/rbi/rewriters/nest_non_public_methods.rb#45 + # source://rbi/0.0.17/lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi/0.0.16/lib/rbi/rewriters/nest_singleton_methods.rb#35 + # source://rbi/0.0.17/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.0.16/lib/rbi/model.rb#106 + # source://rbi/0.0.17/lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.0.16/lib/rbi/printer.rb#231 + # source://rbi/0.0.17/lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi/0.0.16/lib/rbi/rewriters/sort_nodes.rb#107 + # source://rbi/0.0.17/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end @@ -185,16 +185,21 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#5 module T::Generic + include ::Kernel + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end @@ -214,6 +219,9 @@ module T::Generic::TypeStoragePatch # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end @@ -302,18 +310,18 @@ end # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#6 class T::Types::Simple < ::T::Types::Base - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#64 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79 def name; end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#59 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#74 module T::Types::Simple::GenericPatch # This method intercepts calls to the `name` method for simple types, so that # it can ask the name to the type if the type is generic, since, by this point, # we've created a clone of that type with the `name` method returning the # appropriate name for that specific concrete type. # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#64 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79 def name; end end @@ -329,17 +337,17 @@ end # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#84 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#99 module T::Utils::Private class << self - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#86 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101 def coerce_and_check_module_types(val, check_val, check_module_type); end end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#85 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#100 module T::Utils::Private::PrivateCoercePatch - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#86 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101 def coerce_and_check_module_types(val, check_val, check_module_type); end end @@ -360,6 +368,43 @@ end # source://tapioca//lib/tapioca.rb#37 Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) +# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 +module Tapioca::BundlerExt; end + +# This is a module that gets prepended to `Bundler::Dependency` and +# makes sure even gems marked as `require: false` are required during +# `Bundler.require`. +# +# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#9 +module Tapioca::BundlerExt::AutoRequireHook + requires_ancestor { Bundler::Dependency } + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#46 + sig { returns(T.untyped) } + def autorequire; end + + class << self + # @return [Boolean] + # + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#26 + def enabled?; end + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#22 + sig { params(name: T.untyped).returns(T::Boolean) } + def excluded?(name); end + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#36 + sig do + type_parameters(:Result) + .params( + exclude: T::Array[::String], + blk: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def override_require_false(exclude:, &blk); end + end +end + # source://tapioca//lib/tapioca.rb#60 Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) @@ -375,22 +420,22 @@ class Tapioca::Cli < ::Thor include ::Tapioca::ConfigHelper include ::Tapioca::EnvHelper - # source://tapioca//lib/tapioca/cli.rb#336 + # source://tapioca//lib/tapioca/cli.rb#346 def __print_version; end - # source://tapioca//lib/tapioca/cli.rb#316 + # source://tapioca//lib/tapioca/cli.rb#326 def annotations; end - # source://tapioca//lib/tapioca/cli.rb#286 + # source://tapioca//lib/tapioca/cli.rb#296 def check_shims; end # source://tapioca//lib/tapioca/cli.rb#41 def configure; end - # source://tapioca//lib/tapioca/cli.rb#133 + # source://tapioca//lib/tapioca/cli.rb#137 def dsl(*constant_or_paths); end - # source://tapioca//lib/tapioca/cli.rb#238 + # source://tapioca//lib/tapioca/cli.rb#247 def gem(*gems); end # source://tapioca//lib/tapioca/cli.rb#27 @@ -404,11 +449,11 @@ class Tapioca::Cli < ::Thor private - # source://tapioca//lib/tapioca/cli.rb#350 + # source://tapioca//lib/tapioca/cli.rb#360 def print_init_next_steps; end class << self - # source://tapioca//lib/tapioca/cli.rb#342 + # source://tapioca//lib/tapioca/cli.rb#352 def exit_on_failure?; end end end @@ -589,11 +634,6 @@ class Tapioca::Commands::Command # source://tapioca//lib/tapioca/commands/command.rb#56 sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void } def remove_file(path, verbose: T.unsafe(nil)); end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://tapioca//lib/tapioca/commands/command.rb#10 @@ -611,11 +651,6 @@ class Tapioca::Commands::CommandWithoutTracker < ::Tapioca::Commands::Command # source://tapioca//lib/tapioca/commands/command_without_tracker.rb#12 sig { void } def initialize; end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://tapioca//lib/tapioca/commands/configure.rb#6 @@ -660,7 +695,7 @@ class Tapioca::Commands::Dsl < ::Tapioca::Commands::CommandWithoutTracker include ::Tapioca::SorbetHelper include ::Tapioca::RBIFilesHelper - # source://tapioca//lib/tapioca/commands/dsl.rb#29 + # source://tapioca//lib/tapioca/commands/dsl.rb#30 sig do params( requested_constants: T::Array[::String], @@ -677,26 +712,27 @@ class Tapioca::Commands::Dsl < ::Tapioca::Commands::CommandWithoutTracker auto_strictness: T::Boolean, gem_dir: ::String, rbi_formatter: ::Tapioca::RBIFormatter, - app_root: ::String + app_root: ::String, + halt_upon_load_error: T::Boolean ).void end - def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, should_verify: 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)); end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, should_verify: 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)); end - # source://tapioca//lib/tapioca/commands/dsl.rb#93 + # source://tapioca//lib/tapioca/commands/dsl.rb#97 sig { override.void } def execute; end - # source://tapioca//lib/tapioca/commands/dsl.rb#66 + # source://tapioca//lib/tapioca/commands/dsl.rb#69 sig { void } def list_compilers; end private - # source://tapioca//lib/tapioca/commands/dsl.rb#325 + # source://tapioca//lib/tapioca/commands/dsl.rb#330 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca//lib/tapioca/commands/dsl.rb#249 + # source://tapioca//lib/tapioca/commands/dsl.rb#254 sig do params( constant_name: ::String, @@ -707,63 +743,63 @@ class Tapioca::Commands::Dsl < ::Tapioca::Commands::CommandWithoutTracker end def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/dsl.rb#187 + # source://tapioca//lib/tapioca/commands/dsl.rb#192 sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } def constantize(constant_names, ignore_missing: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/dsl.rb#210 + # source://tapioca//lib/tapioca/commands/dsl.rb#215 sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def constantize_compilers(compiler_names); end - # source://tapioca//lib/tapioca/commands/dsl.rb#385 + # source://tapioca//lib/tapioca/commands/dsl.rb#390 sig { returns(T::Array[::String]) } def constants_from_requested_paths; end - # source://tapioca//lib/tapioca/commands/dsl.rb#158 + # source://tapioca//lib/tapioca/commands/dsl.rb#163 sig { returns(::Tapioca::Dsl::Pipeline) } def create_pipeline; end - # source://tapioca//lib/tapioca/commands/dsl.rb#288 + # source://tapioca//lib/tapioca/commands/dsl.rb#293 sig { params(constant_name: ::String).returns(::Pathname) } def dsl_rbi_filename(constant_name); end - # source://tapioca//lib/tapioca/commands/dsl.rb#173 + # source://tapioca//lib/tapioca/commands/dsl.rb#178 sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/dsl.rb#380 + # source://tapioca//lib/tapioca/commands/dsl.rb#385 sig { params(constant: ::String).returns(::String) } def generate_command_for(constant); end - # source://tapioca//lib/tapioca/commands/dsl.rb#267 + # source://tapioca//lib/tapioca/commands/dsl.rb#272 sig { params(dir: ::Pathname).void } def perform_dsl_verification(dir); end - # source://tapioca//lib/tapioca/commands/dsl.rb#276 + # source://tapioca//lib/tapioca/commands/dsl.rb#281 sig { params(files: T::Set[::Pathname]).void } def purge_stale_dsl_rbi_files(files); end - # source://tapioca//lib/tapioca/commands/dsl.rb#375 + # source://tapioca//lib/tapioca/commands/dsl.rb#380 sig { params(constant: ::String).returns(::String) } def rbi_filename_for(constant); end - # source://tapioca//lib/tapioca/commands/dsl.rb#356 + # source://tapioca//lib/tapioca/commands/dsl.rb#361 sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } def rbi_files_in(path); end - # source://tapioca//lib/tapioca/commands/dsl.rb#334 + # source://tapioca//lib/tapioca/commands/dsl.rb#339 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end - # source://tapioca//lib/tapioca/commands/dsl.rb#229 + # source://tapioca//lib/tapioca/commands/dsl.rb#234 sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } def resolve(name); end - # source://tapioca//lib/tapioca/commands/dsl.rb#363 + # source://tapioca//lib/tapioca/commands/dsl.rb#368 sig { params(class_name: ::String).returns(::String) } def underscore(class_name); end - # source://tapioca//lib/tapioca/commands/dsl.rb#293 + # source://tapioca//lib/tapioca/commands/dsl.rb#298 sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } def verify_dsl_rbi(tmp_dir:); end end @@ -773,7 +809,7 @@ class Tapioca::Commands::Gem < ::Tapioca::Commands::Command include ::Tapioca::SorbetHelper include ::Tapioca::RBIFilesHelper - # source://tapioca//lib/tapioca/commands/gem.rb#28 + # source://tapioca//lib/tapioca/commands/gem.rb#29 sig do params( gem_names: T::Array[::String], @@ -789,86 +825,87 @@ class Tapioca::Commands::Gem < ::Tapioca::Commands::Command number_of_workers: T.nilable(::Integer), auto_strictness: T::Boolean, dsl_dir: ::String, - rbi_formatter: ::Tapioca::RBIFormatter + rbi_formatter: ::Tapioca::RBIFormatter, + halt_upon_load_error: T::Boolean ).void end - def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil)); end + def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/gem.rb#67 + # source://tapioca//lib/tapioca/commands/gem.rb#70 sig { override.void } def execute; end - # source://tapioca//lib/tapioca/commands/gem.rb#105 + # source://tapioca//lib/tapioca/commands/gem.rb#109 sig { params(should_verify: T::Boolean, exclude: T::Array[::String]).void } def sync(should_verify: T.unsafe(nil), exclude: T.unsafe(nil)); end private - # source://tapioca//lib/tapioca/commands/gem.rb#283 + # source://tapioca//lib/tapioca/commands/gem.rb#288 sig { returns(T::Array[::String]) } def added_rbis; end - # source://tapioca//lib/tapioca/commands/gem.rb#344 + # source://tapioca//lib/tapioca/commands/gem.rb#349 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca//lib/tapioca/commands/gem.rb#154 + # source://tapioca//lib/tapioca/commands/gem.rb#158 sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } def compile_gem_rbi(gem); end - # source://tapioca//lib/tapioca/commands/gem.rb#278 + # source://tapioca//lib/tapioca/commands/gem.rb#283 sig { params(gem_name: ::String).returns(::Pathname) } def existing_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/gem.rb#326 + # source://tapioca//lib/tapioca/commands/gem.rb#331 sig { returns(T::Hash[::String, ::String]) } def existing_rbis; end - # source://tapioca//lib/tapioca/commands/gem.rb#290 + # source://tapioca//lib/tapioca/commands/gem.rb#295 sig { params(gem_name: ::String).returns(::Pathname) } def expected_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/gem.rb#332 + # source://tapioca//lib/tapioca/commands/gem.rb#337 sig { returns(T::Hash[::String, ::String]) } def expected_rbis; end - # source://tapioca//lib/tapioca/commands/gem.rb#295 + # source://tapioca//lib/tapioca/commands/gem.rb#300 sig { params(gem_name: ::String).returns(T::Boolean) } def gem_rbi_exists?(gem_name); end - # source://tapioca//lib/tapioca/commands/gem.rb#339 + # source://tapioca//lib/tapioca/commands/gem.rb#344 sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } def gem_rbi_filename(gem_name, version); end - # source://tapioca//lib/tapioca/commands/gem.rb#139 + # source://tapioca//lib/tapioca/commands/gem.rb#143 sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def gems_to_generate(gem_names); end - # source://tapioca//lib/tapioca/commands/gem.rb#349 + # source://tapioca//lib/tapioca/commands/gem.rb#354 sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } def merge_with_exported_rbi(gem, file); end - # source://tapioca//lib/tapioca/commands/gem.rb#320 + # source://tapioca//lib/tapioca/commands/gem.rb#325 sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } def move(old_filename, new_filename); end - # source://tapioca//lib/tapioca/commands/gem.rb#231 + # source://tapioca//lib/tapioca/commands/gem.rb#235 sig { void } def perform_additions; end - # source://tapioca//lib/tapioca/commands/gem.rb#204 + # source://tapioca//lib/tapioca/commands/gem.rb#208 sig { void } def perform_removals; end - # source://tapioca//lib/tapioca/commands/gem.rb#185 + # source://tapioca//lib/tapioca/commands/gem.rb#189 sig { params(exclude: T::Array[::String]).void } def perform_sync_verification(exclude: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/gem.rb#273 + # source://tapioca//lib/tapioca/commands/gem.rb#278 sig { returns(T::Array[::String]) } def removed_rbis; end - # source://tapioca//lib/tapioca/commands/gem.rb#300 + # source://tapioca//lib/tapioca/commands/gem.rb#305 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end end @@ -977,7 +1014,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -988,7 +1025,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11013/lib/types/struct.rb#13 def inherited(s); end end end @@ -1104,9 +1141,6 @@ class Tapioca::Dsl::Compiler sig { params(constant: ::Module).returns(T::Boolean) } def handles?(constant); end - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#37 sig { returns(T::Set[::Module]) } def processable_constants; end @@ -1114,7 +1148,7 @@ class Tapioca::Dsl::Compiler private # source://tapioca//lib/tapioca/dsl/compiler.rb#47 - sig { returns(T::Enumerable[::Class]) } + sig { returns(T::Enumerable[T::Class[T.anything]]) } def all_classes; end # source://tapioca//lib/tapioca/dsl/compiler.rb#53 @@ -1299,11 +1333,6 @@ end # source://tapioca//lib/tapioca/gem/events.rb#6 class Tapioca::Gem::Event abstract! - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://tapioca//lib/tapioca/gem/events.rb#43 @@ -1354,11 +1383,6 @@ class Tapioca::Gem::Listeners::Base # source://tapioca//lib/tapioca/gem/listeners/base.rb#41 sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#7 @@ -1406,11 +1430,19 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#34 - sig { params(tree: ::RBI::Tree, module_name: ::String, mod: ::Module, for_visibility: T::Array[::Symbol]).void } - def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil)); end + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#35 + sig do + params( + tree: ::RBI::Tree, + module_name: ::String, + mod: ::Module, + for_visibility: T::Array[::Symbol], + attached_class: T.nilable(::Module) + ).void + end + def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil), attached_class: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#63 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#71 sig do params( tree: ::RBI::Tree, @@ -1422,18 +1454,22 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base end def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#191 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#212 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#184 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#205 sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } def initialize_method_for(constant); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#165 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#173 sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } def method_names_by_visibility(mod); end + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#197 + sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) } + def method_new_in_abstract_class?(attached_class, method_name); end + # Check whether the method is defined by the constant. # # In most cases, it works to check that the constant is the method owner. However, @@ -1444,7 +1480,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. # - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#151 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#159 sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) } def method_owned_by_constant?(method, constant); end @@ -1452,7 +1488,7 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#174 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#182 sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) } def struct_method?(constant, method_name); end end @@ -1534,7 +1570,7 @@ class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#28 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#27 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end @@ -1609,10 +1645,14 @@ class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners:: sig { params(tree: ::RBI::Tree, constant: ::Module).void } def compile_type_variable_declarations(tree, constant); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#63 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50 + sig { params(type_variable: ::Tapioca::TypeVariableModule).returns(T.nilable(::RBI::Node)) } + def node_from_type_variable(type_variable); end + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#15 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end @@ -1739,11 +1779,6 @@ class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event # source://tapioca//lib/tapioca/gem/events.rb#64 sig { returns(::String) } def symbol; end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://tapioca//lib/tapioca/gem/pipeline.rb#6 @@ -1851,7 +1886,7 @@ class Tapioca::Gem::Pipeline def compile_object(name, value); end # source://tapioca//lib/tapioca/gem/pipeline.rb#308 - sig { params(constant: ::Class).returns(T.nilable(::String)) } + sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } def compile_superclass(constant); end # source://tapioca//lib/tapioca/gem/pipeline.rb#357 @@ -1953,189 +1988,166 @@ module Tapioca::GemHelper def path_in_dir?(path, dir); end end -# source://tapioca//lib/tapioca/gemfile.rb#5 +# source://tapioca//lib/tapioca/gemfile.rb#7 class Tapioca::Gemfile - # source://tapioca//lib/tapioca/gemfile.rb#69 - sig { params(exclude: T::Array[::String]).void } - def initialize(exclude); end + # source://tapioca//lib/tapioca/gemfile.rb#27 + sig { params(excluded_gems: T::Array[::String]).void } + def initialize(excluded_gems); end - # source://tapioca//lib/tapioca/gemfile.rb#60 + # source://tapioca//lib/tapioca/gemfile.rb#18 sig { returns(::Bundler::Definition) } def definition; end - # source://tapioca//lib/tapioca/gemfile.rb#63 + # source://tapioca//lib/tapioca/gemfile.rb#21 sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def dependencies; end - # source://tapioca//lib/tapioca/gemfile.rb#80 + # source://tapioca//lib/tapioca/gemfile.rb#40 sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) } def gem(gem_name); end - # source://tapioca//lib/tapioca/gemfile.rb#66 + # source://tapioca//lib/tapioca/gemfile.rb#24 sig { returns(T::Array[::String]) } def missing_specs; end - # source://tapioca//lib/tapioca/gemfile.rb#85 + # source://tapioca//lib/tapioca/gemfile.rb#45 sig { void } def require_bundle; end private - # source://tapioca//lib/tapioca/gemfile.rb#130 + # source://tapioca//lib/tapioca/gemfile.rb#92 sig { returns(::String) } def dir; end - # source://tapioca//lib/tapioca/gemfile.rb#92 + # source://tapioca//lib/tapioca/gemfile.rb#54 sig { returns(::File) } def gemfile; end - # source://tapioca//lib/tapioca/gemfile.rb#125 + # source://tapioca//lib/tapioca/gemfile.rb#87 sig { returns(T::Array[::Symbol]) } def groups; end - # source://tapioca//lib/tapioca/gemfile.rb#95 + # source://tapioca//lib/tapioca/gemfile.rb#57 sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) } def load_dependencies; end # @return [File] # - # source://tapioca//lib/tapioca/gemfile.rb#92 + # source://tapioca//lib/tapioca/gemfile.rb#54 def lockfile; end - # source://tapioca//lib/tapioca/gemfile.rb#106 + # source://tapioca//lib/tapioca/gemfile.rb#68 sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } def materialize_deps; end - # source://tapioca//lib/tapioca/gemfile.rb#120 + # source://tapioca//lib/tapioca/gemfile.rb#82 sig { returns(::Bundler::Runtime) } def runtime; end end -# This is a module that gets prepended to `Bundler::Dependency` and -# makes sure even gems marked as `require: false` are required during -# `Bundler.require`. -# -# source://tapioca//lib/tapioca/gemfile.rb#18 -module Tapioca::Gemfile::AutoRequireHook - requires_ancestor { Bundler::Dependency } - - # source://tapioca//lib/tapioca/gemfile.rb#39 - sig { returns(T.untyped) } - def autorequire; end - - class << self - # source://tapioca//lib/tapioca/gemfile.rb#30 - sig { params(exclude: T::Array[::String]).returns(T::Array[::String]) } - def exclude=(exclude); end - - # source://tapioca//lib/tapioca/gemfile.rb#33 - sig { params(name: T.untyped).returns(T::Boolean) } - def excluded?(name); end - end -end - -# source://tapioca//lib/tapioca/gemfile.rb#134 +# source://tapioca//lib/tapioca/gemfile.rb#96 class Tapioca::Gemfile::GemSpec include ::Tapioca::GemHelper - # source://tapioca//lib/tapioca/gemfile.rb#173 + # source://tapioca//lib/tapioca/gemfile.rb#135 sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } def initialize(spec); end - # source://tapioca//lib/tapioca/gemfile.rb#183 + # source://tapioca//lib/tapioca/gemfile.rb#145 sig { params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # source://tapioca//lib/tapioca/gemfile.rb#203 + # source://tapioca//lib/tapioca/gemfile.rb#165 sig { params(path: ::String).returns(T::Boolean) } def contains_path?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#222 + # source://tapioca//lib/tapioca/gemfile.rb#184 sig { returns(T::Boolean) } def export_rbi_files?; end - # source://tapioca//lib/tapioca/gemfile.rb#217 + # source://tapioca//lib/tapioca/gemfile.rb#179 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # source://tapioca//lib/tapioca/gemfile.rb#227 + # source://tapioca//lib/tapioca/gemfile.rb#189 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end - # source://tapioca//lib/tapioca/gemfile.rb#170 + # source://tapioca//lib/tapioca/gemfile.rb#132 sig { returns(T::Array[::Pathname]) } def files; end - # source://tapioca//lib/tapioca/gemfile.rb#167 + # source://tapioca//lib/tapioca/gemfile.rb#129 sig { returns(::String) } def full_gem_path; end - # source://tapioca//lib/tapioca/gemfile.rb#188 + # source://tapioca//lib/tapioca/gemfile.rb#150 sig { params(gemfile_dir: ::String).returns(T::Boolean) } def ignore?(gemfile_dir); end - # source://tapioca//lib/tapioca/gemfile.rb#193 + # source://tapioca//lib/tapioca/gemfile.rb#155 sig { returns(::String) } def name; end - # source://tapioca//lib/tapioca/gemfile.rb#212 + # source://tapioca//lib/tapioca/gemfile.rb#174 sig { void } def parse_yard_docs; end - # source://tapioca//lib/tapioca/gemfile.rb#198 + # source://tapioca//lib/tapioca/gemfile.rb#160 sig { returns(::String) } def rbi_file_name; end - # source://tapioca//lib/tapioca/gemfile.rb#239 + # source://tapioca//lib/tapioca/gemfile.rb#201 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end # @return [String] # - # source://tapioca//lib/tapioca/gemfile.rb#167 + # source://tapioca//lib/tapioca/gemfile.rb#129 def version; end private - # source://tapioca//lib/tapioca/gemfile.rb#250 + # source://tapioca//lib/tapioca/gemfile.rb#212 sig { returns(T::Array[::Pathname]) } def collect_files; end - # source://tapioca//lib/tapioca/gemfile.rb#265 + # source://tapioca//lib/tapioca/gemfile.rb#227 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # source://tapioca//lib/tapioca/gemfile.rb#323 + # source://tapioca//lib/tapioca/gemfile.rb#285 sig { returns(T::Boolean) } def gem_ignored?; end - # source://tapioca//lib/tapioca/gemfile.rb#302 + # source://tapioca//lib/tapioca/gemfile.rb#264 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#270 + # source://tapioca//lib/tapioca/gemfile.rb#232 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # source://tapioca//lib/tapioca/gemfile.rb#281 + # source://tapioca//lib/tapioca/gemfile.rb#243 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # source://tapioca//lib/tapioca/gemfile.rb#295 + # source://tapioca//lib/tapioca/gemfile.rb#257 sig { returns(::String) } def version_string; end class << self - # source://tapioca//lib/tapioca/gemfile.rb#142 + # source://tapioca//lib/tapioca/gemfile.rb#104 sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } def spec_lookup_by_file_path; end end end -# source://tapioca//lib/tapioca/gemfile.rb#154 +# source://tapioca//lib/tapioca/gemfile.rb#116 Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca/gemfile.rb#8 +# source://tapioca//lib/tapioca/gemfile.rb#10 Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } # source://tapioca//lib/tapioca/loaders/loader.rb#5 @@ -2143,73 +2155,89 @@ module Tapioca::Loaders; end # source://tapioca//lib/tapioca/loaders/dsl.rb#6 class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader - # source://tapioca//lib/tapioca/loaders/dsl.rb#29 - sig { params(tapioca_path: ::String, eager_load: T::Boolean, app_root: ::String).void } - def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/loaders/dsl.rb#38 + sig do + params( + tapioca_path: ::String, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/loaders/dsl.rb#20 + # source://tapioca//lib/tapioca/loaders/dsl.rb#27 sig { override.void } def load; end protected - # source://tapioca//lib/tapioca/loaders/dsl.rb#61 + # source://tapioca//lib/tapioca/loaders/dsl.rb#71 sig { void } def load_application; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#43 + # source://tapioca//lib/tapioca/loaders/dsl.rb#53 sig { void } def load_dsl_compilers; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#38 + # source://tapioca//lib/tapioca/loaders/dsl.rb#48 sig { void } def load_dsl_extensions; end class << self - # source://tapioca//lib/tapioca/loaders/dsl.rb#13 - sig { params(tapioca_path: ::String, eager_load: T::Boolean, app_root: ::String).void } - def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/loaders/dsl.rb#15 + sig do + params( + tapioca_path: ::String, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end end end # source://tapioca//lib/tapioca/loaders/gem.rb#6 class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader - # source://tapioca//lib/tapioca/loaders/gem.rb#46 + # source://tapioca//lib/tapioca/loaders/gem.rb#49 sig do params( bundle: ::Tapioca::Gemfile, prerequire: T.nilable(::String), postrequire: ::String, - default_command: ::String + default_command: ::String, + halt_upon_load_error: T::Boolean ).void end - def initialize(bundle:, prerequire:, postrequire:, default_command:); end + def initialize(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end - # source://tapioca//lib/tapioca/loaders/gem.rb#32 + # source://tapioca//lib/tapioca/loaders/gem.rb#34 sig { override.void } def load; end protected - # source://tapioca//lib/tapioca/loaders/gem.rb#76 + # source://tapioca//lib/tapioca/loaders/gem.rb#80 sig { params(file: ::String, error: ::LoadError).void } def explain_failed_require(file, error); end - # source://tapioca//lib/tapioca/loaders/gem.rb#56 + # source://tapioca//lib/tapioca/loaders/gem.rb#60 sig { void } def require_gem_file; end class << self - # source://tapioca//lib/tapioca/loaders/gem.rb#20 + # source://tapioca//lib/tapioca/loaders/gem.rb#21 sig do params( bundle: ::Tapioca::Gemfile, prerequire: T.nilable(::String), postrequire: ::String, - default_command: ::String + default_command: ::String, + halt_upon_load_error: T::Boolean ).void end - def load_application(bundle:, prerequire:, postrequire:, default_command:); end + def load_application(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end end end @@ -2235,68 +2263,71 @@ class Tapioca::Loaders::Loader private - # source://tapioca//lib/tapioca/loaders/loader.rb#182 + # source://tapioca//lib/tapioca/loaders/loader.rb#198 sig { void } def eager_load_rails_app; end # @return [Array] # - # source://tapioca//lib/tapioca/loaders/loader.rb#153 + # source://tapioca//lib/tapioca/loaders/loader.rb#169 def engines; end - # source://tapioca//lib/tapioca/loaders/loader.rb#24 + # source://tapioca//lib/tapioca/loaders/loader.rb#29 sig do params( gemfile: ::Tapioca::Gemfile, initialize_file: T.nilable(::String), - require_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); end + def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end - # source://tapioca//lib/tapioca/loaders/loader.rb#111 + # source://tapioca//lib/tapioca/loaders/loader.rb#127 sig { void } def load_engines_in_classic_mode; end - # source://tapioca//lib/tapioca/loaders/loader.rb#89 + # source://tapioca//lib/tapioca/loaders/loader.rb#105 sig { void } def load_engines_in_zeitwerk_mode; end - # source://tapioca//lib/tapioca/loaders/loader.rb#37 - sig { params(environment_load: T::Boolean, eager_load: T::Boolean, app_root: ::String).void } - def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/loaders/loader.rb#49 + sig do + params( + environment_load: T::Boolean, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + 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 - # source://tapioca//lib/tapioca/loaders/loader.rb#64 + # source://tapioca//lib/tapioca/loaders/loader.rb#80 sig { void } def load_rails_engines; end - # source://tapioca//lib/tapioca/loaders/loader.rb#203 + # source://tapioca//lib/tapioca/loaders/loader.rb#219 sig { params(file: T.nilable(::String)).void } def require_helper(file); end - # source://tapioca//lib/tapioca/loaders/loader.rb#78 + # source://tapioca//lib/tapioca/loaders/loader.rb#94 def run_initializers; end - # source://tapioca//lib/tapioca/loaders/loader.rb#167 + # source://tapioca//lib/tapioca/loaders/loader.rb#183 sig { params(path: ::String).void } def safe_require(path); end - # source://tapioca//lib/tapioca/loaders/loader.rb#174 + # source://tapioca//lib/tapioca/loaders/loader.rb#190 sig { void } def silence_deprecations; end - # source://tapioca//lib/tapioca/loaders/loader.rb#136 + # source://tapioca//lib/tapioca/loaders/loader.rb#152 sig { params(blk: T.proc.void).void } def with_rails_application(&blk); end - # source://tapioca//lib/tapioca/loaders/loader.rb#129 + # source://tapioca//lib/tapioca/loaders/loader.rb#145 sig { returns(T::Boolean) } def zeitwerk_mode?; end - - class << self - # source://sorbet-runtime/0.5.10875/lib/types/private/abstract/declare.rb#37 - def new(*args, **_arg1, &blk); end - end end # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#5 @@ -2334,7 +2365,7 @@ module Tapioca::RBIFilesHelper dsl_dir: ::String, auto_strictness: T::Boolean, gems: T::Array[::Tapioca::Gemfile::GemSpec], - compilers: T::Enumerable[::Class] + compilers: T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)] ).void end def validate_rbi_files(command:, gem_dir:, dsl_dir:, auto_strictness:, gems: T.unsafe(nil), compilers: T.unsafe(nil)); end @@ -2643,7 +2674,7 @@ module Tapioca::Runtime::GenericTypeRegistry def create_generic_type(constant, name); end # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#155 - sig { params(constant: ::Class).returns(::Class) } + sig { params(constant: T::Class[T.anything]).returns(T::Class[T.anything]) } def create_safe_subclass(constant); end # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#182 @@ -2668,6 +2699,10 @@ module Tapioca::Runtime::Reflection extend ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::Reflection + # source://tapioca//lib/tapioca/runtime/reflection.rb#196 + sig { params(constant: ::Module).returns(T.untyped) } + def abstract_type_of(constant); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#77 sig { params(constant: ::Module).returns(T::Array[::Module]) } def ancestors_of(constant); end @@ -2677,7 +2712,7 @@ module Tapioca::Runtime::Reflection def are_equal?(object, other); end # source://tapioca//lib/tapioca/runtime/reflection.rb#56 - sig { params(object: ::BasicObject).returns(::Class) } + sig { params(object: ::BasicObject).returns(T::Class[T.anything]) } def class_of(object); end # @param constant [BasicObject] @@ -2712,7 +2747,7 @@ module Tapioca::Runtime::Reflection sig do type_parameters(:U) .params( - klass: T.all(::Class, T.type_parameter(:U)) + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) ).returns(T::Array[T.type_parameter(:U)]) end def descendants_of(klass); end @@ -2721,6 +2756,10 @@ module Tapioca::Runtime::Reflection sig { params(constant: ::Module).returns(T::Set[::String]) } def file_candidates_for(constant); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#202 + sig { params(constant: ::Module).returns(T::Boolean) } + def final_module?(constant); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#112 sig { params(constant: ::Module).returns(T::Array[::Module]) } def inherited_ancestors_of(constant); end @@ -2765,33 +2804,37 @@ module Tapioca::Runtime::Reflection sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } def resolve_loc(locations); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#207 + sig { params(constant: ::Module).returns(T::Boolean) } + def sealed_module?(constant); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#133 sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } def signature_of(method); end # source://tapioca//lib/tapioca/runtime/reflection.rb#72 - sig { params(constant: ::Module).returns(::Class) } + sig { params(constant: ::Module).returns(T::Class[T.anything]) } def singleton_class_of(constant); end # source://tapioca//lib/tapioca/runtime/reflection.rb#82 - sig { params(constant: ::Class).returns(T.nilable(::Class)) } + sig { params(constant: T::Class[T.anything]).returns(T.nilable(T::Class[T.anything])) } def superclass_of(constant); end private - # source://tapioca//lib/tapioca/runtime/reflection.rb#228 + # source://tapioca//lib/tapioca/runtime/reflection.rb#244 sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } def child_module_for_parent_with_name(parent, name); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#239 + # source://tapioca//lib/tapioca/runtime/reflection.rb#255 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_defined_by_forwardable_module?(method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#214 + # source://tapioca//lib/tapioca/runtime/reflection.rb#230 sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } def methods_for(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#198 + # source://tapioca//lib/tapioca/runtime/reflection.rb#214 sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } def relevant_methods_for(constant); end end @@ -3031,15 +3074,15 @@ Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 module Tapioca::SorbetHelper - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#33 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#34 sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } def sorbet(*sorbet_args); end - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#38 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#39 sig { returns(::String) } def sorbet_path; end - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#45 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#46 sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } def sorbet_supports?(feature, version: T.unsafe(nil)); end end @@ -3121,7 +3164,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.10875/lib/types/private/methods/_methods.rb#255 + # source://sorbet-runtime/0.5.11013/lib/types/private/methods/_methods.rb#255 def engines(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/static/symbol_loader.rb#73 @@ -3164,16 +3207,16 @@ Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca.rb#34 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#122 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#137 class Tapioca::TypeVariable < ::T::Types::TypeVariable # @return [TypeVariable] a new instance of TypeVariable # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#123 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#138 def initialize(name, variance); end # Returns the value of attribute name. # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#128 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#143 def name; end end @@ -3183,9 +3226,9 @@ end # need to do any matching of constants to type variables to bind their names, Ruby will # do that automatically for us and we get the `name` method for free from `Module`. # -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#136 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#151 class Tapioca::TypeVariableModule < ::Module - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#158 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#177 sig do params( context: ::Module, @@ -3199,29 +3242,33 @@ class Tapioca::TypeVariableModule < ::Module end def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#212 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#231 sig { returns(::Tapioca::TypeVariable) } def coerce_to_type_variable; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#192 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#211 sig { returns(T::Boolean) } def fixed?; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#173 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#192 sig { returns(T.nilable(::String)) } def name; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#197 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#216 sig { returns(::String) } def serialize; end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#163 + sig { returns(::Tapioca::TypeVariableModule::Type) } + def type; end + private - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#246 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#265 sig { returns(T::Hash[::Symbol, T.untyped]) } def bounds; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#222 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#241 sig do params( fixed: T.untyped, @@ -3231,7 +3278,7 @@ class Tapioca::TypeVariableModule < ::Module end def build_bounds_proc(fixed, lower, upper); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#236 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#255 sig do type_parameters(:Result) .params( @@ -3241,11 +3288,12 @@ class Tapioca::TypeVariableModule < ::Module def with_bound_name_pre_3_0(&block); end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#139 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#154 class Tapioca::TypeVariableModule::Type < ::T::Enum enums do Member = new Template = new + HasAttachedClass = new end end @@ -3263,14 +3311,14 @@ class URI::Source < ::URI::File sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.12.0/uri/generic.rb#243 + # source://uri/0.12.1/uri/generic.rb#243 def gem_name; end # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.12.0/uri/generic.rb#283 + # source://uri/0.12.1/uri/generic.rb#283 def line_number; end # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 diff --git a/sorbet/rbi/gems/unparser@0.6.7.rbi b/sorbet/rbi/gems/unparser@0.6.8.rbi similarity index 99% rename from sorbet/rbi/gems/unparser@0.6.7.rbi rename to sorbet/rbi/gems/unparser@0.6.8.rbi index 8c3ff8945..937e27312 100644 --- a/sorbet/rbi/gems/unparser@0.6.7.rbi +++ b/sorbet/rbi/gems/unparser@0.6.8.rbi @@ -1099,13 +1099,13 @@ class Unparser::Color def format(text); end end -# source://unparser//lib/unparser/color.rb#39 +# source://unparser//lib/unparser/color.rb#41 Unparser::Color::GREEN = T.let(T.unsafe(nil), Unparser::Color) # source://unparser//lib/unparser/color.rb#17 Unparser::Color::NONE = T.let(T.unsafe(nil), T.untyped) -# source://unparser//lib/unparser/color.rb#38 +# source://unparser//lib/unparser/color.rb#40 Unparser::Color::RED = T.let(T.unsafe(nil), Unparser::Color) # Holds the comments that remain to be emitted @@ -3692,7 +3692,7 @@ class Unparser::NodeDetails::Send # @return [Boolean] # - # source://unparser//lib/unparser/node_details/send.rb#36 + # source://unparser//lib/unparser/node_details/send.rb#37 def arguments?; end # @return [Boolean] @@ -3702,7 +3702,7 @@ class Unparser::NodeDetails::Send # @return [Boolean] # - # source://unparser//lib/unparser/node_details/send.rb#32 + # source://unparser//lib/unparser/node_details/send.rb#33 def assignment_operator?; end # @return [Boolean] @@ -3710,7 +3710,7 @@ class Unparser::NodeDetails::Send # source://unparser//lib/unparser/node_details/send.rb#21 def binary_syntax_allowed?; end - # source://unparser//lib/unparser/node_details/send.rb#40 + # source://unparser//lib/unparser/node_details/send.rb#41 def non_assignment_selector; end # source://unparser//lib/unparser/dsl.rb#18 @@ -3726,7 +3726,7 @@ class Unparser::NodeDetails::Send # @return [Boolean] # - # source://unparser//lib/unparser/node_details/send.rb#28 + # source://unparser//lib/unparser/node_details/send.rb#29 def selector_unary_operator?; end # source://unparser//lib/unparser/adamantium/method_builder.rb#87 @@ -3913,21 +3913,22 @@ class Unparser::Validation # Test if source could be unparsed successfully # + # # @api private # @return [Boolean] # - # source://unparser//lib/unparser/validation.rb#20 + # source://unparser//lib/unparser/validation.rb#21 def success?; end private - # source://unparser//lib/unparser/validation.rb#106 + # source://unparser//lib/unparser/validation.rb#108 def make_report(label, attribute_name); end - # source://unparser//lib/unparser/validation.rb#118 + # source://unparser//lib/unparser/validation.rb#120 def node_diff_report; end - # source://unparser//lib/unparser/validation.rb#110 + # source://unparser//lib/unparser/validation.rb#112 def report_exception(exception); end class << self @@ -3939,7 +3940,7 @@ class Unparser::Validation # @param original_node [Parser::AST::Node] # @return [Validator] # - # source://unparser//lib/unparser/validation.rb#79 + # source://unparser//lib/unparser/validation.rb#81 def from_node(original_node); end # Create validator from file @@ -3947,7 +3948,7 @@ class Unparser::Validation # @param path [Pathname] # @return [Validator] # - # source://unparser//lib/unparser/validation.rb#100 + # source://unparser//lib/unparser/validation.rb#102 def from_path(path); end # Create validator from string @@ -3955,29 +3956,29 @@ class Unparser::Validation # @param original_source [String] # @return [Validator] # - # source://unparser//lib/unparser/validation.rb#53 + # source://unparser//lib/unparser/validation.rb#55 def from_string(original_source); end private - # source://unparser//lib/unparser/validation.rb#133 + # source://unparser//lib/unparser/validation.rb#135 def const_unit(_value); end end end -# source://unparser//lib/unparser/validation.rb#136 +# source://unparser//lib/unparser/validation.rb#138 class Unparser::Validation::Literal < ::Unparser::Validation - # source://unparser//lib/unparser/validation.rb#141 + # source://unparser//lib/unparser/validation.rb#143 def report; end # @return [Boolean] # - # source://unparser//lib/unparser/validation.rb#137 + # source://unparser//lib/unparser/validation.rb#139 def success?; end private - # source://unparser//lib/unparser/validation.rb#156 + # source://unparser//lib/unparser/validation.rb#158 def source_diff_report; end end