diff --git a/Gemfile b/Gemfile
index 7f2eca03b..3f3583cee 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,11 +5,11 @@ source "https://rubygems.org"
gemspec
gem "bundler", "~> 2.5"
-gem "minitest", "~> 5.23"
+gem "minitest", "~> 5.25"
group :development do
gem "debug", "~> 1.9", require: false
- gem "minitest-reporters", "~> 1.6"
+ gem "minitest-reporters", "~> 1.7"
gem "mocha", "~> 2.3"
gem "psych", "~> 5.1", require: false
gem "rake", "~> 13.2"
@@ -19,7 +19,7 @@ group :development do
gem "rubocop-rake", "~> 0.6.0", require: false
gem "rubocop-shopify", "~> 2.15", require: false
gem "rubocop-sorbet", "~> 0.8", require: false
- gem "rubocop", "~> 1.64"
+ gem "rubocop", "~> 1.65"
gem "simplecov", require: false
gem "syntax_tree", ">= 6.1.1", "< 7"
diff --git a/Gemfile.lock b/Gemfile.lock
index 4b5c0778a..f3031cdc7 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -20,7 +20,7 @@ GEM
specs:
ansi (1.5.0)
ast (2.4.2)
- builder (3.2.4)
+ builder (3.3.0)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
@@ -33,8 +33,8 @@ GEM
json (2.7.2)
language_server-protocol (3.17.0.3)
logger (1.6.0)
- minitest (5.23.1)
- minitest-reporters (1.6.1)
+ minitest (5.25.1)
+ minitest-reporters (1.7.1)
ansi
builder
minitest (>= 5.0)
@@ -42,51 +42,51 @@ GEM
mocha (2.3.0)
ruby2_keywords (>= 0.0.5)
netrc (0.11.0)
- parallel (1.24.0)
- parser (3.3.2.0)
+ parallel (1.26.3)
+ parser (3.3.4.2)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
prism (0.30.0)
psych (5.1.2)
stringio
- racc (1.8.0)
+ racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
rbi (0.1.13)
prism (>= 0.18.0, < 1.0.0)
sorbet-runtime (>= 0.5.9204)
- rbs (3.5.1)
+ rbs (3.5.3)
logger
regexp_parser (2.9.2)
reline (0.5.0)
io-console (~> 0.5)
- rexml (3.3.4)
+ rexml (3.3.6)
strscan
- rubocop (1.64.1)
+ rubocop (1.65.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
- regexp_parser (>= 1.8, < 3.0)
+ regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
- rubocop-ast (1.31.3)
+ rubocop-ast (1.32.1)
parser (>= 3.3.1.0)
rubocop-md (1.2.2)
rubocop (>= 1.0)
- rubocop-minitest (0.35.0)
+ rubocop-minitest (0.35.1)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-shopify (2.15.1)
rubocop (~> 1.51)
- rubocop-sorbet (0.8.3)
- rubocop (>= 0.90.0)
+ rubocop-sorbet (0.8.5)
+ rubocop (>= 1)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
simplecov (0.22.0)
@@ -95,14 +95,14 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
- sorbet (0.5.11481)
- sorbet-static (= 0.5.11481)
- sorbet-runtime (0.5.11481)
- sorbet-static (0.5.11481-universal-darwin)
- sorbet-static (0.5.11481-x86_64-linux)
- sorbet-static-and-runtime (0.5.11481)
- sorbet (= 0.5.11481)
- sorbet-runtime (= 0.5.11481)
+ sorbet (0.5.11551)
+ sorbet-static (= 0.5.11551)
+ sorbet-runtime (0.5.11551)
+ sorbet-static (0.5.11551-universal-darwin)
+ sorbet-static (0.5.11551-x86_64-linux)
+ sorbet-static-and-runtime (0.5.11551)
+ sorbet (= 0.5.11551)
+ sorbet-runtime (= 0.5.11551)
spoom (1.3.0)
erubi (>= 1.10.0)
prism (>= 0.19.0)
@@ -138,13 +138,13 @@ PLATFORMS
DEPENDENCIES
bundler (~> 2.5)
debug (~> 1.9)
- minitest (~> 5.23)
- minitest-reporters (~> 1.6)
+ minitest (~> 5.25)
+ minitest-reporters (~> 1.7)
mocha (~> 2.3)
psych (~> 5.1)
rake (~> 13.2)
rdoc!
- rubocop (~> 1.64)
+ rubocop (~> 1.65)
rubocop-md (~> 1.2.0)
rubocop-minitest (~> 0.35.0)
rubocop-rake (~> 0.6.0)
diff --git a/sorbet/rbi/gems/builder@3.2.4.rbi b/sorbet/rbi/gems/builder@3.3.0.rbi
similarity index 93%
rename from sorbet/rbi/gems/builder@3.2.4.rbi
rename to sorbet/rbi/gems/builder@3.3.0.rbi
index f99d49237..8fd4015a5 100644
--- a/sorbet/rbi/gems/builder@3.2.4.rbi
+++ b/sorbet/rbi/gems/builder@3.3.0.rbi
@@ -7,7 +7,7 @@
# If the Builder::XChar module is not currently defined, fail on any
# name clashes in standard library classes.
#
-# source://builder//lib/builder/blankslate.rb#17
+# source://builder//lib/builder/xmlbase.rb#4
module Builder
class << self
# source://builder//lib/builder/xchar.rb#13
@@ -15,12 +15,9 @@ module Builder
end
end
-# source://builder//lib/builder/blankslate.rb#19
-Builder::BlankSlate = BasicObject
-
# Generic error for builder
#
-# source://builder//lib/builder/xmlbase.rb#9
+# source://builder//lib/builder/xmlbase.rb#7
class Builder::IllegalBlockError < ::RuntimeError; end
# source://builder//lib/builder/xchar.rb#33
@@ -85,7 +82,7 @@ Builder::XChar::XML_PREDEFINED = T.let(T.unsafe(nil), Regexp)
# XmlBase is a base class for building XML builders. See
# Builder::XmlMarkup and Builder::XmlEvents for examples.
#
-# source://builder//lib/builder/xmlbase.rb#13
+# source://builder//lib/builder/xmlbase.rb#11
class Builder::XmlBase < ::BasicObject
# Create an XML markup builder.
#
@@ -100,7 +97,7 @@ class Builder::XmlBase < ::BasicObject
#
# @return [XmlBase] a new instance of XmlBase
#
- # source://builder//lib/builder/xmlbase.rb#29
+ # source://builder//lib/builder/xmlbase.rb#27
def initialize(indent = T.unsafe(nil), initial = T.unsafe(nil), encoding = T.unsafe(nil)); end
# Append text to the output target without escaping any markup.
@@ -117,19 +114,19 @@ class Builder::XmlBase < ::BasicObject
# method/operation builders can use other builders as their
# targets.
#
- # source://builder//lib/builder/xmlbase.rb#118
+ # source://builder//lib/builder/xmlbase.rb#116
def <<(text); end
# @return [Boolean]
#
- # source://builder//lib/builder/xmlbase.rb#35
+ # source://builder//lib/builder/xmlbase.rb#33
def explicit_nil_handling?; end
# Create XML markup based on the name of the method. This method
# is never invoked directly, but is called for each markup method
# in the markup block that isn't cached.
#
- # source://builder//lib/builder/xmlbase.rb#92
+ # source://builder//lib/builder/xmlbase.rb#90
def method_missing(sym, *args, &block); end
# For some reason, nil? is sent to the XmlMarkup object. If nil?
@@ -141,14 +138,14 @@ class Builder::XmlBase < ::BasicObject
#
# @return [Boolean]
#
- # source://builder//lib/builder/xmlbase.rb#128
+ # source://builder//lib/builder/xmlbase.rb#126
def nil?; end
# Create a tag named +sym+. Other than the first argument which
# is the tag name, the arguments are the same as the tags
# implemented via method_missing.
#
- # source://builder//lib/builder/xmlbase.rb#42
+ # source://builder//lib/builder/xmlbase.rb#40
def tag!(sym, *args, &block); end
# Append text to the output target. Escape any markup. May be
@@ -156,24 +153,24 @@ class Builder::XmlBase < ::BasicObject
#
# builder.p { |b| b.br; b.text! "HI" } #=>
HI
#
- # source://builder//lib/builder/xmlbase.rb#101
+ # source://builder//lib/builder/xmlbase.rb#99
def text!(text); end
private
- # source://builder//lib/builder/xmlbase.rb#136
+ # source://builder//lib/builder/xmlbase.rb#134
def _escape(text); end
- # source://builder//lib/builder/xmlbase.rb#159
+ # source://builder//lib/builder/xmlbase.rb#157
def _escape_attribute(text); end
- # source://builder//lib/builder/xmlbase.rb#169
+ # source://builder//lib/builder/xmlbase.rb#167
def _indent; end
- # source://builder//lib/builder/xmlbase.rb#174
+ # source://builder//lib/builder/xmlbase.rb#172
def _nested_structures(block); end
- # source://builder//lib/builder/xmlbase.rb#164
+ # source://builder//lib/builder/xmlbase.rb#162
def _newline; end
# If XmlBase.cache_method_calls = true, we dynamicly create the method
@@ -183,20 +180,20 @@ class Builder::XmlBase < ::BasicObject
# method_missing is very slow, this speeds up document generation
# significantly.
#
- # source://builder//lib/builder/xmlbase.rb#187
+ # source://builder//lib/builder/xmlbase.rb#185
def cache_method_call(sym); end
class << self
# Returns the value of attribute cache_method_calls.
#
- # source://builder//lib/builder/xmlbase.rb#16
+ # source://builder//lib/builder/xmlbase.rb#14
def cache_method_calls; end
# Sets the attribute cache_method_calls
#
# @param value the value to set the attribute cache_method_calls to.
#
- # source://builder//lib/builder/xmlbase.rb#16
+ # source://builder//lib/builder/xmlbase.rb#14
def cache_method_calls=(_arg0); end
end
end
@@ -347,15 +344,15 @@ end
#
# Example:
#
-# xm = Builder.new(:indent=>2)
+# xm = Builder::XmlMarkup.new(:indent=>2)
# # xm will produce nicely formatted and indented XML.
#
-# xm = Builder.new(:indent=>2, :margin=>4)
+# xm = Builder::XmlMarkup.new(:indent=>2, :margin=>4)
# # xm will produce nicely formatted and indented XML with 2
# # spaces per indent and an over all indentation level of 4.
#
# builder = Builder::XmlMarkup.new(:target=>$stdout, :indent=>2)
-# builder.name { |b| b.first("Jim"); b.last("Weirich) }
+# builder.name { |b| b.first("Jim"); b.last("Weirich") }
# # prints:
# #
# # Jim
@@ -384,7 +381,7 @@ end
#
# xml_builder = Builder::XmlMarkup.new
# xml_builder.div { |xml|
-# xml.stong("text")
+# xml.strong("text")
# }
#
# source://builder//lib/builder/xmlmarkup.rb#161
diff --git a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi b/sorbet/rbi/gems/minitest-reporters@1.7.1.rbi
similarity index 95%
rename from sorbet/rbi/gems/minitest-reporters@1.6.1.rbi
rename to sorbet/rbi/gems/minitest-reporters@1.7.1.rbi
index e8f4c7af0..6d7b196b9 100644
--- a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi
+++ b/sorbet/rbi/gems/minitest-reporters@1.7.1.rbi
@@ -7,82 +7,85 @@
# source://minitest-reporters//lib/minitest/reporters.rb#3
module Minitest
class << self
- # source://minitest/5.23.1/lib/minitest.rb#197
+ # source://minitest/5.25.1/lib/minitest.rb#322
def __run(reporter, options); end
- # source://minitest/5.23.1/lib/minitest.rb#97
+ # source://minitest/5.25.1/lib/minitest.rb#96
def after_run(&block); end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def allow_fork; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def allow_fork=(_arg0); end
- # source://minitest/5.23.1/lib/minitest.rb#69
+ # source://minitest/5.25.1/lib/minitest.rb#69
def autorun; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def backtrace_filter; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def backtrace_filter=(_arg0); end
- # source://minitest/5.23.1/lib/minitest.rb#18
+ # source://minitest/5.25.1/lib/minitest.rb#18
def cattr_accessor(name); end
- # source://minitest/5.23.1/lib/minitest.rb#1178
+ # source://minitest/5.25.1/lib/minitest.rb#1215
def clock_time; end
- # source://minitest/5.23.1/lib/minitest.rb#177
+ # source://minitest/5.25.1/lib/minitest.rb#302
def empty_run!(options); end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def extensions; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def extensions=(_arg0); end
- # source://minitest/5.23.1/lib/minitest.rb#306
+ # source://minitest/5.25.1/lib/minitest.rb#335
def filter_backtrace(bt); end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def info_signal; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def info_signal=(_arg0); end
- # source://minitest/5.23.1/lib/minitest.rb#101
+ # source://minitest/5.25.1/lib/minitest.rb#124
def init_plugins(options); end
- # source://minitest/5.23.1/lib/minitest.rb#108
+ # source://minitest/5.25.1/lib/minitest.rb#108
def load_plugins; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def parallel_executor; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def parallel_executor=(_arg0); end
- # source://minitest/5.23.1/lib/minitest.rb#210
+ # source://minitest/5.25.1/lib/minitest.rb#142
def process_args(args = T.unsafe(nil)); end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#103
+ def register_plugin(name_or_mod); end
+
+ # source://minitest/5.25.1/lib/minitest.rb#19
def reporter; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def reporter=(_arg0); end
- # source://minitest/5.23.1/lib/minitest.rb#143
+ # source://minitest/5.25.1/lib/minitest.rb#268
def run(args = T.unsafe(nil)); end
- # source://minitest/5.23.1/lib/minitest.rb#1169
+ # source://minitest/5.25.1/lib/minitest.rb#1206
def run_one_method(klass, method_name); end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def seed; end
- # source://minitest/5.23.1/lib/minitest.rb#19
+ # source://minitest/5.25.1/lib/minitest.rb#19
def seed=(_arg0); end
end
end
@@ -544,25 +547,28 @@ class Minitest::Reporters::JUnitReporter < ::Minitest::Reporters::BaseReporter
private
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#168
+ # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#166
def analyze_suite(tests); end
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#181
+ # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#179
def filename_for(suite); end
# source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#77
def get_source_location(result); end
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#158
+ # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#156
def location(exception); end
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#142
+ # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#134
def message_for(test); end
# source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#85
def parse_xml_for(xml, suite, tests); end
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#119
+ # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#150
+ def xml_attachment_for(test); end
+
+ # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#111
def xml_message_for(test); end
end
@@ -946,36 +952,37 @@ class Minitest::Reporters::SpecReporter < ::Minitest::Reporters::BaseReporter
# The constructor takes an `options` hash
#
# @option options
+ # @option options
# @param options [Hash]
# @return [SpecReporter] a new instance of SpecReporter
#
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#18
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#20
def initialize(options = T.unsafe(nil)); end
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#50
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#53
def record(test); end
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#29
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#32
def report; end
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#23
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#26
def start; end
protected
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#62
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#65
def after_suite(_suite); end
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#58
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#61
def before_suite(suite); end
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#66
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#69
def print_failure(name, tests); end
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#76
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#79
def record_print_failures_if_any(test); end
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#83
+ # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#86
def record_print_status(test); end
end
diff --git a/sorbet/rbi/gems/minitest@5.23.1.rbi b/sorbet/rbi/gems/minitest@5.25.1.rbi
similarity index 77%
rename from sorbet/rbi/gems/minitest@5.23.1.rbi
rename to sorbet/rbi/gems/minitest@5.25.1.rbi
index a9c1d0cd3..f775f75cb 100644
--- a/sorbet/rbi/gems/minitest@5.23.1.rbi
+++ b/sorbet/rbi/gems/minitest@5.25.1.rbi
@@ -12,7 +12,7 @@ module Minitest
# Internal run method. Responsible for telling all Runnable
# sub-classes to run.
#
- # source://minitest//lib/minitest.rb#197
+ # source://minitest//lib/minitest.rb#322
def __run(reporter, options); end
# A simple hook allowing you to run a block of code after everything
@@ -20,7 +20,7 @@ module Minitest
#
# Minitest.after_run { p $debugging_info }
#
- # source://minitest//lib/minitest.rb#97
+ # source://minitest//lib/minitest.rb#96
def after_run(&block); end
# source://minitest//lib/minitest.rb#19
@@ -43,10 +43,10 @@ module Minitest
# source://minitest//lib/minitest.rb#18
def cattr_accessor(name); end
- # source://minitest//lib/minitest.rb#1178
+ # source://minitest//lib/minitest.rb#1215
def clock_time; end
- # source://minitest//lib/minitest.rb#177
+ # source://minitest//lib/minitest.rb#302
def empty_run!(options); end
# source://minitest//lib/minitest.rb#19
@@ -55,7 +55,7 @@ module Minitest
# source://minitest//lib/minitest.rb#19
def extensions=(_arg0); end
- # source://minitest//lib/minitest.rb#306
+ # source://minitest//lib/minitest.rb#335
def filter_backtrace(bt); end
# source://minitest//lib/minitest.rb#19
@@ -64,7 +64,7 @@ module Minitest
# source://minitest//lib/minitest.rb#19
def info_signal=(_arg0); end
- # source://minitest//lib/minitest.rb#101
+ # source://minitest//lib/minitest.rb#124
def init_plugins(options); end
# source://minitest//lib/minitest.rb#108
@@ -76,9 +76,14 @@ module Minitest
# source://minitest//lib/minitest.rb#19
def parallel_executor=(_arg0); end
- # source://minitest//lib/minitest.rb#210
+ # source://minitest//lib/minitest.rb#142
def process_args(args = T.unsafe(nil)); end
+ # Register a plugin to be used. Does NOT require / load it.
+ #
+ # source://minitest//lib/minitest.rb#103
+ def register_plugin(name_or_mod); end
+
# source://minitest//lib/minitest.rb#19
def reporter; end
@@ -93,6 +98,9 @@ module Minitest
#
# Minitest.autorun
# Minitest.run(args)
+ # Minitest.load_plugins
+ # Minitest.process_args
+ # Minitest.init_plugins
# Minitest.__run(reporter, options)
# Runnable.runnables.each
# runnable_klass.run(reporter, options)
@@ -101,10 +109,10 @@ module Minitest
# Minitest.run_one_method(klass, runnable_method)
# klass.new(runnable_method).run
#
- # source://minitest//lib/minitest.rb#143
+ # source://minitest//lib/minitest.rb#268
def run(args = T.unsafe(nil)); end
- # source://minitest//lib/minitest.rb#1169
+ # source://minitest//lib/minitest.rb#1206
def run_one_method(klass, method_name); end
# source://minitest//lib/minitest.rb#19
@@ -118,24 +126,24 @@ end
# Defines the API for Reporters. Subclass this and override whatever
# you want. Go nuts.
#
-# source://minitest//lib/minitest.rb#652
+# source://minitest//lib/minitest.rb#686
class Minitest::AbstractReporter
# @return [AbstractReporter] a new instance of AbstractReporter
#
- # source://minitest//lib/minitest.rb#654
+ # source://minitest//lib/minitest.rb#688
def initialize; end
# Did this run pass?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#689
+ # source://minitest//lib/minitest.rb#723
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#668
+ # source://minitest//lib/minitest.rb#702
def prerecord(klass, name); end
# Output and record the result of the test. Call
@@ -143,43 +151,43 @@ class Minitest::AbstractReporter
# result character string. Stores the result of the run if the run
# did not pass.
#
- # source://minitest//lib/minitest.rb#677
+ # source://minitest//lib/minitest.rb#711
def record(result); end
# Outputs the summary of the run.
#
- # source://minitest//lib/minitest.rb#683
+ # source://minitest//lib/minitest.rb#717
def report; end
# Starts reporting on the run.
#
- # source://minitest//lib/minitest.rb#661
+ # source://minitest//lib/minitest.rb#695
def start; end
- # source://minitest//lib/minitest.rb#693
+ # source://minitest//lib/minitest.rb#727
def synchronize(&block); end
end
# Represents run failures.
#
-# source://minitest//lib/minitest.rb#985
+# source://minitest//lib/minitest.rb#1019
class Minitest::Assertion < ::Exception
- # source://minitest//lib/minitest.rb#988
+ # source://minitest//lib/minitest.rb#1022
def error; end
# Where was this run before an assertion was raised?
#
- # source://minitest//lib/minitest.rb#995
+ # source://minitest//lib/minitest.rb#1029
def location; end
- # source://minitest//lib/minitest.rb#1003
+ # source://minitest//lib/minitest.rb#1037
def result_code; end
- # source://minitest//lib/minitest.rb#1007
+ # source://minitest//lib/minitest.rb#1041
def result_label; end
end
-# source://minitest//lib/minitest.rb#986
+# source://minitest//lib/minitest.rb#1020
Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp)
# Minitest Assertions. All assertion methods accept a +msg+ which is
@@ -191,22 +199,22 @@ Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp)
# provided by the thing including Assertions. See Minitest::Runnable
# for an example.
#
-# source://minitest//lib/minitest/assertions.rb#18
+# source://minitest//lib/minitest/assertions.rb#16
module Minitest::Assertions
- # source://minitest//lib/minitest/assertions.rb#188
+ # source://minitest//lib/minitest/assertions.rb#181
def _synchronize; end
- # source://minitest//lib/minitest/assertions.rb#201
+ # source://minitest//lib/minitest/assertions.rb#194
def _where; end
# Fails unless +test+ is truthy.
#
- # source://minitest//lib/minitest/assertions.rb#178
+ # source://minitest//lib/minitest/assertions.rb#171
def assert(test, msg = T.unsafe(nil)); end
# Fails unless +obj+ is empty.
#
- # source://minitest//lib/minitest/assertions.rb#195
+ # source://minitest//lib/minitest/assertions.rb#188
def assert_empty(obj, msg = T.unsafe(nil)); end
# Fails unless exp == act printing the difference between
@@ -221,7 +229,7 @@ module Minitest::Assertions
#
# See also: Minitest::Assertions.diff
#
- # source://minitest//lib/minitest/assertions.rb#221
+ # source://minitest//lib/minitest/assertions.rb#214
def assert_equal(exp, act, msg = T.unsafe(nil)); end
# For comparing Floats. Fails unless +exp+ and +act+ are within +delta+
@@ -229,45 +237,45 @@ module Minitest::Assertions
#
# assert_in_delta Math::PI, (22.0 / 7.0), 0.01
#
- # source://minitest//lib/minitest/assertions.rb#242
+ # source://minitest//lib/minitest/assertions.rb#235
def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
# For comparing Floats. Fails unless +exp+ and +act+ have a relative
# error less than +epsilon+.
#
- # source://minitest//lib/minitest/assertions.rb#254
+ # source://minitest//lib/minitest/assertions.rb#247
def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails unless +collection+ includes +obj+.
#
- # source://minitest//lib/minitest/assertions.rb#261
+ # source://minitest//lib/minitest/assertions.rb#254
def assert_includes(collection, obj, msg = T.unsafe(nil)); end
# Fails unless +obj+ is an instance of +cls+.
#
- # source://minitest//lib/minitest/assertions.rb#272
+ # source://minitest//lib/minitest/assertions.rb#265
def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end
# Fails unless +obj+ is a kind of +cls+.
#
- # source://minitest//lib/minitest/assertions.rb#283
+ # source://minitest//lib/minitest/assertions.rb#276
def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end
# Fails unless +matcher+ =~ +obj+.
#
- # source://minitest//lib/minitest/assertions.rb#293
+ # source://minitest//lib/minitest/assertions.rb#287
def assert_match(matcher, obj, msg = T.unsafe(nil)); end
# Fails unless +obj+ is nil
#
- # source://minitest//lib/minitest/assertions.rb#305
+ # source://minitest//lib/minitest/assertions.rb#299
def assert_nil(obj, msg = T.unsafe(nil)); end
# For testing with binary operators. Eg:
#
# assert_operator 5, :<=, 4
#
- # source://minitest//lib/minitest/assertions.rb#315
+ # source://minitest//lib/minitest/assertions.rb#309
def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails if stdout or stderr do not output the expected results.
@@ -281,12 +289,12 @@ module Minitest::Assertions
#
# See also: #assert_silent
#
- # source://minitest//lib/minitest/assertions.rb#333
+ # source://minitest//lib/minitest/assertions.rb#327
def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end
# Fails unless +path+ exists.
#
- # source://minitest//lib/minitest/assertions.rb#357
+ # source://minitest//lib/minitest/assertions.rb#351
def assert_path_exists(path, msg = T.unsafe(nil)); end
# For testing with pattern matching (only supported with Ruby 3.0 and later)
@@ -304,7 +312,7 @@ module Minitest::Assertions
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest/assertions.rb#376
+ # source://minitest//lib/minitest/assertions.rb#370
def assert_pattern; end
# For testing with predicates. Eg:
@@ -315,7 +323,7 @@ module Minitest::Assertions
#
# str.must_be :empty?
#
- # source://minitest//lib/minitest/assertions.rb#397
+ # source://minitest//lib/minitest/assertions.rb#391
def assert_predicate(o1, op, msg = T.unsafe(nil)); end
# Fails unless the block raises one of +exp+. Returns the
@@ -339,37 +347,37 @@ module Minitest::Assertions
#
# assert_equal 'This is really bad', error.message
#
- # source://minitest//lib/minitest/assertions.rb#424
+ # source://minitest//lib/minitest/assertions.rb#418
def assert_raises(*exp); end
# Fails unless +obj+ responds to +meth+.
# include_all defaults to false to match Object#respond_to?
#
- # source://minitest//lib/minitest/assertions.rb#456
+ # source://minitest//lib/minitest/assertions.rb#450
def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
# Fails unless +exp+ and +act+ are #equal?
#
- # source://minitest//lib/minitest/assertions.rb#466
+ # source://minitest//lib/minitest/assertions.rb#460
def assert_same(exp, act, msg = T.unsafe(nil)); end
# +send_ary+ is a receiver, message and arguments.
#
# Fails unless the call returns a true value
#
- # source://minitest//lib/minitest/assertions.rb#479
+ # source://minitest//lib/minitest/assertions.rb#473
def assert_send(send_ary, m = T.unsafe(nil)); end
# Fails if the block outputs anything to stderr or stdout.
#
# See also: #assert_output
#
- # source://minitest//lib/minitest/assertions.rb#493
+ # source://minitest//lib/minitest/assertions.rb#488
def assert_silent; end
# Fails unless the block throws +sym+
#
- # source://minitest//lib/minitest/assertions.rb#502
+ # source://minitest//lib/minitest/assertions.rb#497
def assert_throws(sym, msg = T.unsafe(nil)); end
# Captures $stdout and $stderr into strings:
@@ -386,7 +394,7 @@ module Minitest::Assertions
# capture IO for subprocesses. Use #capture_subprocess_io for
# that.
#
- # source://minitest//lib/minitest/assertions.rb#543
+ # source://minitest//lib/minitest/assertions.rb#538
def capture_io; end
# Captures $stdout and $stderr into strings, using Tempfile to
@@ -403,7 +411,7 @@ module Minitest::Assertions
# NOTE: This method is approximately 10x slower than #capture_io so
# only use it when you need to test the output of a subprocess.
#
- # source://minitest//lib/minitest/assertions.rb#576
+ # source://minitest//lib/minitest/assertions.rb#571
def capture_subprocess_io; end
# Returns a diff between +exp+ and +act+. If there is no known
@@ -413,29 +421,29 @@ module Minitest::Assertions
#
# See +things_to_diff+ for more info.
#
- # source://minitest//lib/minitest/assertions.rb#59
+ # source://minitest//lib/minitest/assertions.rb#57
def diff(exp, act); end
# Returns details for exception +e+
#
- # source://minitest//lib/minitest/assertions.rb#608
+ # source://minitest//lib/minitest/assertions.rb#603
def exception_details(e, msg); end
# Fails after a given date (in the local time zone). This allows
# you to put time-bombs in your tests if you need to keep
# something around until a later date lest you forget about it.
#
- # source://minitest//lib/minitest/assertions.rb#624
+ # source://minitest//lib/minitest/assertions.rb#619
def fail_after(y, m, d, msg); end
# Fails with +msg+.
#
- # source://minitest//lib/minitest/assertions.rb#631
+ # source://minitest//lib/minitest/assertions.rb#626
def flunk(msg = T.unsafe(nil)); end
# Returns a proc that will output +msg+ along with the default message.
#
- # source://minitest//lib/minitest/assertions.rb#639
+ # source://minitest//lib/minitest/assertions.rb#634
def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end
# This returns a human-readable version of +obj+. By default
@@ -444,7 +452,7 @@ module Minitest::Assertions
#
# See Minitest::Test.make_my_diffs_pretty!
#
- # source://minitest//lib/minitest/assertions.rb#129
+ # source://minitest//lib/minitest/assertions.rb#127
def mu_pp(obj); end
# This returns a diff-able more human-readable version of +obj+.
@@ -452,67 +460,67 @@ module Minitest::Assertions
# newlines and makes hex-values (like object_ids) generic. This
# uses mu_pp to do the first pass and then cleans it up.
#
- # source://minitest//lib/minitest/assertions.rb#152
+ # source://minitest//lib/minitest/assertions.rb#145
def mu_pp_for_diff(obj); end
# used for counting assertions
#
- # source://minitest//lib/minitest/assertions.rb#650
+ # source://minitest//lib/minitest/assertions.rb#645
def pass(_msg = T.unsafe(nil)); end
# Fails if +test+ is truthy.
#
- # source://minitest//lib/minitest/assertions.rb#657
+ # source://minitest//lib/minitest/assertions.rb#652
def refute(test, msg = T.unsafe(nil)); end
# Fails if +obj+ is empty.
#
- # source://minitest//lib/minitest/assertions.rb#665
+ # source://minitest//lib/minitest/assertions.rb#660
def refute_empty(obj, msg = T.unsafe(nil)); end
# Fails if exp == act.
#
# For floats use refute_in_delta.
#
- # source://minitest//lib/minitest/assertions.rb#676
+ # source://minitest//lib/minitest/assertions.rb#671
def refute_equal(exp, act, msg = T.unsafe(nil)); end
# For comparing Floats. Fails if +exp+ is within +delta+ of +act+.
#
# refute_in_delta Math::PI, (22.0 / 7.0)
#
- # source://minitest//lib/minitest/assertions.rb#688
+ # source://minitest//lib/minitest/assertions.rb#683
def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
# For comparing Floats. Fails if +exp+ and +act+ have a relative error
# less than +epsilon+.
#
- # source://minitest//lib/minitest/assertions.rb#700
+ # source://minitest//lib/minitest/assertions.rb#695
def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails if +collection+ includes +obj+.
#
- # source://minitest//lib/minitest/assertions.rb#707
+ # source://minitest//lib/minitest/assertions.rb#702
def refute_includes(collection, obj, msg = T.unsafe(nil)); end
# Fails if +obj+ is an instance of +cls+.
#
- # source://minitest//lib/minitest/assertions.rb#718
+ # source://minitest//lib/minitest/assertions.rb#713
def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end
# Fails if +obj+ is a kind of +cls+.
#
- # source://minitest//lib/minitest/assertions.rb#728
+ # source://minitest//lib/minitest/assertions.rb#723
def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end
# Fails if +matcher+ =~ +obj+.
#
- # source://minitest//lib/minitest/assertions.rb#736
+ # source://minitest//lib/minitest/assertions.rb#731
def refute_match(matcher, obj, msg = T.unsafe(nil)); end
# Fails if +obj+ is nil.
#
- # source://minitest//lib/minitest/assertions.rb#746
+ # source://minitest//lib/minitest/assertions.rb#741
def refute_nil(obj, msg = T.unsafe(nil)); end
# Fails if +o1+ is not +op+ +o2+. Eg:
@@ -520,12 +528,12 @@ module Minitest::Assertions
# refute_operator 1, :>, 2 #=> pass
# refute_operator 1, :<, 2 #=> fail
#
- # source://minitest//lib/minitest/assertions.rb#781
+ # source://minitest//lib/minitest/assertions.rb#776
def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails if +path+ exists.
#
- # source://minitest//lib/minitest/assertions.rb#790
+ # source://minitest//lib/minitest/assertions.rb#785
def refute_path_exists(path, msg = T.unsafe(nil)); end
# For testing with pattern matching (only supported with Ruby 3.0 and later)
@@ -541,7 +549,7 @@ module Minitest::Assertions
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest/assertions.rb#763
+ # source://minitest//lib/minitest/assertions.rb#758
def refute_pattern; end
# For testing with predicates.
@@ -552,18 +560,18 @@ module Minitest::Assertions
#
# str.wont_be :empty?
#
- # source://minitest//lib/minitest/assertions.rb#804
+ # source://minitest//lib/minitest/assertions.rb#799
def refute_predicate(o1, op, msg = T.unsafe(nil)); end
# Fails if +obj+ responds to the message +meth+.
# include_all defaults to false to match Object#respond_to?
#
- # source://minitest//lib/minitest/assertions.rb#813
+ # source://minitest//lib/minitest/assertions.rb#808
def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
# Fails if +exp+ is the same (by object identity) as +act+.
#
- # source://minitest//lib/minitest/assertions.rb#822
+ # source://minitest//lib/minitest/assertions.rb#817
def refute_same(exp, act, msg = T.unsafe(nil)); end
# Skips the current run. If run in verbose-mode, the skipped run
@@ -572,7 +580,7 @@ module Minitest::Assertions
#
# @raise [Minitest::Skip]
#
- # source://minitest//lib/minitest/assertions.rb#835
+ # source://minitest//lib/minitest/assertions.rb#830
def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end
# Skips the current run until a given date (in the local time
@@ -580,14 +588,14 @@ module Minitest::Assertions
# date, but still holds you accountable and prevents you from
# forgetting it.
#
- # source://minitest//lib/minitest/assertions.rb#847
+ # source://minitest//lib/minitest/assertions.rb#842
def skip_until(y, m, d, msg); end
# Was this testcase skipped? Meant for #teardown.
#
# @return [Boolean]
#
- # source://minitest//lib/minitest/assertions.rb#856
+ # source://minitest//lib/minitest/assertions.rb#851
def skipped?; end
# Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff.
@@ -599,104 +607,102 @@ module Minitest::Assertions
# 3. or: Strings are equal to each other (but maybe different encodings?).
# 4. and: we found a diff executable.
#
- # source://minitest//lib/minitest/assertions.rb#104
+ # source://minitest//lib/minitest/assertions.rb#102
def things_to_diff(exp, act); end
class << self
# Returns the diff command to use in #diff. Tries to intelligently
# figure out what diff to use.
#
- # source://minitest//lib/minitest/assertions.rb#29
+ # source://minitest//lib/minitest/assertions.rb#27
def diff; end
# Set the diff command to use in #diff.
#
- # source://minitest//lib/minitest/assertions.rb#47
+ # source://minitest//lib/minitest/assertions.rb#45
def diff=(o); end
end
end
-# source://minitest//lib/minitest/assertions.rb#206
+# source://minitest//lib/minitest/assertions.rb#199
Minitest::Assertions::E = T.let(T.unsafe(nil), String)
-# source://minitest//lib/minitest/assertions.rb#19
+# source://minitest//lib/minitest/assertions.rb#17
Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object)
# The standard backtrace filter for minitest.
#
# See Minitest.backtrace_filter=.
#
-# source://minitest//lib/minitest.rb#1140
+# source://minitest//lib/minitest.rb#1174
class Minitest::BacktraceFilter
# @return [BacktraceFilter] a new instance of BacktraceFilter
#
- # source://minitest//lib/minitest.rb#1146
+ # source://minitest//lib/minitest.rb#1183
def initialize(regexp = T.unsafe(nil)); end
# Filter +bt+ to something useful. Returns the whole thing if
# $DEBUG (ruby) or $MT_DEBUG (env).
#
- # source://minitest//lib/minitest.rb#1154
+ # source://minitest//lib/minitest.rb#1191
def filter(bt); end
- # Returns the value of attribute regexp.
+ # The regular expression to use to filter backtraces. Defaults to +MT_RE+.
#
- # source://minitest//lib/minitest.rb#1144
+ # source://minitest//lib/minitest.rb#1181
def regexp; end
- # Sets the attribute regexp
- #
- # @param value the value to set the attribute regexp to.
+ # The regular expression to use to filter backtraces. Defaults to +MT_RE+.
#
- # source://minitest//lib/minitest.rb#1144
+ # source://minitest//lib/minitest.rb#1181
def regexp=(_arg0); end
end
-# source://minitest//lib/minitest.rb#1142
+# source://minitest//lib/minitest.rb#1176
Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp)
# Dispatch to multiple reporters as one.
#
-# source://minitest//lib/minitest.rb#934
+# source://minitest//lib/minitest.rb#968
class Minitest::CompositeReporter < ::Minitest::AbstractReporter
# @return [CompositeReporter] a new instance of CompositeReporter
#
- # source://minitest//lib/minitest.rb#940
+ # source://minitest//lib/minitest.rb#974
def initialize(*reporters); end
# Add another reporter to the mix.
#
- # source://minitest//lib/minitest.rb#952
+ # source://minitest//lib/minitest.rb#986
def <<(reporter); end
- # source://minitest//lib/minitest.rb#945
+ # source://minitest//lib/minitest.rb#979
def io; end
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#956
+ # source://minitest//lib/minitest.rb#990
def passed?; end
- # source://minitest//lib/minitest.rb#964
+ # source://minitest//lib/minitest.rb#998
def prerecord(klass, name); end
- # source://minitest//lib/minitest.rb#971
+ # source://minitest//lib/minitest.rb#1005
def record(result); end
- # source://minitest//lib/minitest.rb#977
+ # source://minitest//lib/minitest.rb#1011
def report; end
# The list of reporters to dispatch to.
#
- # source://minitest//lib/minitest.rb#938
+ # source://minitest//lib/minitest.rb#972
def reporters; end
# The list of reporters to dispatch to.
#
- # source://minitest//lib/minitest.rb#938
+ # source://minitest//lib/minitest.rb#972
def reporters=(_arg0); end
- # source://minitest//lib/minitest.rb#960
+ # source://minitest//lib/minitest.rb#994
def start; end
end
@@ -725,48 +731,48 @@ end
# # ... lots of test methods ...
# end
#
-# source://minitest//lib/minitest.rb#1084
+# source://minitest//lib/minitest.rb#1118
module Minitest::Guard
# Is this running on jruby?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1089
+ # source://minitest//lib/minitest.rb#1123
def jruby?(platform = T.unsafe(nil)); end
# Is this running on maglev?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1096
+ # source://minitest//lib/minitest.rb#1130
def maglev?(platform = T.unsafe(nil)); end
# Is this running on mri?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1106
+ # source://minitest//lib/minitest.rb#1140
def mri?(platform = T.unsafe(nil)); end
# Is this running on macOS?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1113
+ # source://minitest//lib/minitest.rb#1147
def osx?(platform = T.unsafe(nil)); end
# Is this running on rubinius?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1120
+ # source://minitest//lib/minitest.rb#1154
def rubinius?(platform = T.unsafe(nil)); end
# Is this running on windows?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1130
+ # source://minitest//lib/minitest.rb#1164
def windows?(platform = T.unsafe(nil)); end
end
@@ -829,36 +835,36 @@ end
# plugin, pull this out of the composite and replace it with your
# own.
#
-# source://minitest//lib/minitest.rb#724
+# source://minitest//lib/minitest.rb#758
class Minitest::ProgressReporter < ::Minitest::Reporter
- # source://minitest//lib/minitest.rb#725
+ # source://minitest//lib/minitest.rb#759
def prerecord(klass, name); end
- # source://minitest//lib/minitest.rb#732
+ # source://minitest//lib/minitest.rb#766
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#546
+# source://minitest//lib/minitest.rb#580
module Minitest::Reportable
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest.rb#568
+ # source://minitest//lib/minitest.rb#602
def class_name; end
# Did this run error?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#589
+ # source://minitest//lib/minitest.rb#623
def error?; end
# The location identifier of this test. Depends on a method
# existing called class_name.
#
- # source://minitest//lib/minitest.rb#563
+ # source://minitest//lib/minitest.rb#597
def location; end
# Did this run pass?
@@ -868,50 +874,50 @@ module Minitest::Reportable
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#553
+ # source://minitest//lib/minitest.rb#587
def passed?; end
# Returns ".", "F", or "E" based on the result of the run.
#
- # source://minitest//lib/minitest.rb#575
+ # source://minitest//lib/minitest.rb#609
def result_code; end
# Was this run skipped?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#582
+ # source://minitest//lib/minitest.rb#616
def skipped?; end
end
-# source://minitest//lib/minitest.rb#557
+# source://minitest//lib/minitest.rb#591
Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String)
-# source://minitest//lib/minitest.rb#700
+# source://minitest//lib/minitest.rb#734
class Minitest::Reporter < ::Minitest::AbstractReporter
# @return [Reporter] a new instance of Reporter
#
- # source://minitest//lib/minitest.rb#709
+ # source://minitest//lib/minitest.rb#743
def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
# The IO used to report.
#
- # source://minitest//lib/minitest.rb#702
+ # source://minitest//lib/minitest.rb#736
def io; end
# The IO used to report.
#
- # source://minitest//lib/minitest.rb#702
+ # source://minitest//lib/minitest.rb#736
def io=(_arg0); end
# Command-line options for this run.
#
- # source://minitest//lib/minitest.rb#707
+ # source://minitest//lib/minitest.rb#741
def options; end
# Command-line options for this run.
#
- # source://minitest//lib/minitest.rb#707
+ # source://minitest//lib/minitest.rb#741
def options=(_arg0); end
end
@@ -921,80 +927,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#601
+# source://minitest//lib/minitest.rb#635
class Minitest::Result < ::Minitest::Runnable
include ::Minitest::Reportable
- # source://minitest//lib/minitest.rb#635
+ # source://minitest//lib/minitest.rb#669
def class_name; end
# The class name of the test result.
#
- # source://minitest//lib/minitest.rb#610
+ # source://minitest//lib/minitest.rb#644
def klass; end
# The class name of the test result.
#
- # source://minitest//lib/minitest.rb#610
+ # source://minitest//lib/minitest.rb#644
def klass=(_arg0); end
# The location of the test method.
#
- # source://minitest//lib/minitest.rb#615
+ # source://minitest//lib/minitest.rb#649
def source_location; end
# The location of the test method.
#
- # source://minitest//lib/minitest.rb#615
+ # source://minitest//lib/minitest.rb#649
def source_location=(_arg0); end
- # source://minitest//lib/minitest.rb#639
+ # source://minitest//lib/minitest.rb#673
def to_s; end
class << self
# Create a new test result from a Runnable instance.
#
- # source://minitest//lib/minitest.rb#620
+ # source://minitest//lib/minitest.rb#654
def from(runnable); end
end
end
# re-open
#
-# source://minitest//lib/minitest.rb#319
+# source://minitest//lib/minitest.rb#348
class Minitest::Runnable
# @return [Runnable] a new instance of Runnable
#
- # source://minitest//lib/minitest.rb#477
+ # source://minitest//lib/minitest.rb#511
def initialize(name); end
# Number of assertions executed in this run.
#
- # source://minitest//lib/minitest.rb#323
+ # source://minitest//lib/minitest.rb#352
def assertions; end
# Number of assertions executed in this run.
#
- # source://minitest//lib/minitest.rb#323
+ # source://minitest//lib/minitest.rb#352
def assertions=(_arg0); end
- # source://minitest//lib/minitest.rb#473
+ # source://minitest//lib/minitest.rb#507
def failure; end
# An assertion raised during the run, if any.
#
- # source://minitest//lib/minitest.rb#328
+ # source://minitest//lib/minitest.rb#357
def failures; end
# An assertion raised during the run, if any.
#
- # source://minitest//lib/minitest.rb#328
+ # source://minitest//lib/minitest.rb#357
def failures=(_arg0); end
- # source://minitest//lib/minitest.rb#459
+ # source://minitest//lib/minitest.rb#493
def marshal_dump; end
- # source://minitest//lib/minitest.rb#469
+ # source://minitest//lib/minitest.rb#503
def marshal_load(ary); end
# Metadata you attach to the test results that get sent to the reporter.
@@ -1004,29 +1010,29 @@ class Minitest::Runnable
# NOTE: this data *must* be plain (read: marshal-able) data!
# Hashes! Arrays! Strings!
#
- # source://minitest//lib/minitest.rb#492
+ # source://minitest//lib/minitest.rb#526
def metadata; end
# Sets metadata, mainly used for +Result.from+.
#
- # source://minitest//lib/minitest.rb#499
+ # source://minitest//lib/minitest.rb#533
def metadata=(_arg0); end
# Returns true if metadata exists.
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#504
+ # source://minitest//lib/minitest.rb#538
def metadata?; end
# Name of the run.
#
- # source://minitest//lib/minitest.rb#346
+ # source://minitest//lib/minitest.rb#375
def name; end
# Set the name of the run.
#
- # source://minitest//lib/minitest.rb#353
+ # source://minitest//lib/minitest.rb#382
def name=(o); end
# Did this run pass?
@@ -1037,7 +1043,7 @@ class Minitest::Runnable
# @raise [NotImplementedError]
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#521
+ # source://minitest//lib/minitest.rb#555
def passed?; end
# Returns a single character string to print based on the result
@@ -1046,14 +1052,14 @@ class Minitest::Runnable
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest.rb#530
+ # source://minitest//lib/minitest.rb#564
def result_code; end
# Runs a single method. Needs to return self.
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest.rb#511
+ # source://minitest//lib/minitest.rb#545
def run; end
# Was this run skipped? See #passed? for more information.
@@ -1061,42 +1067,42 @@ class Minitest::Runnable
# @raise [NotImplementedError]
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#537
+ # source://minitest//lib/minitest.rb#571
def skipped?; end
# The time it took to run.
#
- # source://minitest//lib/minitest.rb#333
+ # source://minitest//lib/minitest.rb#362
def time; end
# The time it took to run.
#
- # source://minitest//lib/minitest.rb#333
+ # source://minitest//lib/minitest.rb#362
def time=(_arg0); end
- # source://minitest//lib/minitest.rb#335
+ # source://minitest//lib/minitest.rb#364
def time_it; end
class << self
- # source://minitest//lib/minitest.rb#1188
+ # source://minitest//lib/minitest.rb#1225
def inherited(klass); end
# Returns all instance methods matching the pattern +re+.
#
- # source://minitest//lib/minitest.rb#360
+ # source://minitest//lib/minitest.rb#389
def methods_matching(re); end
- # source://minitest//lib/minitest.rb#429
+ # source://minitest//lib/minitest.rb#463
def on_signal(name, action); end
- # source://minitest//lib/minitest.rb#364
+ # source://minitest//lib/minitest.rb#393
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#375
+ # source://minitest//lib/minitest.rb#404
def run(reporter, options = T.unsafe(nil)); end
# Runs a single method and has the reporter record the result.
@@ -1104,7 +1110,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#401
+ # source://minitest//lib/minitest.rb#444
def run_one_method(klass, method_name, reporter); end
# Each subclass of Runnable is responsible for overriding this
@@ -1112,33 +1118,33 @@ class Minitest::Runnable
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest.rb#446
+ # source://minitest//lib/minitest.rb#480
def runnable_methods; end
# Returns all subclasses of Runnable.
#
- # source://minitest//lib/minitest.rb#453
+ # source://minitest//lib/minitest.rb#487
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#410
+ # source://minitest//lib/minitest.rb#453
def test_order; end
- # source://minitest//lib/minitest.rb#414
+ # source://minitest//lib/minitest.rb#457
def with_info_handler(reporter, &block); end
end
end
-# source://minitest//lib/minitest.rb#427
+# source://minitest//lib/minitest.rb#461
Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash)
# Assertion raised when skipping a run.
#
-# source://minitest//lib/minitest.rb#1015
+# source://minitest//lib/minitest.rb#1049
class Minitest::Skip < ::Minitest::Assertion
- # source://minitest//lib/minitest.rb#1016
+ # source://minitest//lib/minitest.rb#1050
def result_label; end
end
@@ -1162,123 +1168,123 @@ end
# end
# end
#
-# source://minitest//lib/minitest.rb#760
+# source://minitest//lib/minitest.rb#794
class Minitest::StatisticsReporter < ::Minitest::Reporter
# @return [StatisticsReporter] a new instance of StatisticsReporter
#
- # source://minitest//lib/minitest.rb#809
+ # source://minitest//lib/minitest.rb#843
def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
# Total number of assertions.
#
- # source://minitest//lib/minitest.rb#764
+ # source://minitest//lib/minitest.rb#798
def assertions; end
# Total number of assertions.
#
- # source://minitest//lib/minitest.rb#764
+ # source://minitest//lib/minitest.rb#798
def assertions=(_arg0); end
# Total number of test cases.
#
- # source://minitest//lib/minitest.rb#769
+ # source://minitest//lib/minitest.rb#803
def count; end
# Total number of test cases.
#
- # source://minitest//lib/minitest.rb#769
+ # source://minitest//lib/minitest.rb#803
def count=(_arg0); end
# Total number of tests that erred.
#
- # source://minitest//lib/minitest.rb#797
+ # source://minitest//lib/minitest.rb#831
def errors; end
# Total number of tests that erred.
#
- # source://minitest//lib/minitest.rb#797
+ # source://minitest//lib/minitest.rb#831
def errors=(_arg0); end
# Total number of tests that failed.
#
- # source://minitest//lib/minitest.rb#792
+ # source://minitest//lib/minitest.rb#826
def failures; end
# Total number of tests that failed.
#
- # source://minitest//lib/minitest.rb#792
+ # source://minitest//lib/minitest.rb#826
def failures=(_arg0); end
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#823
+ # source://minitest//lib/minitest.rb#857
def passed?; end
- # source://minitest//lib/minitest.rb#831
+ # source://minitest//lib/minitest.rb#865
def record(result); end
# Report on the tracked statistics.
#
- # source://minitest//lib/minitest.rb#841
+ # source://minitest//lib/minitest.rb#875
def report; end
# An +Array+ of test cases that failed or were skipped.
#
- # source://minitest//lib/minitest.rb#774
+ # source://minitest//lib/minitest.rb#808
def results; end
# An +Array+ of test cases that failed or were skipped.
#
- # source://minitest//lib/minitest.rb#774
+ # source://minitest//lib/minitest.rb#808
def results=(_arg0); end
# Total number of tests that where skipped.
#
- # source://minitest//lib/minitest.rb#807
+ # source://minitest//lib/minitest.rb#841
def skips; end
# Total number of tests that where skipped.
#
- # source://minitest//lib/minitest.rb#807
+ # source://minitest//lib/minitest.rb#841
def skips=(_arg0); end
- # source://minitest//lib/minitest.rb#827
+ # source://minitest//lib/minitest.rb#861
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#781
+ # source://minitest//lib/minitest.rb#815
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#781
+ # source://minitest//lib/minitest.rb#815
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#787
+ # source://minitest//lib/minitest.rb#821
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#787
+ # source://minitest//lib/minitest.rb#821
def total_time=(_arg0); end
# Total number of tests that warned.
#
- # source://minitest//lib/minitest.rb#802
+ # source://minitest//lib/minitest.rb#836
def warnings; end
# Total number of tests that warned.
#
- # source://minitest//lib/minitest.rb#802
+ # source://minitest//lib/minitest.rb#836
def warnings=(_arg0); end
end
@@ -1290,48 +1296,36 @@ end
# plugin, pull this out of the composite and replace it with your
# own.
#
-# source://minitest//lib/minitest.rb#862
+# source://minitest//lib/minitest.rb#896
class Minitest::SummaryReporter < ::Minitest::StatisticsReporter
- # source://minitest//lib/minitest.rb#897
+ # source://minitest//lib/minitest.rb#929
def aggregated_results(io); end
- # Returns the value of attribute old_sync.
- #
- # source://minitest//lib/minitest.rb#865
+ # source://minitest//lib/minitest.rb#898
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#865
+ # source://minitest//lib/minitest.rb#898
def old_sync=(_arg0); end
- # source://minitest//lib/minitest.rb#880
+ # source://minitest//lib/minitest.rb#912
def report; end
- # :startdoc:
- #
- # source://minitest//lib/minitest.rb#868
+ # source://minitest//lib/minitest.rb#900
def start; end
- # source://minitest//lib/minitest.rb#892
+ # source://minitest//lib/minitest.rb#924
def statistics; end
- # source://minitest//lib/minitest.rb#917
+ # source://minitest//lib/minitest.rb#949
def summary; end
- # :stopdoc:
- #
- # source://minitest//lib/minitest.rb#864
+ # source://minitest//lib/minitest.rb#897
def sync; end
- # :stopdoc:
- #
- # source://minitest//lib/minitest.rb#864
+ # source://minitest//lib/minitest.rb#897
def sync=(_arg0); end
- # source://minitest//lib/minitest.rb#913
+ # source://minitest//lib/minitest.rb#945
def to_s; end
end
@@ -1353,16 +1347,16 @@ class Minitest::Test < ::Minitest::Runnable
# LifecycleHooks
#
- # source://minitest//lib/minitest/test.rb#191
+ # source://minitest//lib/minitest/test.rb#189
def capture_exceptions; end
# source://minitest//lib/minitest/test.rb#15
def class_name; end
- # source://minitest//lib/minitest/test.rb#208
+ # source://minitest//lib/minitest/test.rb#206
def neuter_exception(e); end
- # source://minitest//lib/minitest/test.rb#219
+ # source://minitest//lib/minitest/test.rb#217
def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end
# Runs a single test with setup/teardown hooks.
@@ -1370,12 +1364,9 @@ class Minitest::Test < ::Minitest::Runnable
# source://minitest//lib/minitest/test.rb#87
def run; end
- # source://minitest//lib/minitest/test.rb#201
+ # source://minitest//lib/minitest/test.rb#199
def sanitize_exception(e); end
- # source://minitest//lib/minitest/test.rb#233
- def with_info_handler(&block); end
-
class << self
# Call this at the top of your tests when you absolutely
# positively need to have ordered tests. In doing so, you're
@@ -1425,7 +1416,7 @@ end
# meant for library writers, NOT for regular test authors. See
# #before_setup for an example.
#
-# source://minitest//lib/minitest/test.rb#114
+# source://minitest//lib/minitest/test.rb#112
module Minitest::Test::LifecycleHooks
# Runs before every test, after setup. This hook is meant for
# libraries to extend minitest. It is not meant to be used by
@@ -1433,7 +1424,7 @@ module Minitest::Test::LifecycleHooks
#
# See #before_setup for an example.
#
- # source://minitest//lib/minitest/test.rb#164
+ # source://minitest//lib/minitest/test.rb#162
def after_setup; end
# Runs after every test, after teardown. This hook is meant for
@@ -1442,7 +1433,7 @@ module Minitest::Test::LifecycleHooks
#
# See #before_setup for an example.
#
- # source://minitest//lib/minitest/test.rb#188
+ # source://minitest//lib/minitest/test.rb#186
def after_teardown; end
# Runs before every test, before setup. This hook is meant for
@@ -1477,7 +1468,7 @@ module Minitest::Test::LifecycleHooks
# include MyMinitestPlugin
# end
#
- # source://minitest//lib/minitest/test.rb#149
+ # source://minitest//lib/minitest/test.rb#147
def before_setup; end
# Runs after every test, before teardown. This hook is meant for
@@ -1486,19 +1477,19 @@ module Minitest::Test::LifecycleHooks
#
# See #before_setup for an example.
#
- # source://minitest//lib/minitest/test.rb#173
+ # source://minitest//lib/minitest/test.rb#171
def before_teardown; end
# Runs before every test. Use this to set up before each test
# run.
#
- # source://minitest//lib/minitest/test.rb#155
+ # source://minitest//lib/minitest/test.rb#153
def setup; end
# Runs after every test. Use this to clean up after each test
# run.
#
- # source://minitest//lib/minitest/test.rb#179
+ # source://minitest//lib/minitest/test.rb#177
def teardown; end
end
@@ -1513,43 +1504,43 @@ 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#1024
+# source://minitest//lib/minitest.rb#1058
class Minitest::UnexpectedError < ::Minitest::Assertion
include ::Minitest::Compress
# @return [UnexpectedError] a new instance of UnexpectedError
#
- # source://minitest//lib/minitest.rb#1030
+ # source://minitest//lib/minitest.rb#1064
def initialize(error); end
- # source://minitest//lib/minitest.rb#1043
+ # source://minitest//lib/minitest.rb#1077
def backtrace; end
# TODO: figure out how to use `cause` instead
#
- # source://minitest//lib/minitest.rb#1028
+ # source://minitest//lib/minitest.rb#1062
def error; end
# TODO: figure out how to use `cause` instead
#
- # source://minitest//lib/minitest.rb#1028
+ # source://minitest//lib/minitest.rb#1062
def error=(_arg0); end
- # source://minitest//lib/minitest.rb#1049
+ # source://minitest//lib/minitest.rb#1083
def message; end
- # source://minitest//lib/minitest.rb#1055
+ # source://minitest//lib/minitest.rb#1089
def result_label; end
end
-# source://minitest//lib/minitest.rb#1047
+# source://minitest//lib/minitest.rb#1081
Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp)
# Assertion raised on warning when running in -Werror mode.
#
-# source://minitest//lib/minitest.rb#1063
+# source://minitest//lib/minitest.rb#1097
class Minitest::UnexpectedWarning < ::Minitest::Assertion
- # source://minitest//lib/minitest.rb#1064
+ # source://minitest//lib/minitest.rb#1098
def result_label; end
end
diff --git a/sorbet/rbi/gems/parallel@1.24.0.rbi b/sorbet/rbi/gems/parallel@1.26.3.rbi
similarity index 84%
rename from sorbet/rbi/gems/parallel@1.24.0.rbi
rename to sorbet/rbi/gems/parallel@1.26.3.rbi
index 5dd73750f..65d452331 100644
--- a/sorbet/rbi/gems/parallel@1.24.0.rbi
+++ b/sorbet/rbi/gems/parallel@1.26.3.rbi
@@ -24,10 +24,10 @@ module Parallel
def each_with_index(array, options = T.unsafe(nil), &block); end
# source://parallel//lib/parallel.rb#307
- def filter_map(*args, &block); end
+ def filter_map(*_arg0, **_arg1, &_arg2); end
# source://parallel//lib/parallel.rb#303
- def flat_map(*args, &block); end
+ def flat_map(*_arg0, **_arg1, &_arg2); end
# source://parallel//lib/parallel.rb#228
def in_processes(options = T.unsafe(nil), &block); end
@@ -46,70 +46,80 @@ module Parallel
# source://parallel//lib/parallel.rb#312
def physical_processor_count; end
- # Number of processors seen by the OS, used for process scheduling
+ # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup,
+ # used for process scheduling
#
- # source://parallel//lib/parallel.rb#345
+ # source://parallel//lib/parallel.rb#342
def processor_count; end
- # source://parallel//lib/parallel.rb#350
+ # source://parallel//lib/parallel.rb#346
def worker_number; end
# TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed
#
- # source://parallel//lib/parallel.rb#355
+ # source://parallel//lib/parallel.rb#351
def worker_number=(worker_num); end
private
- # source://parallel//lib/parallel.rb#361
+ # source://parallel//lib/parallel.rb#384
def add_progress_bar!(job_factory, options); end
- # source://parallel//lib/parallel.rb#624
+ # source://parallel//lib/parallel.rb#699
+ def available_processor_count; end
+
+ # source://parallel//lib/parallel.rb#647
def call_with_index(item, index, options, &block); end
- # source://parallel//lib/parallel.rb#556
+ # source://parallel//lib/parallel.rb#579
def create_workers(job_factory, options, &block); end
# options is either a Integer or a Hash with :count
#
- # source://parallel//lib/parallel.rb#614
+ # source://parallel//lib/parallel.rb#637
def extract_count_from_options(options); end
- # source://parallel//lib/parallel.rb#642
+ # source://parallel//lib/parallel.rb#665
def instrument_finish(item, index, result, options); end
# yield results in the order of the input items
# needs to use `options` to store state between executions
# needs to use `done` index since a nil result would also be valid
#
- # source://parallel//lib/parallel.rb#651
+ # source://parallel//lib/parallel.rb#674
def instrument_finish_in_order(item, index, result, options); end
- # source://parallel//lib/parallel.rb#671
+ # source://parallel//lib/parallel.rb#694
def instrument_start(item, index, options); end
- # source://parallel//lib/parallel.rb#590
+ # source://parallel//lib/parallel.rb#357
+ def physical_processor_count_windows; end
+
+ # source://parallel//lib/parallel.rb#613
def process_incoming_jobs(read, write, job_factory, options, &block); end
- # source://parallel//lib/parallel.rb#544
+ # source://parallel//lib/parallel.rb#567
def replace_worker(job_factory, workers, index, options, blk); end
- # source://parallel//lib/parallel.rb#635
+ # source://parallel//lib/parallel.rb#378
+ def run(command); end
+
+ # source://parallel//lib/parallel.rb#658
def with_instrumentation(item, index, options); end
- # source://parallel//lib/parallel.rb#386
+ # source://parallel//lib/parallel.rb#409
def work_direct(job_factory, options, &block); end
- # source://parallel//lib/parallel.rb#496
+ # source://parallel//lib/parallel.rb#519
def work_in_processes(job_factory, options, &blk); end
- # source://parallel//lib/parallel.rb#430
+ # source://parallel//lib/parallel.rb#453
def work_in_ractors(job_factory, options); end
- # source://parallel//lib/parallel.rb#405
+ # source://parallel//lib/parallel.rb#428
def work_in_threads(job_factory, options, &block); end
- # source://parallel//lib/parallel.rb#564
+ # source://parallel//lib/parallel.rb#587
def worker(job_factory, options, &block); end
end
end
diff --git a/sorbet/rbi/gems/parser@3.3.2.0.rbi b/sorbet/rbi/gems/parser@3.3.4.2.rbi
similarity index 100%
rename from sorbet/rbi/gems/parser@3.3.2.0.rbi
rename to sorbet/rbi/gems/parser@3.3.4.2.rbi
diff --git a/sorbet/rbi/gems/racc@1.8.0.rbi b/sorbet/rbi/gems/racc@1.8.1.rbi
similarity index 100%
rename from sorbet/rbi/gems/racc@1.8.0.rbi
rename to sorbet/rbi/gems/racc@1.8.1.rbi
diff --git a/sorbet/rbi/gems/rbi@0.1.13.rbi b/sorbet/rbi/gems/rbi@0.1.13.rbi
index 192c96ce7..66da4cad9 100644
--- a/sorbet/rbi/gems/rbi@0.1.13.rbi
+++ b/sorbet/rbi/gems/rbi@0.1.13.rbi
@@ -1944,7 +1944,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct
def to_s; end
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -2161,7 +2161,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
def to_s; end
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
diff --git a/sorbet/rbi/gems/rbs@3.5.1.rbi b/sorbet/rbi/gems/rbs@3.5.3.rbi
similarity index 99%
rename from sorbet/rbi/gems/rbs@3.5.1.rbi
rename to sorbet/rbi/gems/rbs@3.5.3.rbi
index 63368ed11..fd8e2fb3a 100644
--- a/sorbet/rbi/gems/rbs@3.5.1.rbi
+++ b/sorbet/rbi/gems/rbs@3.5.3.rbi
@@ -6343,8 +6343,10 @@ class RBS::Types::UntypedFunction
# source://rbs//lib/rbs/types.rb#1254
def update(return_type: T.unsafe(nil)); end
+ # @return [Boolean]
+ #
# source://rbs//lib/rbs/types.rb#1270
- def with_nonreturn_void; end
+ def with_nonreturn_void?; end
# source://rbs//lib/rbs/types.rb#1250
def with_return_type(ty); end
diff --git a/sorbet/rbi/gems/rexml@3.3.4.rbi b/sorbet/rbi/gems/rexml@3.3.6.rbi
similarity index 95%
rename from sorbet/rbi/gems/rexml@3.3.4.rbi
rename to sorbet/rbi/gems/rexml@3.3.6.rbi
index 922c3e929..7401297b7 100644
--- a/sorbet/rbi/gems/rexml@3.3.4.rbi
+++ b/sorbet/rbi/gems/rexml@3.3.6.rbi
@@ -226,7 +226,7 @@ end
# A class that defines the set of Attributes of an Element and provides
# operations for accessing elements in that set.
#
-# source://rexml//lib/rexml/element.rb#2128
+# source://rexml//lib/rexml/element.rb#2137
class REXML::Attributes < ::Hash
# :call-seq:
# new(element)
@@ -247,7 +247,7 @@ class REXML::Attributes < ::Hash
#
# @return [Attributes] a new instance of Attributes
#
- # source://rexml//lib/rexml/element.rb#2147
+ # source://rexml//lib/rexml/element.rb#2156
def initialize(element); end
# :call-seq:
@@ -270,7 +270,7 @@ class REXML::Attributes < ::Hash
# attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3'
# attrs.include?('baz') # => true
#
- # source://rexml//lib/rexml/element.rb#2524
+ # source://rexml//lib/rexml/element.rb#2522
def <<(attribute); end
# :call-seq:
@@ -294,7 +294,7 @@ class REXML::Attributes < ::Hash
#
# Related: get_attribute (returns an \Attribute object).
#
- # source://rexml//lib/rexml/element.rb#2172
+ # source://rexml//lib/rexml/element.rb#2181
def [](name); end
# :call-seq:
@@ -320,7 +320,7 @@ class REXML::Attributes < ::Hash
# attrs['baz:att'] = nil
# attrs.include?('baz:att') # => false
#
- # source://rexml//lib/rexml/element.rb#2356
+ # source://rexml//lib/rexml/element.rb#2365
def []=(name, value); end
# :call-seq:
@@ -343,7 +343,7 @@ class REXML::Attributes < ::Hash
# attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3'
# attrs.include?('baz') # => true
#
- # source://rexml//lib/rexml/element.rb#2524
+ # source://rexml//lib/rexml/element.rb#2522
def add(attribute); end
# :call-seq:
@@ -374,7 +374,7 @@ class REXML::Attributes < ::Hash
# attrs.delete(attr) # => # =>
# attrs.delete(attr) # => # =>
#
- # source://rexml//lib/rexml/element.rb#2477
+ # source://rexml//lib/rexml/element.rb#2475
def delete(attribute); end
# :call-seq:
@@ -393,7 +393,7 @@ class REXML::Attributes < ::Hash
# attrs = ele.attributes
# attrs.delete_all('att') # => [att='<']
#
- # source://rexml//lib/rexml/element.rb#2546
+ # source://rexml//lib/rexml/element.rb#2544
def delete_all(name); end
# :call-seq:
@@ -418,7 +418,7 @@ class REXML::Attributes < ::Hash
# ["bar:att", "2"]
# ["att", "<"]
#
- # source://rexml//lib/rexml/element.rb#2274
+ # source://rexml//lib/rexml/element.rb#2283
def each; end
# :call-seq:
@@ -443,7 +443,7 @@ class REXML::Attributes < ::Hash
# [REXML::Attribute, bar:att='2']
# [REXML::Attribute, att='<']
#
- # source://rexml//lib/rexml/element.rb#2241
+ # source://rexml//lib/rexml/element.rb#2250
def each_attribute; end
# :call-seq:
@@ -465,7 +465,7 @@ class REXML::Attributes < ::Hash
# attrs.get_attribute('att') # => att='<'
# attrs.get_attribute('nosuch') # => nil
#
- # source://rexml//lib/rexml/element.rb#2300
+ # source://rexml//lib/rexml/element.rb#2309
def get_attribute(name); end
# :call-seq:
@@ -485,7 +485,7 @@ class REXML::Attributes < ::Hash
# attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1'
# attrs.get_attribute_ns('http://foo', 'nosuch') # => nil
#
- # source://rexml//lib/rexml/element.rb#2572
+ # source://rexml//lib/rexml/element.rb#2570
def get_attribute_ns(namespace, name); end
# :call-seq:
@@ -502,7 +502,7 @@ class REXML::Attributes < ::Hash
# ele = d.root.elements['//ele'] # =>
# ele.attributes.length # => 3
#
- # source://rexml//lib/rexml/element.rb#2212
+ # source://rexml//lib/rexml/element.rb#2221
def length; end
# :call-seq:
@@ -514,7 +514,7 @@ class REXML::Attributes < ::Hash
# d = REXML::Document.new(xml_string)
# d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"}
#
- # source://rexml//lib/rexml/element.rb#2433
+ # source://rexml//lib/rexml/element.rb#2431
def namespaces; end
# :call-seq:
@@ -528,7 +528,7 @@ class REXML::Attributes < ::Hash
# d = REXML::Document.new(xml_string)
# d.root.attributes.prefixes # => ["x", "y"]
#
- # source://rexml//lib/rexml/element.rb#2408
+ # source://rexml//lib/rexml/element.rb#2406
def prefixes; end
# :call-seq:
@@ -545,7 +545,7 @@ class REXML::Attributes < ::Hash
# ele = d.root.elements['//ele'] # =>
# ele.attributes.length # => 3
#
- # source://rexml//lib/rexml/element.rb#2212
+ # source://rexml//lib/rexml/element.rb#2221
def size; end
# :call-seq:
@@ -564,7 +564,7 @@ class REXML::Attributes < ::Hash
# attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<']
# attrs.first.class # => REXML::Attribute
#
- # source://rexml//lib/rexml/element.rb#2194
+ # source://rexml//lib/rexml/element.rb#2203
def to_a; end
end
@@ -1662,7 +1662,7 @@ class REXML::Element < ::REXML::Parent
# root[:attr] # => "value"
# root[:nosuch] # => nil
#
- # source://rexml//lib/rexml/element.rb#1237
+ # source://rexml//lib/rexml/element.rb#1246
def [](name_or_index); end
# :call-seq:
@@ -1691,7 +1691,7 @@ class REXML::Element < ::REXML::Parent
# e.add_attribute(a) # => attr='VALUE'
# e['attr'] # => "VALUE"
#
- # source://rexml//lib/rexml/element.rb#1336
+ # source://rexml//lib/rexml/element.rb#1345
def add_attribute(key, value = T.unsafe(nil)); end
# :call-seq:
@@ -1717,7 +1717,7 @@ class REXML::Element < ::REXML::Parent
# a = [['foo' => 'bar'], ['baz' => 'bat']]
# e.add_attributes(a)
#
- # source://rexml//lib/rexml/element.rb#1367
+ # source://rexml//lib/rexml/element.rb#1376
def add_attributes(hash); end
# :call-seq:
@@ -1754,7 +1754,7 @@ class REXML::Element < ::REXML::Parent
# e0.add_element(e1, {'bat' => '0', 'bam' => '1'})
# e0[1] # =>
#
- # source://rexml//lib/rexml/element.rb#723
+ # source://rexml//lib/rexml/element.rb#732
def add_element(element, attrs = T.unsafe(nil)); end
# :call-seq:
@@ -1775,7 +1775,7 @@ class REXML::Element < ::REXML::Parent
# e.add_namespace('baz', 'bat')
# e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"}
#
- # source://rexml//lib/rexml/element.rb#646
+ # source://rexml//lib/rexml/element.rb#655
def add_namespace(prefix, uri = T.unsafe(nil)); end
# :call-seq:
@@ -1817,7 +1817,7 @@ class REXML::Element < ::REXML::Parent
# a.add_text(REXML::Text.new('baz'))
# a.to_a # => ["foo", , "bar", "baz", "baz"]
#
- # source://rexml//lib/rexml/element.rb#1138
+ # source://rexml//lib/rexml/element.rb#1147
def add_text(text); end
# :call-seq:
@@ -1849,7 +1849,7 @@ class REXML::Element < ::REXML::Parent
# document.root.attribute("x") # => x='x'
# document.root.attribute("x", "a") # => a:x='a:x'
#
- # source://rexml//lib/rexml/element.rb#1278
+ # source://rexml//lib/rexml/element.rb#1287
def attribute(name, namespace = T.unsafe(nil)); end
# Mechanisms for accessing attributes and child elements of this
@@ -1874,7 +1874,7 @@ class REXML::Element < ::REXML::Parent
# cds.frozen? # => true
# cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData]
#
- # source://rexml//lib/rexml/element.rb#1411
+ # source://rexml//lib/rexml/element.rb#1420
def cdatas; end
# :call-seq:
@@ -1907,7 +1907,7 @@ class REXML::Element < ::REXML::Parent
# cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment]
# cs.map {|c| c.to_s } # => ["foo", "bar"]
#
- # source://rexml//lib/rexml/element.rb#1432
+ # source://rexml//lib/rexml/element.rb#1441
def comments; end
# The context holds information about the processing environment, such as
@@ -1933,7 +1933,7 @@ class REXML::Element < ::REXML::Parent
# e.delete_attribute('bar') # =>
# e.delete_attribute('bar') # => nil
#
- # source://rexml//lib/rexml/element.rb#1386
+ # source://rexml//lib/rexml/element.rb#1395
def delete_attribute(key); end
# :call-seq:
@@ -1973,7 +1973,7 @@ class REXML::Element < ::REXML::Parent
# a.delete_element('//c') # =>
# a.delete_element('//c') # => nil
#
- # source://rexml//lib/rexml/element.rb#769
+ # source://rexml//lib/rexml/element.rb#778
def delete_element(element); end
# :call-seq:
@@ -1998,7 +1998,7 @@ class REXML::Element < ::REXML::Parent
# d.root.delete_namespace('nosuch')
# d.to_s # => ""
#
- # source://rexml//lib/rexml/element.rb#678
+ # source://rexml//lib/rexml/element.rb#687
def delete_namespace(namespace = T.unsafe(nil)); end
# :call-seq:
@@ -2022,7 +2022,7 @@ class REXML::Element < ::REXML::Parent
#
# Related: #root, #root_node.
#
- # source://rexml//lib/rexml/element.rb#470
+ # source://rexml//lib/rexml/element.rb#475
def document; end
# :call-seq:
@@ -2041,7 +2041,7 @@ class REXML::Element < ::REXML::Parent
# ... >
#
#
- # source://rexml//lib/rexml/element.rb#921
+ # source://rexml//lib/rexml/element.rb#930
def each_element(xpath = T.unsafe(nil), &block); end
# :call-seq:
@@ -2093,7 +2093,7 @@ class REXML::Element < ::REXML::Parent
#
#
#
- # source://rexml//lib/rexml/element.rb#838
+ # source://rexml//lib/rexml/element.rb#847
def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end
# :call-seq:
@@ -2143,7 +2143,7 @@ class REXML::Element < ::REXML::Parent
#
# ... >
#
- # source://rexml//lib/rexml/element.rb#895
+ # source://rexml//lib/rexml/element.rb#904
def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end
# Mechanisms for accessing attributes and child elements of this
@@ -2167,7 +2167,7 @@ class REXML::Element < ::REXML::Parent
# d = REXML::Document.new(xml_string)
# d.root.get_elements('//a') # => [ ... >, ]
#
- # source://rexml//lib/rexml/element.rb#940
+ # source://rexml//lib/rexml/element.rb#949
def get_elements(xpath); end
# :call-seq:
@@ -2187,7 +2187,7 @@ class REXML::Element < ::REXML::Parent
#
# d.root.get_text(1) # => "this is bold!"
#
- # source://rexml//lib/rexml/element.rb#1044
+ # source://rexml//lib/rexml/element.rb#1053
def get_text(path = T.unsafe(nil)); end
# :call-seq:
@@ -2202,7 +2202,7 @@ class REXML::Element < ::REXML::Parent
#
# @return [Boolean]
#
- # source://rexml//lib/rexml/element.rb#1306
+ # source://rexml//lib/rexml/element.rb#1315
def has_attributes?; end
# :call-seq:
@@ -2219,7 +2219,7 @@ class REXML::Element < ::REXML::Parent
#
# @return [Boolean]
#
- # source://rexml//lib/rexml/element.rb#785
+ # source://rexml//lib/rexml/element.rb#794
def has_elements?; end
# :call-seq:
@@ -2236,7 +2236,7 @@ class REXML::Element < ::REXML::Parent
#
# @return [Boolean]
#
- # source://rexml//lib/rexml/element.rb#993
+ # source://rexml//lib/rexml/element.rb#1002
def has_text?; end
# :call-seq:
@@ -2246,7 +2246,7 @@ class REXML::Element < ::REXML::Parent
#
# See {Element Context}[../doc/rexml/context_rdoc.html].
#
- # source://rexml//lib/rexml/element.rb#508
+ # source://rexml//lib/rexml/element.rb#513
def ignore_whitespace_nodes; end
# :call-seq:
@@ -2290,7 +2290,7 @@ class REXML::Element < ::REXML::Parent
# is.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction]
# is.map {|i| i.to_s } # => ["", ""]
#
- # source://rexml//lib/rexml/element.rb#1453
+ # source://rexml//lib/rexml/element.rb#1462
def instructions; end
# :call-seq:
@@ -2313,7 +2313,7 @@ class REXML::Element < ::REXML::Parent
# b.namespace('y') # => "2"
# b.namespace('nosuch') # => nil
#
- # source://rexml//lib/rexml/element.rb#613
+ # source://rexml//lib/rexml/element.rb#618
def namespace(prefix = T.unsafe(nil)); end
# :call-seq:
@@ -2335,7 +2335,7 @@ class REXML::Element < ::REXML::Parent
# d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
# d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"}
#
- # source://rexml//lib/rexml/element.rb#586
+ # source://rexml//lib/rexml/element.rb#591
def namespaces; end
# :call-seq:
@@ -2348,7 +2348,7 @@ class REXML::Element < ::REXML::Parent
# d.root.elements['b'].next_element #->
# d.root.elements['c'].next_element #-> nil
#
- # source://rexml//lib/rexml/element.rb#954
+ # source://rexml//lib/rexml/element.rb#963
def next_element; end
# :call-seq:
@@ -2360,7 +2360,7 @@ class REXML::Element < ::REXML::Parent
# a = d.root # =>
# a.node_type # => :element
#
- # source://rexml//lib/rexml/element.rb#1159
+ # source://rexml//lib/rexml/element.rb#1168
def node_type; end
# :call-seq:
@@ -2382,7 +2382,7 @@ class REXML::Element < ::REXML::Parent
# d.elements['//b'].prefixes # => ["x", "y"]
# d.elements['//c'].prefixes # => ["x", "y", "z"]
#
- # source://rexml//lib/rexml/element.rb#560
+ # source://rexml//lib/rexml/element.rb#565
def prefixes; end
# :call-seq:
@@ -2395,7 +2395,7 @@ class REXML::Element < ::REXML::Parent
# d.root.elements['c'].previous_element #->
# d.root.elements['b'].previous_element #-> nil
#
- # source://rexml//lib/rexml/element.rb#970
+ # source://rexml//lib/rexml/element.rb#979
def previous_element; end
# :call-seq:
@@ -2408,7 +2408,7 @@ class REXML::Element < ::REXML::Parent
# The evaluation is tested against +expanded_name+, and so is namespace
# sensitive.
#
- # source://rexml//lib/rexml/element.rb#528
+ # source://rexml//lib/rexml/element.rb#533
def raw; end
# :call-seq:
@@ -2493,7 +2493,7 @@ class REXML::Element < ::REXML::Parent
# Note also that the text note is retrieved by method get_text,
# and so is always normalized text.
#
- # source://rexml//lib/rexml/element.rb#1021
+ # source://rexml//lib/rexml/element.rb#1030
def text(path = T.unsafe(nil)); end
# :call-seq:
@@ -2521,7 +2521,7 @@ class REXML::Element < ::REXML::Parent
#
# d.root.text = nil #-> ''
#
- # source://rexml//lib/rexml/element.rb#1080
+ # source://rexml//lib/rexml/element.rb#1089
def text=(text); end
# :call-seq:
@@ -2536,7 +2536,7 @@ class REXML::Element < ::REXML::Parent
# ts.map {|t| t.class } # => [REXML::Text, REXML::Text]
# ts.map {|t| t.to_s } # => ["text", "more"]
#
- # source://rexml//lib/rexml/element.rb#1469
+ # source://rexml//lib/rexml/element.rb#1478
def texts; end
# :call-seq:
@@ -2550,7 +2550,7 @@ class REXML::Element < ::REXML::Parent
# The evaluation is tested against the element's +expanded_name+,
# and so is namespace-sensitive.
#
- # source://rexml//lib/rexml/element.rb#485
+ # source://rexml//lib/rexml/element.rb#490
def whitespace; end
# == DEPRECATED
@@ -2576,7 +2576,7 @@ class REXML::Element < ::REXML::Parent
# doc.write( out ) #-> doc is written to the string 'out'
# doc.write( $stdout ) #-> doc written to the console
#
- # source://rexml//lib/rexml/element.rb#1495
+ # source://rexml//lib/rexml/element.rb#1504
def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end
# :call-seq:
@@ -2599,17 +2599,17 @@ class REXML::Element < ::REXML::Parent
# e = REXML::Element.new('foo')
# e.xpath # => "foo"
#
- # source://rexml//lib/rexml/element.rb#1183
+ # source://rexml//lib/rexml/element.rb#1192
def xpath; end
private
- # source://rexml//lib/rexml/element.rb#1512
+ # source://rexml//lib/rexml/element.rb#1521
def __to_xpath_helper(node); end
# A private helper method
#
- # source://rexml//lib/rexml/element.rb#1527
+ # source://rexml//lib/rexml/element.rb#1536
def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end
end
@@ -2663,7 +2663,7 @@ end
# elements = d.root.elements
# elements # => # ... >>
#
-# source://rexml//lib/rexml/element.rb#1582
+# source://rexml//lib/rexml/element.rb#1591
class REXML::Elements
include ::Enumerable
@@ -2680,7 +2680,7 @@ class REXML::Elements
#
# @return [Elements] a new instance of Elements
#
- # source://rexml//lib/rexml/element.rb#1595
+ # source://rexml//lib/rexml/element.rb#1604
def initialize(parent); end
# :call-seq:
@@ -2745,7 +2745,7 @@ class REXML::Elements
# element.parent # => ... >
# element.context # => {:raw=>:all}
#
- # source://rexml//lib/rexml/element.rb#1912
+ # source://rexml//lib/rexml/element.rb#1921
def <<(element = T.unsafe(nil)); end
# :call-seq:
@@ -2801,7 +2801,7 @@ class REXML::Elements
# eles[4, 'book'] # => ... >
# eles[5, 'book'] # => nil
#
- # source://rexml//lib/rexml/element.rb#1667
+ # source://rexml//lib/rexml/element.rb#1676
def [](index, name = T.unsafe(nil)); end
# :call-seq:
@@ -2840,7 +2840,7 @@ class REXML::Elements
# eles[50] = REXML::Text.new('bar') # => "bar"
# eles.size # => 5
#
- # source://rexml//lib/rexml/element.rb#1722
+ # source://rexml//lib/rexml/element.rb#1731
def []=(index, element); end
# :call-seq:
@@ -2905,7 +2905,7 @@ class REXML::Elements
# element.parent # => ... >
# element.context # => {:raw=>:all}
#
- # source://rexml//lib/rexml/element.rb#1912
+ # source://rexml//lib/rexml/element.rb#1921
def add(element = T.unsafe(nil)); end
# :call-seq:
@@ -2925,7 +2925,7 @@ class REXML::Elements
# xpath = '//book [@category="web"]'
# elements.collect(xpath) {|element| element.size } # => [17, 9]
#
- # source://rexml//lib/rexml/element.rb#1975
+ # source://rexml//lib/rexml/element.rb#1984
def collect(xpath = T.unsafe(nil)); end
# :call-seq:
@@ -2969,7 +2969,7 @@ class REXML::Elements
# elements.delete('//book [@category="children"]') # => ... >
# elements.delete('//nosuch') # => nil
#
- # source://rexml//lib/rexml/element.rb#1812
+ # source://rexml//lib/rexml/element.rb#1821
def delete(element); end
# :call-seq:
@@ -2989,7 +2989,7 @@ class REXML::Elements
# elements.size # => 0
# elements.delete_all('//book') # => []
#
- # source://rexml//lib/rexml/element.rb#1838
+ # source://rexml//lib/rexml/element.rb#1847
def delete_all(xpath); end
# :call-seq:
@@ -3020,7 +3020,7 @@ class REXML::Elements
# ... >
# ... >
#
- # source://rexml//lib/rexml/element.rb#1954
+ # source://rexml//lib/rexml/element.rb#1963
def each(xpath = T.unsafe(nil)); end
# :call-seq:
@@ -3035,7 +3035,7 @@ class REXML::Elements
#
# @return [Boolean]
#
- # source://rexml//lib/rexml/element.rb#1742
+ # source://rexml//lib/rexml/element.rb#1751
def empty?; end
# :call-seq:
@@ -3052,7 +3052,7 @@ class REXML::Elements
# elements.index(ele_4) # => 3
# elements.index(ele_3) # => -1
#
- # source://rexml//lib/rexml/element.rb#1760
+ # source://rexml//lib/rexml/element.rb#1769
def index(element); end
# :call-seq:
@@ -3132,7 +3132,7 @@ class REXML::Elements
# total += element.size
# end # => 26
#
- # source://rexml//lib/rexml/element.rb#2060
+ # source://rexml//lib/rexml/element.rb#2069
def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end
# :call-seq:
@@ -3146,7 +3146,7 @@ class REXML::Elements
# elements = REXML::Elements.new(d.root)
# elements.parent == d.root # => true
#
- # source://rexml//lib/rexml/element.rb#1610
+ # source://rexml//lib/rexml/element.rb#1619
def parent; end
# :call-seq:
@@ -3158,7 +3158,7 @@ class REXML::Elements
# d.root.elements.size # => 3 # Three elements.
# d.root.size # => 6 # Three elements plus three text nodes..
#
- # source://rexml//lib/rexml/element.rb#2084
+ # source://rexml//lib/rexml/element.rb#2093
def size; end
# :call-seq:
@@ -3179,14 +3179,14 @@ class REXML::Elements
#
# elements.to_a('//c') # => []
#
- # source://rexml//lib/rexml/element.rb#2108
+ # source://rexml//lib/rexml/element.rb#2117
def to_a(xpath = T.unsafe(nil)); end
private
# Private helper class. Removes quotes from quoted strings
#
- # source://rexml//lib/rexml/element.rb#2116
+ # source://rexml//lib/rexml/element.rb#2125
def literalize(name); end
end
@@ -3228,65 +3228,54 @@ class REXML::Entity < ::REXML::Child
#
# @return [Entity] a new instance of Entity
#
- # source://rexml//lib/rexml/entity.rb#33
+ # source://rexml//lib/rexml/entity.rb#34
def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end
# Returns the value of attribute external.
#
- # source://rexml//lib/rexml/entity.rb#22
+ # source://rexml//lib/rexml/entity.rb#23
def external; end
# Returns the value of attribute name.
#
- # source://rexml//lib/rexml/entity.rb#22
+ # source://rexml//lib/rexml/entity.rb#23
def name; end
# Returns the value of attribute ndata.
#
- # source://rexml//lib/rexml/entity.rb#22
+ # source://rexml//lib/rexml/entity.rb#23
def ndata; end
# Returns the value of this entity unprocessed -- raw. This is the
# normalized value; that is, with all %ent; and &ent; entities intact
#
- # source://rexml//lib/rexml/entity.rb#85
+ # source://rexml//lib/rexml/entity.rb#83
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
+ # source://rexml//lib/rexml/entity.rb#23
def pubid; end
# Returns the value of attribute ref.
#
- # source://rexml//lib/rexml/entity.rb#22
+ # source://rexml//lib/rexml/entity.rb#23
def ref; end
# Returns this entity as a string. See write().
#
- # source://rexml//lib/rexml/entity.rb#119
+ # source://rexml//lib/rexml/entity.rb#117
def to_s; end
# Evaluates to the unnormalized value of this entity; that is, replacing
- # all entities -- both %ent; and &ent; entities. This differs from
- # +value()+ in that +value+ only replaces %ent; entities.
+ # &ent; entities.
#
# source://rexml//lib/rexml/entity.rb#73
def unnormalized; end
- # Returns the value of this entity. At the moment, only internal entities
- # are processed. If the value contains internal references (IE,
- # %blah;), those are replaced with their values. IE, if the doctype
- # contains:
- #
- #
- # then:
- # doctype.entity('yada').value #-> "nanoo bar nanoo"
+ # Returns the value of attribute value.
#
- # source://rexml//lib/rexml/entity.rb#134
+ # source://rexml//lib/rexml/entity.rb#23
def value; end
# Write out a fully formed, correct entity definition (assuming the Entity
@@ -3298,21 +3287,16 @@ class REXML::Entity < ::REXML::Child
# indent::
# *DEPRECATED* and ignored
#
- # source://rexml//lib/rexml/entity.rb#97
+ # source://rexml//lib/rexml/entity.rb#95
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.
#
# @return [Boolean]
#
- # source://rexml//lib/rexml/entity.rb#66
+ # source://rexml//lib/rexml/entity.rb#67
def matches?(string); end
end
end
@@ -3882,41 +3866,41 @@ end
#
# Nat Price gave me some good ideas for the API.
#
-# source://rexml//lib/rexml/parsers/baseparser.rb#41
+# source://rexml//lib/rexml/parsers/baseparser.rb#57
class REXML::Parsers::BaseParser
# @return [BaseParser] a new instance of BaseParser
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#145
+ # source://rexml//lib/rexml/parsers/baseparser.rb#162
def initialize(source); end
- # source://rexml//lib/rexml/parsers/baseparser.rb#152
+ # source://rexml//lib/rexml/parsers/baseparser.rb#169
def add_listener(listener); end
# Returns true if there are no more events
#
# @return [Boolean]
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#180
+ # source://rexml//lib/rexml/parsers/baseparser.rb#198
def empty?; end
- # source://rexml//lib/rexml/parsers/baseparser.rb#507
+ # source://rexml//lib/rexml/parsers/baseparser.rb#530
def entity(reference, entities); end
# Returns the value of attribute entity_expansion_count.
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#157
+ # source://rexml//lib/rexml/parsers/baseparser.rb#174
def entity_expansion_count; end
# Returns true if there are more events. Synonymous with !empty?
#
# @return [Boolean]
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#185
+ # source://rexml//lib/rexml/parsers/baseparser.rb#203
def has_next?; end
# Escapes all possible entities
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#520
+ # source://rexml//lib/rexml/parsers/baseparser.rb#541
def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end
# Peek at the +depth+ event in the stack. The first element on the stack
@@ -3926,111 +3910,123 @@ class REXML::Parsers::BaseParser
# event, so you can effectively pre-parse the entire document (pull the
# entire thing into memory) using this method.
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#201
+ # source://rexml//lib/rexml/parsers/baseparser.rb#219
def peek(depth = T.unsafe(nil)); end
- # source://rexml//lib/rexml/parsers/baseparser.rb#170
+ # source://rexml//lib/rexml/parsers/baseparser.rb#188
def position; end
# Returns the next event. This is a +PullEvent+ object.
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#216
+ # source://rexml//lib/rexml/parsers/baseparser.rb#234
def pull; end
# Returns the value of attribute source.
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#156
+ # source://rexml//lib/rexml/parsers/baseparser.rb#173
def source; end
- # source://rexml//lib/rexml/parsers/baseparser.rb#159
+ # source://rexml//lib/rexml/parsers/baseparser.rb#176
def stream=(source); end
# Unescapes all possible entities
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#536
+ # source://rexml//lib/rexml/parsers/baseparser.rb#557
def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end
# Push an event back on the head of the stream. This method
# has (theoretically) infinite depth.
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#191
+ # source://rexml//lib/rexml/parsers/baseparser.rb#209
def unshift(token); end
private
+ # source://rexml//lib/rexml/parsers/baseparser.rb#602
+ def add_namespace(prefix, uri); end
+
# @return [Boolean]
#
- # source://rexml//lib/rexml/parsers/baseparser.rb#582
+ # source://rexml//lib/rexml/parsers/baseparser.rb#635
def need_source_encoding_update?(xml_declaration_encoding); end
- # source://rexml//lib/rexml/parsers/baseparser.rb#702
- def parse_attributes(prefixes, curr_ns); end
+ # source://rexml//lib/rexml/parsers/baseparser.rb#755
+ def parse_attributes(prefixes); end
- # source://rexml//lib/rexml/parsers/baseparser.rb#601
+ # source://rexml//lib/rexml/parsers/baseparser.rb#654
def parse_id(base_error_message, accept_external_id:, accept_public_id:); end
- # source://rexml//lib/rexml/parsers/baseparser.rb#629
+ # source://rexml//lib/rexml/parsers/baseparser.rb#682
def parse_id_invalid_details(accept_external_id:, accept_public_id:); end
- # source://rexml//lib/rexml/parsers/baseparser.rb#588
+ # source://rexml//lib/rexml/parsers/baseparser.rb#641
def parse_name(base_error_message); end
- # source://rexml//lib/rexml/parsers/baseparser.rb#667
+ # source://rexml//lib/rexml/parsers/baseparser.rb#617
+ def pop_namespaces_restore; end
+
+ # source://rexml//lib/rexml/parsers/baseparser.rb#720
def process_instruction; end
- # source://rexml//lib/rexml/parsers/baseparser.rb#226
+ # source://rexml//lib/rexml/parsers/baseparser.rb#244
def pull_event; end
- # source://rexml//lib/rexml/parsers/baseparser.rb#575
- def record_entity_expansion; end
+ # source://rexml//lib/rexml/parsers/baseparser.rb#611
+ def push_namespaces_restore; end
+
+ # source://rexml//lib/rexml/parsers/baseparser.rb#628
+ def record_entity_expansion(delta = T.unsafe(nil)); end
end
-# source://rexml//lib/rexml/parsers/baseparser.rb#114
+# source://rexml//lib/rexml/parsers/baseparser.rb#130
REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#115
+# source://rexml//lib/rexml/parsers/baseparser.rb#131
REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#116
+# source://rexml//lib/rexml/parsers/baseparser.rb#132
REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#127
+# source://rexml//lib/rexml/parsers/baseparser.rb#143
module REXML::Parsers::BaseParser::Private; end
-# source://rexml//lib/rexml/parsers/baseparser.rb#130
+# source://rexml//lib/rexml/parsers/baseparser.rb#147
REXML::Parsers::BaseParser::Private::ATTLISTDECL_END = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#135
+# source://rexml//lib/rexml/parsers/baseparser.rb#152
REXML::Parsers::BaseParser::Private::CARRIAGE_RETURN_NEWLINE_PATTERN = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#136
+# source://rexml//lib/rexml/parsers/baseparser.rb#153
REXML::Parsers::BaseParser::Private::CHARACTER_REFERENCES = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#129
+# source://rexml//lib/rexml/parsers/baseparser.rb#146
REXML::Parsers::BaseParser::Private::CLOSE_PATTERN = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#137
+# source://rexml//lib/rexml/parsers/baseparser.rb#154
REXML::Parsers::BaseParser::Private::DEFAULT_ENTITIES_PATTERNS = T.let(T.unsafe(nil), Hash)
-# source://rexml//lib/rexml/parsers/baseparser.rb#134
+# source://rexml//lib/rexml/parsers/baseparser.rb#151
REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#132
+# source://rexml//lib/rexml/parsers/baseparser.rb#149
REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String)
-# source://rexml//lib/rexml/parsers/baseparser.rb#131
+# source://rexml//lib/rexml/parsers/baseparser.rb#148
REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#133
+# source://rexml//lib/rexml/parsers/baseparser.rb#150
REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), String)
-# source://rexml//lib/rexml/parsers/baseparser.rb#128
+# source://rexml//lib/rexml/parsers/baseparser.rb#144
+REXML::Parsers::BaseParser::Private::PEREFERENCE_PATTERN = T.let(T.unsafe(nil), Regexp)
+
+# source://rexml//lib/rexml/parsers/baseparser.rb#145
REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#50
+# source://rexml//lib/rexml/parsers/baseparser.rb#66
REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp)
-# source://rexml//lib/rexml/parsers/baseparser.rb#49
+# source://rexml//lib/rexml/parsers/baseparser.rb#65
REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String)
# source://rexml//lib/rexml/parsers/streamparser.rb#6
@@ -4044,6 +4040,9 @@ class REXML::Parsers::StreamParser
def add_listener(listener); end
# source://rexml//lib/rexml/parsers/streamparser.rb#17
+ def entity_expansion_count; end
+
+ # source://rexml//lib/rexml/parsers/streamparser.rb#21
def parse; end
end
diff --git a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi b/sorbet/rbi/gems/rubocop-ast@1.32.1.rbi
similarity index 93%
rename from sorbet/rbi/gems/rubocop-ast@1.31.3.rbi
rename to sorbet/rbi/gems/rubocop-ast@1.32.1.rbi
index 04b45a8a8..6b00a2892 100644
--- a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi
+++ b/sorbet/rbi/gems/rubocop-ast@1.32.1.rbi
@@ -159,12 +159,16 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node
#
# @return [Boolean] whether the array is enclosed in percent or square
#
- # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#60
+ # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#64
def bracketed?; end
- # @deprecated Use `values.each` (a.k.a. `children.each`)
+ # Calls the given block for each `value` node in the `array` literal.
+ # If no block is given, an `Enumerator` is returned.
+ #
+ # @return [self] if a block is given
+ # @return [Enumerator] if no block is given
#
- # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#25
def each_value(&block); end
# Checks whether the `array` literal is delimited by percent brackets.
@@ -173,14 +177,14 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node
# @overload percent_literal?
# @return [Boolean] whether the array is enclosed in percent brackets
#
- # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#47
+ # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#51
def percent_literal?(type = T.unsafe(nil)); end
# Checks whether the `array` literal is delimited by square brackets.
#
# @return [Boolean] whether the array is enclosed in square brackets
#
- # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#32
+ # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#36
def square_brackets?; end
# Returns an array of all value nodes in the `array` literal.
@@ -216,7 +220,7 @@ class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node
end
# Common functionality for primitive literal nodes: `sym`, `str`,
-# `int`, `float`, ...
+# `int`, `float`, `rational`...
#
# source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#7
module RuboCop::AST::BasicLiteralNode
@@ -438,18 +442,18 @@ class RuboCop::AST::Builder < ::Parser::Builders::Default
#
# @return [Node] the generated node
#
- # source://rubocop-ast//lib/rubocop/ast/builder.rb#98
+ # source://rubocop-ast//lib/rubocop/ast/builder.rb#99
def n(type, children, source_map); end
# TODO: Figure out what to do about literal encoding handling...
# More details here https://github.com/whitequark/parser/issues/283
#
- # source://rubocop-ast//lib/rubocop/ast/builder.rb#104
+ # source://rubocop-ast//lib/rubocop/ast/builder.rb#105
def string_value(token); end
private
- # source://rubocop-ast//lib/rubocop/ast/builder.rb#110
+ # source://rubocop-ast//lib/rubocop/ast/builder.rb#111
def node_klass(type); end
end
@@ -1310,6 +1314,14 @@ class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node
#
# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#12
def body; end
+
+ # Checks whether this node body is a void context.
+ # Always `true` for `ensure`.
+ #
+ # @return [true] whether the `ensure` node body is a void context
+ #
+ # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#20
+ def void_context?; end
end
# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#5
@@ -1337,11 +1349,6 @@ module RuboCop::AST::Ext::Range
def line_span(exclude_end: T.unsafe(nil)); end
end
-# Refinement to circumvent broken `Range#minmax` for infinity ranges in 2.6-
-#
-# source://rubocop-ast//lib/rubocop/ast/ext/range_min_max.rb#7
-module RuboCop::AST::Ext::RangeMinMax; end
-
# A node extension for `float` nodes. This will be used in place of a plain
# node when the builder constructs the AST, making its methods available to
# all `float` nodes within RuboCop.
@@ -2540,19 +2547,19 @@ class RuboCop::AST::Node < ::Parser::AST::Node
# @return [Node] a new instance of Node
# @see https://www.rubydoc.info/gems/ast/AST/Node:initialize
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#92
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#113
def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def __ENCODING___type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def __FILE___type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def __LINE___type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def alias_type?; end
# Returns an array of ancestor nodes.
@@ -2560,173 +2567,173 @@ class RuboCop::AST::Node < ::Parser::AST::Node
#
# @return [Array] an array of ancestor nodes
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#247
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#268
def ancestors; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def and_asgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def and_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def arg_expr_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def arg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def args_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#464
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#474
def argument?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#468
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#478
def argument_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def array_pattern_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def array_pattern_with_tail_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def array_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#416
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#426
def assignment?; end
# Some cops treat the shovel operator as a kind of assignment.
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#355
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#376
def assignment_or_similar?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def back_ref_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#420
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#430
def basic_conditional?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#363
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#384
def basic_literal?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def begin_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def block_pass_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def block_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def blockarg_expr_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def blockarg_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#472
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#482
def boolean_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def break_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#456
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#466
def call_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def case_match_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def case_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def casgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def cbase_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#460
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#470
def chained?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#512
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#522
def class_constructor?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#530
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#540
def class_definition?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def class_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#144
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#165
def complete!; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#149
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#170
def complete?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def complex_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#424
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#434
def conditional?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#293
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#314
def const_name; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def const_pattern_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def const_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def csend_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def cvar_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def cvasgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def def_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#314
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#335
def defined_module; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#319
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#340
def defined_module_name; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def defined_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def defs_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def dstr_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def dsym_type?; end
# Calls the given block for each ancestor node from parent to root.
@@ -2739,163 +2746,163 @@ class RuboCop::AST::Node < ::Parser::AST::Node
# @return [Enumerator] if no block is given
# @yieldparam node [Node] each ancestor node
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#235
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#256
def each_ancestor(*types, &block); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def eflipflop_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def empty_else_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#349
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#370
def empty_source?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def ensure_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#408
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#418
def equals_asgn?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def erange_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def false_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#371
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#392
def falsey_literal?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def find_pattern_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#261
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#282
def first_line; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def float_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def for_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def forward_arg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def forward_args_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def forwarded_args_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def forwarded_kwrestarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def forwarded_restarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#509
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#519
def global_const?(param0 = T.unsafe(nil), param1); end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#484
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#494
def guard_clause?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def gvar_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def gvasgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def hash_pattern_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def hash_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def ident_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def if_guard_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def if_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def iflipflop_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#379
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#400
def immutable_literal?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def in_match_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def in_pattern_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def index_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def indexasgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def int_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def irange_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def ivar_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def ivasgn_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#437
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#447
def keyword?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def kwarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def kwargs_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def kwbegin_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def kwnilarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def kwoptarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def kwrestarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def kwsplat_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#503
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#513
def lambda?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#506
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#516
def lambda_or_proc?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def lambda_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#265
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#286
def last_line; end
# Use is discouraged, this is a potentially slow method and can lead
@@ -2903,7 +2910,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node
#
# @return [Node, nil] the left (aka previous) sibling
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#187
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#208
def left_sibling; end
# Use is discouraged, this is a potentially slow method and can lead
@@ -2911,94 +2918,94 @@ class RuboCop::AST::Node < ::Parser::AST::Node
#
# @return [Array] the left (aka previous) siblings
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#197
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#218
def left_siblings; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#269
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#290
def line_count; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#359
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#380
def literal?; end
# NOTE: `loop { }` is a normal method call and thus not a loop keyword.
#
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#433
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#443
def loop_keyword?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def lvar_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def lvasgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def masgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_alt_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_as_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_current_line_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#491
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#501
def match_guard_clause?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_nil_pattern_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_pattern_p_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_pattern_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_rest_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_var_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_with_lvasgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def match_with_trailing_comma_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def mlhs_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#537
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#547
def module_definition?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def module_type?; end
# Predicates
#
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#341
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#362
def multiline?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#375
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#396
def mutable_literal?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#671
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#679
def new_class_or_module_block?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def next_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def nil_type?; end
# Common destructuring method. This can be used to normalize
@@ -3011,95 +3018,95 @@ class RuboCop::AST::Node < ::Parser::AST::Node
# source://ast/2.4.2/lib/ast/node.rb#56
def node_parts; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#275
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#296
def nonempty_line_count; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def not_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def nth_ref_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def numargs_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def numblock_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#476
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#486
def numeric_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def objc_kwarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def objc_restarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def objc_varargs_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def op_asgn_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#448
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#458
def operator_keyword?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def optarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def or_asgn_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def or_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def pair_type?; end
# Returns the parent node, or `nil` if the receiver is a root node.
#
# @return [Node, nil] the parent node or `nil`
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#126
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#147
def parent; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#135
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#156
def parent?; end
# Searching the AST
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#325
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#346
def parent_module_name; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#452
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#462
def parenthesized_call?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def pin_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#428
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#438
def post_condition_loop?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def postexe_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def preexe_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#496
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#506
def proc?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def procarg0_type?; end
# Some expressions are evaluated for their value, some for their side
@@ -3112,56 +3119,60 @@ class RuboCop::AST::Node < ::Parser::AST::Node
#
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#582
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#590
def pure?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#480
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#490
def range_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def rational_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#286
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#307
def receiver(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#386
+ # @return [Boolean]
+ #
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#97
def recursive_basic_literal?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#386
+ # @return [Boolean]
+ #
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#97
def recursive_literal?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def redo_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#404
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#414
def reference?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def regexp_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def regopt_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def resbody_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def rescue_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def restarg_expr_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def restarg_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def retry_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def return_type?; end
# Use is discouraged, this is a potentially slow method and can lead
@@ -3169,7 +3180,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node
#
# @return [Node, nil] the right (aka next) sibling
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#178
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#199
def right_sibling; end
# Use is discouraged, this is a potentially slow method and can lead
@@ -3177,18 +3188,18 @@ class RuboCop::AST::Node < ::Parser::AST::Node
#
# @return [Array] the right (aka next) siblings
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#206
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#227
def right_siblings; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#140
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#161
def root?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def sclass_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def self_type?; end
# Most nodes are of 'send' type, so this method is defined
@@ -3196,15 +3207,15 @@ class RuboCop::AST::Node < ::Parser::AST::Node
#
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#119
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#140
def send_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def shadowarg_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#412
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#422
def shorthand_asgn?; end
# Returns the index of the receiver node in its siblings. (Sibling index
@@ -3213,70 +3224,70 @@ class RuboCop::AST::Node < ::Parser::AST::Node
#
# @return [Integer, nil] the index of the receiver node in its siblings
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#171
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#192
def sibling_index; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#345
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#366
def single_line?; end
# NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}`
#
# @return [String, nil]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#253
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#274
def source; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#279
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#300
def source_length; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#257
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#278
def source_range; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#444
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#454
def special_keyword?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def splat_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#291
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#312
def str_content(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def str_type?; end
# @deprecated Use `:class_constructor?`
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#525
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#535
def struct_constructor?(param0 = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def super_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def sym_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def true_type?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#367
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#388
def truthy_literal?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def undef_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def unless_guard_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def until_post_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def until_type?; end
# Override `AST::Node#updated` so that `AST::Processor` does not try to
@@ -3285,7 +3296,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node
# identical subtrees. Rather, the entire AST must be copied any time any
# part of it is changed.
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#160
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#181
def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end
# Some expressions are evaluated for their value, some for their side
@@ -3296,76 +3307,82 @@ class RuboCop::AST::Node < ::Parser::AST::Node
# So, does the return value of this node matter? If we changed it to
# `(...; nil)`, might that affect anything?
#
- #
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#551
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#560
def value_used?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#400
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#410
def variable?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def when_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def while_post_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def while_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def xstr_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def yield_type?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#111
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#132
def zsuper_type?; end
protected
- # source://rubocop-ast//lib/rubocop/ast/node.rb#130
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#151
def parent=(node); end
private
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#610
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#618
def begin_value_used?; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#621
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#629
def case_if_value_used?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#305
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#326
def defined_module0(param0 = T.unsafe(nil)); end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#615
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#623
def for_value_used?; end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#657
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#665
def parent_module_name_for_block(ancestor); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#645
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#653
def parent_module_name_for_sclass(sclass_node); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#632
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#640
def parent_module_name_part(node); end
- # source://rubocop-ast//lib/rubocop/ast/node.rb#600
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#608
def visit_ancestors(types); end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node.rb#627
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#635
def while_until_value_used?; end
+
+ class << self
+ private
+
+ # source://rubocop-ast//lib/rubocop/ast/node.rb#92
+ def def_recursive_literal_predicate(kind); end
+ end
end
# @api private
@@ -3803,7 +3820,10 @@ class RuboCop::AST::NodePattern::Compiler::Binding
# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16
def bind(name); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#30
+ # Yields for each branch of the given union, forbidding unification of
+ # bindings which only appear in a subset of the union.
+ #
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#31
def union_bind(enum); end
private
@@ -4151,7 +4171,6 @@ end
# Doc on how this fits in the compiling process:
# /docs/modules/ROOT/pages/node_pattern.adoc
#
-#
# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17
class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler
# Calls `compile_sequence`; the actual `compile` method
@@ -4305,6 +4324,8 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST:
def within_loop; end
end
+# Shift of 1 from standard Ruby indices
+#
# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#18
RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer)
@@ -4437,7 +4458,7 @@ class RuboCop::AST::NodePattern::LexerRex
# The current location in the parse.
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#104
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#103
def location; end
# The StringScanner for this lexer.
@@ -4452,22 +4473,22 @@ class RuboCop::AST::NodePattern::LexerRex
# Lex the next token.
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#113
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#112
def next_token; end
# Parse the given string.
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#84
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#83
def parse(str); end
# Read in and parse the file at +path+.
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#94
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#93
def parse_file(path); end
# The current scanner class. Must be overridden in subclasses.
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#77
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#76
def scanner_class; end
# The StringScanner for this lexer.
@@ -4617,212 +4638,212 @@ class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node
#
# @return [Integer, Range] An Integer for fixed length terms, otherwise a Range.
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#29
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#28
def arity; end
# @return [Range] arity as a Range
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#69
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#68
def arity_range; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#23
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#22
def capture?; end
# @return [Node] most nodes have only one child
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#48
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#47
def child; end
# @return [Array]
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#43
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#42
def children_nodes; end
# @return [Array, nil] replace node with result, or `nil` if no change requested.
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#34
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#33
def in_sequence_head; end
# that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`)
#
# @return [Boolean] returns true for nodes having a Ruby literal equivalent
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#64
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#63
def matches_within_set?; end
# @return [Integer] nb of captures of that node and its descendants
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#53
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#52
def nb_captures; end
# To be overridden by subclasses
#
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#19
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#18
def rest?; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#78
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#77
def source_range; end
# @return [Boolean] returns whether it matches a variable number of elements
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#58
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#57
def variadic?; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#74
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#73
def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end
end
# Node class for ``
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#180
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#179
class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node
include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#198
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#197
def arity; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#190
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#189
def ends_with_rest?; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#194
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#193
def rest_node; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#186
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#185
def term_nodes; end
end
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#183
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#182
RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash)
# Node class for `$something`
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#97
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#96
class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node
# source://forwardable/1.3.3/forwardable.rb#231
def arity(*args, **_arg1, &block); end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#101
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#100
def capture?; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#109
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#108
def in_sequence_head; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#105
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#104
def nb_captures; end
# source://forwardable/1.3.3/forwardable.rb#231
def rest?(*args, **_arg1, &block); end
end
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#85
module RuboCop::AST::NodePattern::Node::ForbidInSeqHead
# @raise [NodePattern::Invalid]
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#87
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86
def in_sequence_head; end
end
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#140
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#139
RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#82
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#81
RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash)
# Registry
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#250
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249
RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash)
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#12
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#11
RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set)
# Node class for `predicate?(:arg, :list)`
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#130
class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#136
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#135
def arg_list; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#132
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131
def method_name; end
end
# Node class for `int+`
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#143
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#142
class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node
include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#156
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#155
def arity; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#146
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#145
def operator; end
end
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#150
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#149
RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash)
# Node class for `...`
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#161
class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#170
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#169
def arity; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#174
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#173
def in_sequence_head; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#166
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#165
def rest?; end
end
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#163
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162
RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range)
# Node class for `(type first second ...)`
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#118
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#117
class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node
include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead
# @return [Sequence] a new instance of Sequence
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#121
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#120
def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end
end
# A list (potentially empty) of nodes; part of a Union
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#206
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#205
class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node
include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#209
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#208
def arity; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#214
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#213
def in_sequence_head; end
end
# Node class for `{ ... }`
#
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#223
class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#225
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224
def arity; end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#232
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#231
def in_sequence_head; end
end
@@ -5248,6 +5269,9 @@ RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set)
# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set)
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
+RuboCop::AST::NodePattern::Sets::SET_MAP_FILTER_MAP = T.let(T.unsafe(nil), Set)
+
# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH_ = T.let(T.unsafe(nil), Set)
@@ -5431,7 +5455,7 @@ RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set)
# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#55
RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String)
-# Common functionality for primitive numeric nodes: `int`, `float`, ...
+# Common functionality for primitive numeric nodes: `int`, `float`, `rational`...
#
# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#6
module RuboCop::AST::NumericNode
@@ -5768,42 +5792,42 @@ end
# and other information such as disabled lines for cops.
# It also provides a convenient way to access source lines.
#
-# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#11
+# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#10
class RuboCop::AST::ProcessedSource
# @return [ProcessedSource] a new instance of ProcessedSource
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#29
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#28
def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#73
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#72
def [](*args); end
# Returns the value of attribute ast.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def ast; end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#51
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#50
def ast_with_comments; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#112
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#111
def blank?; end
# Returns the value of attribute buffer.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def buffer; end
# Raw source checksum for tracking infinite loops.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#84
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#83
def checksum; end
# @return [Comment, nil] the comment at that line, if any.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#117
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#116
def comment_at_line(line); end
# Consider using `each_comment_in_lines` instead
@@ -5811,181 +5835,181 @@ class RuboCop::AST::ProcessedSource
# @deprecated use contains_comment?
# @return [Boolean] if any of the lines in the given `source_range` has a comment.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#139
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138
def commented?(source_range); end
# Returns the value of attribute comments.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def comments; end
# Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use.
#
# @deprecated Use `each_comment_in_lines`
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#147
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#146
def comments_before_line(line); end
# Consider using `each_comment_in_lines` instead
#
# @return [Boolean] if any of the lines in the given `source_range` has a comment.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#139
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138
def contains_comment?(source_range); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#161
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#160
def current_line(token); end
# Returns the value of attribute diagnostics.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def diagnostics; end
# @deprecated Use `comments.each`
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#89
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#88
def each_comment(&block); end
# Enumerates on the comments contained with the given `line_range`
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#127
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126
def each_comment_in_lines(line_range); end
# @deprecated Use `tokens.each`
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#99
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98
def each_token(&block); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#108
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107
def file_path; end
# @deprecated Use `comment_at_line`, `each_comment_in_lines`, or `comments.find`
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#94
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#93
def find_comment(&block); end
# @deprecated Use `tokens.find`
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#104
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#103
def find_token(&block); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#182
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#181
def first_token_of(range_or_node); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#165
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#164
def following_line(token); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#186
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#185
def last_token_of(range_or_node); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#169
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#168
def line_indentation(line_number); end
# @return [Boolean] if the given line number has a comment.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#122
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#121
def line_with_comment?(line); end
# Returns the source lines, line break characters removed, excluding a
# possible __END__ and everything that comes after.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#59
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#58
def lines; end
# Returns the value of attribute parser_engine.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def parser_engine; end
# Returns the value of attribute parser_error.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def parser_error; end
# Returns the value of attribute path.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def path; end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#157
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#156
def preceding_line(token); end
# Returns the value of attribute raw_source.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def raw_source; end
# Returns the value of attribute ruby_version.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def ruby_version; end
# The tokens list is always sorted by token position, except for cases when heredoc
# is passed as a method argument. In this case tokens are interleaved by
# heredoc contents' tokens.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#193
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#192
def sorted_tokens; end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#151
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#150
def start_with?(string); end
# Returns the value of attribute tokens.
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20
def tokens; end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#176
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#175
def tokens_within(range_or_node); end
# @return [Boolean]
#
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#77
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#76
def valid_syntax?; end
private
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#200
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#199
def comment_index; end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#312
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#309
def create_parser(ruby_version, parser_engine); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#328
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#325
def first_token_index(range_or_node); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#333
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#330
def last_token_index(range_or_node); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#206
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#205
def parse(source, ruby_version, parser_engine); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#240
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#238
def parser_class(ruby_version, parser_engine); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#338
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#335
def source_range(range_or_node); end
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#223
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#222
def tokenize(parser); end
class << self
- # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#24
+ # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#23
def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end
end
end
-# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#15
+# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#14
RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array)
-# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18
+# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#17
RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array)
# @api private
#
-# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13
+# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#12
RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String)
# A node extension for `irange` and `erange` nodes. This will be used in
@@ -6001,6 +6025,16 @@ class RuboCop::AST::RangeNode < ::RuboCop::AST::Node
def end; end
end
+# A node extension for `rational` nodes. This will be used in place of a plain
+# node when the builder constructs the AST, making its methods available to
+# all `rational` nodes within RuboCop.
+#
+# source://rubocop-ast//lib/rubocop/ast/node/rational_node.rb#8
+class RuboCop::AST::RationalNode < ::RuboCop::AST::Node
+ include ::RuboCop::AST::BasicLiteralNode
+ include ::RuboCop::AST::NumericNode
+end
+
# A node extension for `regexp` nodes. This will be used in place of a plain
# node when the builder constructs the AST, making its methods available
# to all `regexp` nodes within RuboCop.
diff --git a/sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi b/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi
similarity index 99%
rename from sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi
rename to sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi
index 96a61bccf..b2833357f 100644
--- a/sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi
+++ b/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi
@@ -1266,33 +1266,35 @@ RuboCop::Cop::Minitest::LiteralAsActualArgument::RESTRICT_ON_SEND = T.let(T.unsa
#
# source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#30
class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base
- include ::RuboCop::Cop::ConfigurableMax
include ::RuboCop::Cop::VisibilityHelp
include ::RuboCop::Cop::DefNode
include ::RuboCop::Cop::MinitestExplorationHelpers
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#36
+ # source://rubocop/1.65.1/lib/rubocop/cop/exclude_limit.rb#11
+ def max=(value); end
+
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#37
def on_class(class_node); end
private
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#53
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#54
def assertions_count(node); end
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#61
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#62
def assertions_count_based_on_type(node); end
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#76
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#77
def assertions_count_in_assignment(node); end
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#94
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#95
def assertions_count_in_branches(branches); end
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#98
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#99
def max_assertions; end
end
-# source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#34
+# source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#33
RuboCop::Cop::Minitest::MultipleAssertions::MSG = T.let(T.unsafe(nil), String)
# Common functionality for `AssertNil` and `RefuteNil` cops.
@@ -2650,40 +2652,45 @@ module RuboCop::Minitest::AssertOffense
# source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#133
def assert_correction(correction, loop: T.unsafe(nil)); end
+ # @raise [RuboCop::Runner::InfiniteCorrectionLoop]
+ #
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#158
+ def assert_no_corrections; end
+
# source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#95
def assert_no_offenses(source, file = T.unsafe(nil)); end
# source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#106
def assert_offense(source, file = T.unsafe(nil), **replacements); end
- # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#195
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#209
def configuration; end
# source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#85
def format_offense(source, **replacements); end
- # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#163
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#177
def inspect_source(source, cop, file = T.unsafe(nil)); end
- # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#170
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#184
def investigate(cop, processed_source); end
- # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#182
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#196
def parse_source!(source, file = T.unsafe(nil)); end
- # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#217
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#231
def parser_engine; end
- # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#203
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#217
def registry; end
- # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#212
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#226
def ruby_version; end
# source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#78
def setup; end
- # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#158
+ # source://rubocop-minitest//lib/rubocop/minitest/assert_offense.rb#172
def setup_assertion; end
end
diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi
similarity index 93%
rename from sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi
rename to sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi
index 69266e924..dcdaf54a1 100644
--- a/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi
+++ b/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi
@@ -230,7 +230,7 @@ RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.un
# sig { void }
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#19
-class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::Sorbet::SignatureHelp
@@ -321,10 +321,12 @@ end
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#22
RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String)
-# 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, after the encoding comment if any.
#
# The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal.
#
+# The ordering is for consistency only, except for the encoding comment which must be first, if present.
+#
# For example, the following bad ordering:
#
# ```ruby
@@ -340,42 +342,42 @@ RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String)
# Only `(en)?coding`, `typed`, `warn_indent` and `frozen_string_literal` magic comments are considered,
# other comments or magic comments are left in the same place.
#
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#30
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#32
class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil
include ::RuboCop::Cop::RangeHelp
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#42
- def autocorrect(_node); end
-
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#33
- def investigate(processed_source); end
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#35
+ def on_new_investigation; end
protected
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#93
+ def autocorrect(corrector); end
+
# checks
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#92
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#70
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#84
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#62
def extract_magic_comments(processed_source); end
end
-# 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#46
RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp)
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#70
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#48
RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_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#47
RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp)
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#79
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#57
RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp)
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#72
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#50
RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash)
# Checks that every method definition and attribute accessor has a Sorbet signature.
@@ -399,87 +401,88 @@ RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil),
# * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped')
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#27
-class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Sorbet::SignatureHelp
+ extend ::RuboCop::Cop::AutoCorrector
# @return [EnforceSignatures] a new instance of EnforceSignatures
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#30
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#31
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#36
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#37
def accessor?(param0 = T.unsafe(nil)); end
- # 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#40
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#41
def on_def(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#44
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#45
def on_defs(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#48
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#49
def on_send(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#52
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#53
def on_signature(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#75
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#57
def scope(node); end
private
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#84
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#79
+ def autocorrect(corrector, node); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#66
def check_node(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#95
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#96
def param_type_placeholder; end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#99
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#100
def return_type_placeholder; end
end
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#103
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104
class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion
# @return [SigSuggestion] a new instance of SigSuggestion
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#106
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#107
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#104
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
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#104
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
def params=(_arg0); end
# Returns the value of attribute returns.
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
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#104
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105
def returns=(_arg0); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#114
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#115
def to_autocorrect; end
private
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#126
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#127
def generate_params; end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#138
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#139
def generate_return; end
end
@@ -503,15 +506,15 @@ 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#40
- def autocorrect(_node); end
-
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#29
- def investigate(processed_source); end
+ def on_new_investigation; end
protected
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#56
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#50
+ def autocorrect(corrector); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#44
def extract_all_sigils(processed_source); end
end
@@ -666,15 +669,15 @@ RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsa
# # sorbet/rbi/any/path/for/file.rbi
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#23
-class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#26
- def investigate(processed_source); end
+ def on_new_investigation; end
private
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#58
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#55
def allowed_paths; end
end
@@ -995,6 +998,25 @@ 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)
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#6
+module RuboCop::Cop::Sorbet::GemVersionAnnotationHelper
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#9
+ def gem_version_annotations; end
+
+ private
+
+ # @return [Boolean]
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#17
+ def gem_version_annotation?(comment); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#21
+ def gem_versions(comment); end
+end
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#7
+RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsafe(nil), String)
+
# Makes the Sorbet typed sigil mandatory in all files.
#
# Options:
@@ -1008,7 +1030,7 @@ RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), Strin
class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil
# @return [Boolean]
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#20
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#18
def require_sigil_on_all_files?; end
end
@@ -1083,7 +1105,7 @@ RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsaf
# def foo(b:, a: 1); end
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#20
-class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Sorbet::SignatureHelp
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23
@@ -1444,6 +1466,42 @@ end
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#18
RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String)
+# Checks that gem versions in RBI annotations are properly formatted per the Bundler gem specification.
+#
+# @example
+# # bad
+# # @version > not a version number
+#
+# # good
+# # @version = 1
+#
+# # good
+# # @version > 1.2.3
+#
+# # good
+# # @version <= 4.3-preview
+#
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#21
+class RuboCop::Cop::Sorbet::ValidGemVersionAnnotations < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::Sorbet::GemVersionAnnotationHelper
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#27
+ def on_new_investigation; end
+
+ private
+
+ # @return [Boolean]
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#50
+ def valid_version?(version_string); end
+end
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#24
+RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::MSG = T.let(T.unsafe(nil), String)
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#25
+RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsafe(nil), Array)
+
# Checks that every Ruby file contains a valid Sorbet sigil.
# Adapted from: https://gist.github.com/clarkdave/85aca4e16f33fd52aceb6a0a29936e52
#
@@ -1458,69 +1516,69 @@ RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String)
# 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#20
-class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#36
- def autocorrect(_node); end
+class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
- # So we can properly subclass this cop
- #
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#23
- def investigate(processed_source); end
+ def on_new_investigation; end
protected
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#150
+ def autocorrect(corrector); end
+
# checks
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#71
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#55
def check_sigil_present(sigil); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#131
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#118
def check_strictness_level(sigil, strictness); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#109
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#94
def check_strictness_not_empty(sigil, strictness); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#120
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#106
def check_strictness_valid(sigil, strictness); end
# Default is `nil`
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#181
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#184
def exact_strictness; end
# extraction
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#59
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#43
def extract_sigil(processed_source); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#65
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#49
def extract_strictness(sigil); end
# Default is `nil`
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#175
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#178
def minimum_strictness; end
# Default is `false`
#
# @return [Boolean]
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#164
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#167
def require_sigil_on_all_files?; end
# Default is `'false'`
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#169
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#172
def suggested_strictness; end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#87
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#72
def suggested_strictness_level; end
end
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#55
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#39
RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp)
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#54
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#38
RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array)
# Disallows the usage of `.void.checked(:tests)`.
diff --git a/sorbet/rbi/gems/rubocop@1.64.1.rbi b/sorbet/rbi/gems/rubocop@1.65.1.rbi
similarity index 98%
rename from sorbet/rbi/gems/rubocop@1.64.1.rbi
rename to sorbet/rbi/gems/rubocop@1.65.1.rbi
index 14f8415f9..2331df08c 100644
--- a/sorbet/rbi/gems/rubocop@1.64.1.rbi
+++ b/sorbet/rbi/gems/rubocop@1.65.1.rbi
@@ -2411,7 +2411,7 @@ module RuboCop::Cop::Alignment
# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#45
def each_bad_alignment(items, base_column); end
- # @deprecated Use processed_source.comment_at_line(line)
+ # @deprecated Use processed_source.line_with_comment?(line)
#
# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#69
def end_of_line_comment(line); end
@@ -2424,7 +2424,7 @@ module RuboCop::Cop::Alignment
# @api private
#
- # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#74
+ # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#78
def register_offense(offense_node, message_node); end
# @api public
@@ -2537,21 +2537,20 @@ module RuboCop::Cop::AllowedMethods
# @api public
#
- # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#21
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#27
def allowed_methods; end
- # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#29
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#35
def cop_config_allowed_methods; end
- # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#33
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#39
def cop_config_deprecated_values; end
- # @api public
# @deprecated Use allowed_method? instead
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13
- def ignored_method?(name); end
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#18
+ def ignored_method?; end
end
# This module encapsulates the ability to ignore certain lines when
@@ -2566,31 +2565,31 @@ module RuboCop::Cop::AllowedPattern
# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10
def allowed_line?(line); end
- # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#30
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#42
def allowed_patterns; end
- # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#46
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#58
def cop_config_deprecated_methods_values; end
- # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#40
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#52
def cop_config_patterns_values; end
# @deprecated Use allowed_line? instead
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10
- def ignored_line?(line); end
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#21
+ def ignored_line?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#29
def matches_allowed_pattern?(line); end
- # @deprecated Use matches_allowed_pattern?? instead
+ # @deprecated Use matches_allowed_pattern? instead
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23
- def matches_ignored_pattern?(line); end
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#34
+ def matches_ignored_pattern?; end
end
# This module encapsulates the ability to allow certain receivers in a cop.
@@ -4859,7 +4858,7 @@ end
# Handles `Max` configuration parameters, especially setting them to an
# appropriate value with --auto-gen-config.
#
-# @deprecated Use `exclude_limit ParameterName` instead.
+# @deprecated Use `exclude_limit ` instead.
#
# source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#8
module RuboCop::Cop::ConfigurableMax
@@ -4868,7 +4867,7 @@ module RuboCop::Cop::ConfigurableMax
# source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#11
def max=(value); end
- # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#19
+ # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#23
def max_parameter_name; end
end
@@ -4901,22 +4900,22 @@ RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash)
#
# source://rubocop//lib/rubocop/cop/cop.rb#11
class RuboCop::Cop::Cop < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/cop.rb#53
+ # source://rubocop//lib/rubocop/cop/cop.rb#65
def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end
# Called before any investigation
#
# @api private
#
- # source://rubocop//lib/rubocop/cop/cop.rb#103
+ # source://rubocop//lib/rubocop/cop/cop.rb#121
def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end
# @deprecated
#
- # source://rubocop//lib/rubocop/cop/cop.rb#82
+ # source://rubocop//lib/rubocop/cop/cop.rb#97
def corrections; end
- # source://rubocop//lib/rubocop/cop/cop.rb#70
+ # source://rubocop//lib/rubocop/cop/cop.rb#82
def find_location(node, loc); end
# Returns the value of attribute offenses.
@@ -4926,53 +4925,53 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base
# Called after all on_... have been called
#
- # source://rubocop//lib/rubocop/cop/cop.rb#96
+ # source://rubocop//lib/rubocop/cop/cop.rb#114
def on_investigation_end; end
# Called before all on_... have been called
#
- # source://rubocop//lib/rubocop/cop/cop.rb#90
+ # source://rubocop//lib/rubocop/cop/cop.rb#108
def on_new_investigation; end
# @deprecated Use class method
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/cop.rb#76
+ # source://rubocop//lib/rubocop/cop/cop.rb#88
def support_autocorrect?; end
private
- # source://rubocop//lib/rubocop/cop/cop.rb#121
+ # source://rubocop//lib/rubocop/cop/cop.rb#139
def apply_correction(corrector); end
# Override Base
#
- # source://rubocop//lib/rubocop/cop/cop.rb#117
+ # source://rubocop//lib/rubocop/cop/cop.rb#135
def callback_argument(_range); end
- # source://rubocop//lib/rubocop/cop/cop.rb#138
+ # source://rubocop//lib/rubocop/cop/cop.rb#156
def correction_lambda; end
- # source://rubocop//lib/rubocop/cop/cop.rb#144
+ # source://rubocop//lib/rubocop/cop/cop.rb#162
def dedupe_on_node(node); end
# Just for legacy
#
# @yield [corrector]
#
- # source://rubocop//lib/rubocop/cop/cop.rb#126
+ # source://rubocop//lib/rubocop/cop/cop.rb#144
def emulate_v0_callsequence(corrector); end
- # source://rubocop//lib/rubocop/cop/cop.rb#157
+ # source://rubocop//lib/rubocop/cop/cop.rb#175
def range_for_original(range); end
- # source://rubocop//lib/rubocop/cop/cop.rb#151
+ # source://rubocop//lib/rubocop/cop/cop.rb#169
def suppress_clobbering; end
class << self
# @deprecated Use Registry.all
#
- # source://rubocop//lib/rubocop/cop/cop.rb#44
+ # source://rubocop//lib/rubocop/cop/cop.rb#48
def all; end
# source://rubocop//lib/rubocop/cop/cop.rb#29
@@ -4980,7 +4979,7 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base
# @deprecated Use Registry.qualified_cop_name
#
- # source://rubocop//lib/rubocop/cop/cop.rb#49
+ # source://rubocop//lib/rubocop/cop/cop.rb#57
def qualified_cop_name(name, origin); end
# @deprecated Use Registry.global
@@ -5092,7 +5091,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter
# Legacy
#
- # source://parser/3.3.2.0/lib/parser/source/tree_rewriter.rb#252
+ # source://parser/3.3.4.2/lib/parser/source/tree_rewriter.rb#252
def rewrite; end
# Swaps sources at the given ranges.
@@ -5642,9 +5641,38 @@ module RuboCop::Cop::GemDeclaration
def gem_declaration?(param0 = T.unsafe(nil)); end
end
-# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#5
+# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#5
module RuboCop::Cop::Gemspec; end
+# Prefer `add_dependency` over `add_runtime_dependency` as the latter is
+# considered soft-deprecated.
+#
+# @example
+#
+# # bad
+# Gem::Specification.new do |spec|
+# spec.add_runtime_dependency('rubocop')
+# end
+#
+# # good
+# Gem::Specification.new do |spec|
+# spec.add_dependency('rubocop')
+# end
+#
+# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#21
+class RuboCop::Cop::Gemspec::AddRuntimeDependency < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ # source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#28
+ def on_send(node); end
+end
+
+# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#24
+RuboCop::Cop::Gemspec::AddRuntimeDependency::MSG = T.let(T.unsafe(nil), String)
+
+# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#26
+RuboCop::Cop::Gemspec::AddRuntimeDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
# Enforce that gem dependency version specifications or a commit reference (branch,
# ref, or tag) are either required or forbidden.
#
@@ -5947,8 +5975,8 @@ RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsaf
#
# # good
# Gem::Specification.new do |spec|
-# spec.add_runtime_dependency('parallel', '~> 1.10')
-# spec.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0')
+# spec.add_dependency('parallel', '~> 1.10')
+# spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0')
# end
#
# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#37
@@ -6251,15 +6279,15 @@ RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(ni
# # bad
# Gem::Specification.new do |spec|
# if RUBY_VERSION >= '3.0'
-# spec.add_runtime_dependency 'gem_a'
+# spec.add_dependency 'gem_a'
# else
-# spec.add_runtime_dependency 'gem_b'
+# spec.add_dependency 'gem_b'
# end
# end
#
# # good
# Gem::Specification.new do |spec|
-# spec.add_runtime_dependency 'gem_a'
+# spec.add_dependency 'gem_a'
# end
#
# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28
@@ -7063,7 +7091,7 @@ RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil),
# @deprecated IgnoredMethods class has been replaced with AllowedMethods.
#
-# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#40
+# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#46
RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods
# Handles adding and checking ignored nodes.
@@ -7091,7 +7119,7 @@ end
# @deprecated IgnoredPattern class has been replaced with AllowedPattern.
#
-# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#54
+# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#66
RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern
# Common functionality for checking integer nodes.
@@ -7468,7 +7496,7 @@ RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), St
# right-hand-side of a multi-line assignment.
#
# The indentation of the remaining lines can be corrected with
-# other cops such as `IndentationConsistency` and `EndAlignment`.
+# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`.
#
# @example
# # bad
@@ -7483,7 +7511,7 @@ RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), St
# 'bar'
# end
#
-# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#24
+# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#25
class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::CheckAssignment
include ::RuboCop::Cop::Alignment
@@ -7491,17 +7519,17 @@ class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#42
+ # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#43
def autocorrect(corrector, node); end
- # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#33
+ # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#34
def check_assignment(node, rhs); end
- # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#46
+ # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#47
def leftmost_multiple_assignment(node); end
end
-# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#29
+# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#30
RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String)
# Checks whether the end keyword of `begin` is aligned properly.
@@ -8489,43 +8517,40 @@ RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# if
# some_condition
# do_something
# end
-# @example
#
# # good
-#
# if some_condition
# do_something
# end
#
-# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25
+# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#21
class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#31
+ # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#27
def on_if(node); end
- # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37
+ # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33
def on_until(node); end
- # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37
+ # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33
def on_while(node); end
private
- # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#44
+ # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#40
def check(node); end
- # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#58
+ # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#54
def message(condition); end
end
-# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#29
+# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25
RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String)
# Checks whether the end keywords of method definitions are
@@ -10545,8 +10570,8 @@ RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), Strin
# second_params
# @example EnforcedStyle: special_for_inner_method_call
# # The first argument should normally be indented one step more than
-# # the preceding line, but if it's a argument for a method call that
-# # is itself a argument in a method call, then the inner argument
+# # the preceding line, but if it's an argument for a method call that
+# # is itself an argument in a method call, then the inner argument
# # should be indented relative to the inner method.
#
# # good
@@ -11782,7 +11807,7 @@ RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(ni
# Checks the indentation of the here document bodies. The bodies
# are indented one step.
#
-# Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default),
+# NOTE: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default),
# this cop does not add any offenses for long here documents to
# avoid ``Layout/LineLength``'s offenses.
#
@@ -12772,29 +12797,29 @@ RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_IN
# split across lines. These include arrays, hashes, and
# method calls with argument lists.
#
-# If autocorrection is enabled, the following Layout cops
+# If autocorrection is enabled, the following cops
# are recommended to further format the broken lines.
# (Many of these are enabled by default.)
#
-# * ArgumentAlignment
-# * ArrayAlignment
-# * BlockAlignment
-# * BlockDelimiters
-# * BlockEndNewline
-# * ClosingParenthesisIndentation
-# * FirstArgumentIndentation
-# * FirstArrayElementIndentation
-# * FirstHashElementIndentation
-# * FirstParameterIndentation
-# * HashAlignment
-# * IndentationWidth
-# * MultilineArrayLineBreaks
-# * MultilineBlockLayout
-# * MultilineHashBraceLayout
-# * MultilineHashKeyLineBreaks
-# * MultilineMethodArgumentLineBreaks
-# * MultilineMethodParameterLineBreaks
-# * ParameterAlignment
+# * `Layout/ArgumentAlignment`
+# * `Layout/ArrayAlignment`
+# * `Layout/BlockAlignment`
+# * `Layout/BlockEndNewline`
+# * `LayoutClosingParenthesisIndentation`
+# * `LayoutFirstArgumentIndentation`
+# * `LayoutFirstArrayElementIndentation`
+# * `LayoutFirstHashElementIndentation`
+# * `LayoutFirstParameterIndentation`
+# * `LayoutHashAlignment`
+# * `LayoutIndentationWidth`
+# * `LayoutMultilineArrayLineBreaks`
+# * `LayoutMultilineBlockLayout`
+# * `LayoutMultilineHashBraceLayout`
+# * `LayoutMultilineHashKeyLineBreaks`
+# * `LayoutMultilineMethodArgumentLineBreaks`
+# * `LayoutMultilineMethodParameterLineBreaks`
+# * `Layout/ParameterAlignment`
+# * `Style/BlockDelimiters`
#
# Together, these cops will pretty print hashes, arrays,
# method calls, etc. For example, let's say the max columns
@@ -15132,44 +15157,44 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#256
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#259
def align_hash_cop_config; end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#195
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#198
def autocorrect(corrector, range, right_operand); end
# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179
def check_operator(type, operator, right_operand); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#209
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#212
def enclose_operator_with_space(corrector, range); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#236
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#239
def excess_leading_space?(type, operator, with_space); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#251
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254
def excess_trailing_space?(right_operand, with_space); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#274
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#277
def force_equal_sign_alignment?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#260
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#263
def hash_table_style?; end
# @yield [msg]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#190
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#193
def offense(type, operator, with_space, right_operand); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#222
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#225
def offense_message(type, operator, with_space, right_operand); end
# @return [Boolean]
@@ -15184,17 +15209,17 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#278
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#281
def should_not_have_surrounding_space?(operator, right_operand); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#264
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#267
def space_around_exponent_operator?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#268
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#271
def space_around_slash_operator?(right_operand); end
class << self
@@ -16497,7 +16522,7 @@ class RuboCop::Cop::Legacy::Corrector < ::RuboCop::Cop::Corrector
# source://rubocop//lib/rubocop/cop/legacy/corrector.rb#10
def initialize(source, corr = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/legacy/corrector.rb#20
+ # source://rubocop//lib/rubocop/cop/legacy/corrector.rb#26
def corrections; end
end
@@ -16664,7 +16689,6 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf
#
# # bad
# some_method a { |val| puts val }
-# @example
#
# # good
# # With parentheses, there's no ambiguity.
@@ -16697,38 +16721,38 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf
# expect { do_something }.to change { object.attribute }
# expect { do_something }.to not_change { object.attribute }
#
-# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#54
+# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#52
class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedMethods
include ::RuboCop::Cop::AllowedPattern
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62
def on_csend(node); end
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62
def on_send(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#85
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#83
def allowed_method_pattern?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#79
def ambiguous_block_association?(send_node); end
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#91
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#89
def message(send_node); end
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#97
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#95
def wrap_in_parentheses(corrector, node); end
end
-# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#60
+# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#58
RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String)
# Checks for ambiguous operators in the first argument of a
@@ -16741,51 +16765,50 @@ RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String
# # The `*` is interpreted as a splat operator but it could possibly be
# # a `*` method invocation (i.e. `do_something.*(some_array)`).
# do_something *some_array
-# @example
#
# # good
#
# # With parentheses, there's no ambiguity.
# do_something(*some_array)
#
-# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#23
+# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#21
class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#45
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#43
def on_new_investigation; end
private
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#64
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#62
def find_offense_node_by(diagnostic); end
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#82
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#80
def message(diagnostic); end
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#92
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#90
def offense_node(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#88
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#86
def offense_position?(node, diagnostic); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#101
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#99
def unary_operator?(node, diagnostic); end
class << self
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#41
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#39
def autocorrect_incompatible_with; end
end
end
-# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#26
+# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#24
RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash)
-# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#36
+# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#34
RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String)
# Looks for expressions containing multiple binary operators
@@ -16951,40 +16974,39 @@ RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String)
# # but it could possibly be `/` method invocations.
# # (i.e. `do_something./(pattern)./(i)`)
# do_something /pattern/i
-# @example
#
# # good
#
# # With parentheses, there's no ambiguity.
# do_something(/pattern/i)
#
-# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#24
+# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#22
class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#31
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#29
def on_new_investigation; end
private
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#56
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#54
def find_offense_node(node, regexp_receiver); end
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#49
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#47
def find_offense_node_by(diagnostic); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#67
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#65
def first_argument_is_regexp?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#71
+ # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#69
def method_chain_to_regexp_receiver?(node, regexp_receiver); end
end
-# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#27
+# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#25
RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String)
# Checks for assignments in the conditions of
@@ -17150,7 +17172,6 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni
#
# # good
# true
-# @example
#
# # bad
# :false
@@ -17158,23 +17179,23 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni
# # good
# false
#
-# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#29
+# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#27
class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35
+ # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#33
def boolean_symbol?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#37
+ # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35
def on_sym(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#50
+ # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#48
def autocorrect(corrector, node); end
end
-# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#32
+# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#30
RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String)
# Checks for circular argument references in optional keyword
@@ -17185,54 +17206,45 @@ RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# def bake(pie: pie)
# pie.heat_up
# end
-# @example
#
# # good
-#
# def bake(pie:)
# pie.refrigerate
# end
-# @example
#
# # good
-#
# def bake(pie: self.pie)
# pie.feed_to(user)
# end
-# @example
#
# # bad
-#
# def cook(dry_ingredients = dry_ingredients)
# dry_ingredients.reduce(&:+)
# end
-# @example
#
# # good
-#
# def cook(dry_ingredients = self.dry_ingredients)
# dry_ingredients.combine
# end
#
-# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50
+# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#37
class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#40
def on_kwoptarg(node); end
- # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#57
+ # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#44
def on_optarg(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#63
+ # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50
def check_for_circular_argument_references(arg_name, arg_value); end
end
-# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#51
+# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#38
RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String)
# Do not define constants within a block, since the block's scope does not
@@ -17479,7 +17491,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String)
# binding.pry
# do_something
# end
-# @example
#
# # bad (ok during development)
#
@@ -17488,7 +17499,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String)
# byebug
# do_something
# end
-# @example
#
# # good
#
@@ -17508,50 +17518,50 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String)
#
# require 'my_debugger/start'
#
-# source://rubocop//lib/rubocop/cop/lint/debugger.rb#78
+# source://rubocop//lib/rubocop/cop/lint/debugger.rb#74
class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78
def on_send(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#142
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#138
def assumed_argument?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#121
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117
def assumed_usage_context?(node); end
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#131
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#127
def chained_method_name(send_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#108
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#104
def debugger_method?(send_node); end
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#94
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90
def debugger_methods; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#114
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#110
def debugger_require?(send_node); end
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#101
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#97
def debugger_requires; end
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#86
def message(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/debugger.rb#80
+# source://rubocop//lib/rubocop/cop/lint/debugger.rb#76
RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/debugger.rb#79
+# source://rubocop//lib/rubocop/cop/lint/debugger.rb#75
RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String)
# Checks for uses of the deprecated class method usages.
@@ -17688,25 +17698,17 @@ RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil),
#
# @example
#
-# # Example for OpenSSL::Cipher instantiation.
-#
# # bad
# OpenSSL::Cipher::AES.new(128, :GCM)
#
# # good
# OpenSSL::Cipher.new('aes-128-gcm')
-# @example
-#
-# # Example for OpenSSL::Digest instantiation.
#
# # bad
# OpenSSL::Digest::SHA256.new
#
# # good
# OpenSSL::Digest.new('SHA256')
-# @example
-#
-# # Example for ::Digest inherited class methods.
#
# # bad
# OpenSSL::Digest::SHA256.digest('foo')
@@ -17714,51 +17716,51 @@ RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil),
# # good
# OpenSSL::Digest.digest('SHA256', 'foo')
#
-# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#40
+# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#30
class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#39
def algorithm_const(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#59
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49
def digest_const?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#63
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#53
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#100
def algorithm_name(node); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#75
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#65
def autocorrect(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#139
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#129
def build_cipher_arguments(node, algorithm_name, no_arguments); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#102
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#92
def correction_range(node); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#87
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#77
def message(node); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#106
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#96
def openssl_class(node); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#128
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#118
def replacement_args(node); end
- # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#120
+ # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110
def sanitize_arguments(arguments); end
end
-# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#44
+# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#34
RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#46
+# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#36
RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array)
# Checks constructors for disjunctive assignments (`||=`) that should
@@ -17955,17 +17957,14 @@ RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# case x
# when 'first'
# do_something
# when 'first'
# do_something_else
# end
-# @example
#
# # good
-#
# case x
# when 'first'
# do_something
@@ -17973,13 +17972,13 @@ RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String)
# do_something_else
# end
#
-# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#30
+# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#26
class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#33
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#29
def on_case(case_node); end
end
-# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#31
+# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#27
RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String)
# Checks that there are no repeated conditions used in if 'elsif'.
@@ -18016,23 +18015,20 @@ RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# hash = { food: 'apple', food: 'orange' }
-# @example
#
# # good
-#
# hash = { food: 'apple', other_food: 'orange' }
#
-# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#22
+# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#18
class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Duplication
- # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#27
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#23
def on_hash(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#25
+# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21
RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String)
# Checks for duplicated magic comments.
@@ -18184,7 +18180,6 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# def foo
# 1
# end
@@ -18192,19 +18187,15 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String)
# def foo
# 2
# end
-# @example
#
# # bad
-#
# def foo
# 1
# end
#
# alias foo bar
-# @example
#
# # good
-#
# def foo
# 1
# end
@@ -18212,98 +18203,96 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String)
# def bar
# 2
# end
-# @example
#
# # good
-#
# def foo
# 1
# end
#
# alias bar foo
#
-# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#52
+# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#42
class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base
# @return [DuplicateMethods] a new instance of DuplicateMethods
#
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#57
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#47
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#98
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#88
def alias_method?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#85
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#75
def method_alias?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#89
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#79
def on_alias(node); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#63
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53
def on_def(node); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#72
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#62
def on_defs(node); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#104
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#94
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#103
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#93
def sym_name(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#117
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#107
def check_const_receiver(node, name, const_name); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#124
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#114
def check_self_receiver(node, name); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#198
def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#136
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#126
def found_instance_method(node, name); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#159
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149
def found_method(node, method_name); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#139
def found_sclass_method(node, name); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#186
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#176
def location(node); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#218
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208
def lookup_constant(node, const_name); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#131
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#121
def message_for_dup(node, method_name, key); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#178
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#168
def method_key(node, method_name); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#194
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#184
def on_attr(node, attr_name, args); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#240
def possible_dsl?(node); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#236
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#226
def qualified_name(enclosing, namespace, mod_name); end
- # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#260
+ # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250
def source_location(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#55
+# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#45
RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53
+# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#43
RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#54
+# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#44
RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Checks for duplicate elements in Regexp character classes.
@@ -18460,31 +18449,28 @@ RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# sum = numbers.each_with_object(0) { |e, a| a += e }
-# @example
#
# # good
-#
# num = 0
# sum = numbers.each_with_object(num) { |e, a| a += e }
#
-# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#24
+# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#20
class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29
+ # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25
def each_with_object?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33
+ # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29
def on_csend(node); end
- # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33
+ # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29
def on_send(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25
+# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#21
RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#26
+# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#22
RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Checks for odd `else` block layout - like
@@ -18504,7 +18490,6 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni
# else do_this
# do_that
# end
-# @example
#
# # good
#
@@ -18524,28 +18509,28 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni
# do_that
# end
#
-# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#43
+# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#41
class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Alignment
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#50
+ # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48
def on_if(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#81
+ # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#79
def autocorrect(corrector, node, first_else); end
- # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#61
+ # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#59
def check(node); end
- # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#71
+ # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#69
def check_else(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48
+# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#46
RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String)
# Checks for blocks without a body.
@@ -18821,52 +18806,45 @@ end
# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#68
RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String)
-# Checks for empty `ensure` blocks
+# Checks for empty `ensure` blocks.
#
# @example
#
# # bad
-#
# def some_method
# do_something
# ensure
# end
-# @example
#
# # bad
-#
# begin
# do_something
# ensure
# end
-# @example
#
# # good
-#
# def some_method
# do_something
# ensure
# do_something_else
# end
-# @example
#
# # good
-#
# begin
# do_something
# ensure
# do_something_else
# end
#
-# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#45
+# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#35
class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#50
+ # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#40
def on_ensure(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#48
+# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#38
RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String)
# Checks for the presence of empty expressions.
@@ -19001,24 +18979,21 @@ RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# "result is #{}"
-# @example
#
# # good
-#
# "result is #{some_result}"
#
-# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19
+# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#15
class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Interpolation
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#25
+ # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#21
def on_interpolation(begin_node); end
end
-# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#23
+# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19
RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String)
# Checks for the presence of `when` branches without a body.
@@ -19031,7 +19006,6 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String)
# do_something
# when baz
# end
-# @example
#
# # good
# case condition
@@ -19059,15 +19033,15 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String)
# # do nothing
# end
#
-# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#47
+# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#45
class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base
include ::RuboCop::Cop::CommentsHelp
- # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#52
+ # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50
def on_case(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50
+# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#48
RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String)
# Checks for `return` from an `ensure` block.
@@ -19080,17 +19054,14 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# def foo
# do_something
# ensure
# cleanup
# return self
# end
-# @example
#
# # good
-#
# def foo
# do_something
# self
@@ -19098,8 +19069,7 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String)
# cleanup
# end
#
-# # also good
-#
+# # good
# def foo
# begin
# do_something
@@ -19111,16 +19081,16 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String)
# cleanup
# end
#
-# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#47
+# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#42
class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#48
def on_ensure(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51
+# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#46
RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String)
# Emulates the following Ruby warnings in Ruby 2.6.
@@ -19293,10 +19263,10 @@ class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89
+ # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#91
def check_numeric_returning_method(node); end
- # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73
+ # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#75
def check_send(node); end
# @return [Boolean]
@@ -19332,21 +19302,18 @@ RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
# @example
#
# # bad
-#
# float = 3.0e400
-# @example
#
# # good
-#
# float = 42.9
#
-# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#21
+# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#17
class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#24
+ # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#20
def on_float(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#22
+# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#18
RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String)
# This lint sees if there is a mismatch between the number of
@@ -19360,138 +19327,131 @@ RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# format('A value: %s and another: %i', a_value)
-# @example
#
# # good
-#
# format('A value: %s and another: %i', a_value, another)
-# @example
#
# # bad
-#
# format('Unnumbered format: %s and numbered: %2$s', a_value, another)
-# @example
#
# # good
-#
# format('Numbered format: %1$s and numbered %2$s', a_value, another)
#
-# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37
+# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#27
class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#90
def called_on_string?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#49
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#137
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#127
def count_format_matches(node); end
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109
def count_matches(node); end
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#141
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#131
def count_percent_matches(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#129
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119
def countable_format?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#133
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#123
def countable_percent?(node); end
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#153
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#143
def expected_fields_count(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#168
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#158
def format?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#146
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#136
def format_method?(name, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#64
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#54
def format_string?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#115
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105
def heredoc?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#68
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#58
def invalid_format_string?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#91
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#81
def matched_arguments_count?(expected, passed); end
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#186
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176
def message(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#95
def method_with_format_args?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#77
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#67
def offending_node?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#166
def percent?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#99
def splat_args?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#172
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#162
def sprintf?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#195
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#185
def string_type?(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#44
+# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#34
RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String)
# http://rubular.com/r/CvpbxkcTzy
#
-# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39
+# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#29
RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#41
+# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#31
RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#47
+# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37
RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#45
+# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#35
RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#46
+# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#36
RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array)
# Prefer using `Hash#compare_by_identity` rather than using `object_id`
@@ -19671,12 +19631,9 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil),
# @example
#
# # bad
-#
# array = ['Item 1' 'Item 2']
-# @example
#
# # good
-#
# array = ['Item 1Item 2']
# array = ['Item 1' + 'Item 2']
# array = [
@@ -19684,43 +19641,45 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil),
# 'Item 2'
# ]
#
-# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#25
+# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#21
class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#33
+ extend ::RuboCop::Cop::AutoCorrector
+
+ # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32
def on_dstr(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#83
+ # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86
def display_str(node); end
- # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#50
+ # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#53
def each_bad_cons(node); end
- # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#65
+ # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#68
def ending_delimiter(str); end
- # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#91
+ # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#94
def str_content(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#75
+ # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#78
def string_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#79
+ # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82
def string_literals?(node1, node2); end
end
-# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28
+# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26
RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30
+# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28
RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26
+# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#24
RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String)
# Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0.
@@ -19782,7 +19741,6 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T
# @example
#
# # bad
-#
# class C
# private
#
@@ -19790,10 +19748,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T
# puts 'hi'
# end
# end
-# @example
#
# # good
-#
# class C
# def self.method
# puts 'hi'
@@ -19801,10 +19757,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T
#
# private_class_method :method
# end
-# @example
#
# # good
-#
# class C
# class << self
# private
@@ -19815,49 +19769,49 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T
# end
# end
#
-# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48
+# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#41
class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52
def on_class(node); end
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52
def on_module(node); end
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#55
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48
def private_class_methods(param0); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#109
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#102
def access_modifier?(node); end
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#66
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59
def check_node(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#113
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#106
def correct_visibility?(node, modifier, ignored_methods); end
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#78
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#71
def format_message(modifier); end
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#91
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#84
def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end
- # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#74
+ # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#67
def private_class_method_names(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#51
+# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#44
RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52
+# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#45
RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#49
+# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#42
RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String)
# Looks for error classes inheriting from `Exception`.
@@ -19936,33 +19890,30 @@ RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar
# @example
#
# # bad
-#
# foo = 'something with #{interpolation} inside'
-# @example
#
# # good
-#
# foo = "something with #{interpolation} inside"
#
-# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#25
+# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#21
class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#31
+ # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#27
def on_str(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#42
+ # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#38
def autocorrect(corrector, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#49
def heredoc?(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28
+# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#24
RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String)
# Emulates the following Ruby warning in Ruby 3.3.
@@ -20205,84 +20156,81 @@ RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), Str
# @example
#
# # bad
-#
# "result is #{10}"
-# @example
#
# # good
-#
# "result is 10"
#
-# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#19
+# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#15
class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Interpolation
include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::PercentLiteral
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#28
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#24
def on_interpolation(begin_node); end
private
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#62
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#58
def autocorrected_value(node); end
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#108
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#104
def autocorrected_value_for_array(node); end
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#114
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#110
def autocorrected_value_for_hash(node); end
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#84
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#80
def autocorrected_value_for_string(node); end
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#92
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#88
def autocorrected_value_for_symbol(node); end
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#125
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121
def autocorrected_value_in_hash(node); end
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#99
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#95
def autocorrected_value_in_hash_for_symbol(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#155
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151
def ends_heredoc_line?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#163
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#159
def in_array_percent_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#48
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#44
def offending?(node); end
# Does node print its own source when converted to a string?
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#146
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#142
def prints_as_self?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#147
def space_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#56
+ # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#52
def special_keyword?(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#26
+# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#22
RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25
+# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#21
RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String)
# Checks for uses of `begin...end while/until something`.
@@ -20295,15 +20243,6 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String)
# begin
# do_something
# end while some_condition
-# @example
-#
-# # bad
-#
-# # using until
-# begin
-# do_something
-# end until some_condition
-# @example
#
# # good
#
@@ -20312,7 +20251,13 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String)
# do_something
# break unless some_condition
# end
-# @example
+#
+# # bad
+#
+# # using until
+# begin
+# do_something
+# end until some_condition
#
# # good
#
@@ -20322,29 +20267,29 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String)
# break if some_condition
# end
#
-# source://rubocop//lib/rubocop/cop/lint/loop.rb#50
+# source://rubocop//lib/rubocop/cop/lint/loop.rb#44
class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/loop.rb#59
+ # source://rubocop//lib/rubocop/cop/lint/loop.rb#53
def on_until_post(node); end
- # source://rubocop//lib/rubocop/cop/lint/loop.rb#55
+ # source://rubocop//lib/rubocop/cop/lint/loop.rb#49
def on_while_post(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/loop.rb#79
+ # source://rubocop//lib/rubocop/cop/lint/loop.rb#73
def build_break_line(node); end
- # source://rubocop//lib/rubocop/cop/lint/loop.rb#75
+ # source://rubocop//lib/rubocop/cop/lint/loop.rb#69
def keyword_and_condition_range(node); end
- # source://rubocop//lib/rubocop/cop/lint/loop.rb#65
+ # source://rubocop//lib/rubocop/cop/lint/loop.rb#59
def register_offense(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/loop.rb#53
+# source://rubocop//lib/rubocop/cop/lint/loop.rb#47
RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String)
# cop disables on wide ranges of code, that latter contributors to
@@ -20690,15 +20635,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
#
@@ -20706,7 +20653,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe
# bar = -> { puts 'hello' }
# bar.call
# end
-# @example
#
# # good
#
@@ -20726,7 +20672,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe
# end
# end
# end
-# @example
#
# # good
#
@@ -20760,49 +20705,46 @@ 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
+# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#91
class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedMethods
include ::RuboCop::Cop::AllowedPattern
- # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#133
+ # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#127
def eval_call?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#138
+ # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#132
def exec_call?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103
+ # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97
def on_def(node); end
- # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103
+ # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97
def on_defs(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#126
+ # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#120
def allowed_method_name?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#121
+ # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#115
def scoping_method_call?(child); end
end
-# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#101
+# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#95
RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String)
# Checks for nested percent literals.
@@ -20868,38 +20810,35 @@ RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array)
# @example
#
# # bad
-#
# result = (1..4).reduce(0) do |acc, i|
# next if i.odd?
# acc + i
# end
-# @example
#
# # good
-#
# result = (1..4).reduce(0) do |acc, i|
# next acc if i.odd?
# acc + i
# end
#
-# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#25
+# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#21
class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28
+ # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24
def on_block(node); end
- # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#42
+ # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38
def on_block_body_of_reduce(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28
+ # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24
def on_numblock(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#49
+ # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#45
def parent_block_node(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#26
+# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#22
RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String)
# Checks for the presence of a `return` inside a `begin..end` block
@@ -20910,16 +20849,13 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# @some_variable ||= begin
# return some_value if some_condition_is_met
#
# do_something
# end
-# @example
#
# # good
-#
# @some_variable ||= begin
# if some_condition_is_met
# some_value
@@ -20929,7 +20865,6 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String)
# end
#
# # good
-#
# some_variable = if some_condition_is_met
# return if another_condition_is_met
#
@@ -20938,19 +20873,19 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String)
# do_something
# end
#
-# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#43
+# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#38
class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46
+ # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41
def on_lvasgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46
+ # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41
def on_op_asgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46
+ # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41
def on_or_asgn(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#44
+# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#39
RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String)
# Checks for non-atomic file operation.
@@ -21638,44 +21573,41 @@ RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), S
# @example
#
# # bad
-#
# %w('foo', "bar")
-# @example
#
# # good
-#
# %w(foo bar)
#
-# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33
+# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#29
class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::PercentLiteral
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44
+ # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#40
def on_array(node); end
- # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#48
+ # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44
def on_percent_literal(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#65
+ # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#61
def contains_quotes_or_commas?(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#38
+# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#34
RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp)
-# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#41
+# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37
RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37
+# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33
RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#39
+# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#35
RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp)
# Checks for colons and commas in %i, e.g. `%i(:foo, :bar)`
@@ -21687,43 +21619,40 @@ RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Re
# @example
#
# # bad
-#
# %i(:foo, :bar)
-# @example
#
# # good
-#
# %i(foo bar)
#
-# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23
+# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#19
class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::PercentLiteral
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30
+ # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#26
def on_array(node); end
- # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#34
+ # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30
def on_percent_literal(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#42
+ # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#38
def autocorrect(corrector, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#52
+ # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#48
def contains_colons_or_commas?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#62
+ # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#58
def non_alphanumeric_literal?(literal); end
end
-# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#27
+# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23
RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String)
# Checks for `raise` or `fail` statements which are
@@ -21789,35 +21718,32 @@ RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra
# @example
#
# # bad
-#
# rand 1
# Kernel.rand(-1)
# rand 1.0
# rand(-1.0)
-# @example
#
# # good
-#
# 0 # just use 0 instead
#
-# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#23
+# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#19
class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#32
+ # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28
+ # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24
def rand_one?(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#40
+ # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#36
def message(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24
+# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#20
RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#25
+# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#21
RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# removed without causing any offenses to be reported. It's implemented
@@ -21998,13 +21924,14 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.le
# that cop checks whether any cop was actually enabled.
#
# @example
+#
# # bad
# foo = 1
# # rubocop:enable Layout/LineLength
#
# # good
# foo = 1
-# @example
+#
# # bad
# # rubocop:disable Style/StringLiterals
# foo = "1"
@@ -22018,54 +21945,54 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.le
# # rubocop:enable all
# baz
#
-# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#37
+# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#39
class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::SurroundingSpace
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#46
def on_new_investigation; end
private
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#120
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#122
def all_or_name(name); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#76
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#78
def comment_start(comment); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#80
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#82
def cop_name_indention(comment, name); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#124
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#126
def department?(directive, name); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#71
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#73
def range_of_offense(comment, name); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#95
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#97
def range_to_remove(begin_pos, end_pos, comment); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#84
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#86
def range_with_comma(comment, name); end
# If the list of cops is comma-separated, but without a empty space after the comma,
# we should **not** remove the prepending empty space, thus begin_pos += 1
#
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#114
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#116
def range_with_comma_after(comment, start, begin_pos, end_pos); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#108
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#110
def range_with_comma_before(start, begin_pos, end_pos); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#55
def register_offense(comment, cop_names); end
end
-# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#42
+# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44
RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String)
# Sort globbed results by default in Ruby 3.0.
@@ -22366,7 +22293,7 @@ RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsa
# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87
RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp)
-# Checks for unneeded usages of splat expansion
+# Checks for unneeded usages of splat expansion.
#
# @example
#
@@ -22519,47 +22446,44 @@ RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), St
# @example
#
# # bad
-#
# "result is #{something.to_s}"
# print something.to_s
# puts something.to_s
# warn something.to_s
-# @example
#
# # good
-#
# "result is #{something}"
# print something
# puts something
# warn something
#
-# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27
+# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#23
class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Interpolation
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#38
+ # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#34
def on_interpolation(begin_node); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#46
+ # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#42
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#36
+ # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32
def to_s_without_args?(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#58
+ # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#54
def register_offense(node, context); end
end
-# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#31
+# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27
RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32
+# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#28
RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#33
+# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#29
RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Checks for redundant `with_index`.
@@ -22739,38 +22663,35 @@ RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# if day.is? :tuesday && month == :jan
# # ...
# end
-# @example
#
# # good
-#
# if day.is?(:tuesday) && month == :jan
# # ...
# end
#
-# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#30
+# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#26
class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
- # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35
+ # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31
def on_csend(node); end
- # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35
+ # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#58
+ # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#54
def check_predicate(predicate, node); end
- # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#48
+ # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#44
def check_ternary(ternary, node); end
end
-# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#33
+# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#29
RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String)
# Checks that a range literal is enclosed in parentheses when the end of the range is
@@ -22864,34 +22785,31 @@ RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(n
# @example
#
# # bad
-#
# begin
# do_something
# rescue Exception
# handle_exception
# end
-# @example
#
# # good
-#
# begin
# do_something
# rescue ArgumentError
# handle_exception
# end
#
-# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#27
+# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#23
class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#30
+ # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#26
def on_resbody(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#39
+ # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#35
def targets_exception?(rescue_arg_node); end
end
-# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#28
+# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#24
RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String)
# Check for arguments to `rescue` that will result in a `TypeError`
@@ -22969,7 +22887,6 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String)
# def foo=(bar)
# return 42
# end
-# @example
#
# # good
# def initialize
@@ -22982,18 +22899,18 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String)
# return
# end
#
-# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#34
+# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#32
class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#37
+ # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35
def on_return(return_node); end
private
- # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#51
def non_void_context(return_node); end
end
-# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35
+# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#33
RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String)
# The safe navigation operator returns nil if the receiver is
@@ -23005,28 +22922,25 @@ RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# x&.foo.bar
# x&.foo + bar
# x&.foo[bar]
-# @example
#
# # good
-#
# x&.foo&.bar
# x&.foo || bar
#
-# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#26
+# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#22
class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedMethods
include ::RuboCop::Cop::NilMethods
extend ::RuboCop::Cop::AutoCorrector
extend ::RuboCop::Cop::TargetRubyVersion
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#37
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33
def bad_method?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#44
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#40
def on_send(node); end
private
@@ -23035,31 +22949,31 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base
# @param send_node [RuboCop::AST::SendNode]
# @return [String]
#
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#58
def add_safe_navigation_operator(offense_range:, send_node:); end
# @param corrector [RuboCop::Cop::Corrector]
# @param offense_range [Parser::Source::Range]
# @param send_node [RuboCop::AST::SendNode]
#
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#77
def autocorrect(corrector, offense_range:, send_node:); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#86
def brackets?(send_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90
def require_parentheses?(send_node); end
end
-# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33
+# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#29
RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#34
+# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#30
RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array)
# Check to make sure that if safe navigation is used for a method
@@ -23562,17 +23476,16 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String)
# because `Ractor` should not access outer variables.
# eg. following style is encouraged:
#
-# [source,ruby]
-# ----
-# worker_id, pipe = env
-# Ractor.new(worker_id, pipe) do |worker_id, pipe|
-# end
-# ----
+# [source,ruby]
+# ----
+# worker_id, pipe = env
+# Ractor.new(worker_id, pipe) do |worker_id, pipe|
+# end
+# ----
#
# @example
#
# # bad
-#
# def some_method
# foo = 1
#
@@ -23580,10 +23493,8 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String)
# do_something(foo)
# end
# end
-# @example
#
# # good
-#
# def some_method
# foo = 1
#
@@ -23592,37 +23503,37 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String)
# end
# end
#
-# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45
+# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#41
class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#57
+ # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53
def before_declaring_variable(variable, variable_table); end
- # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93
+ # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#89
def find_conditional_node_from_ascendant(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100
+ # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#96
def node_or_its_ascendant_conditional?(node); end
- # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49
+ # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45
def ractor_block?(param0 = T.unsafe(nil)); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#69
+ # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#65
def same_conditions_node_different_branch?(variable, outer_local_variable); end
- # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#83
+ # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#79
def variable_node(variable); end
class << self
- # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49
def joining_forces; end
end
end
-# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#46
+# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#42
RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String)
# Checks unexpected overrides of the `Struct` built-in methods
@@ -23959,12 +23870,12 @@ class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#83
+ # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#76
def argument_match?(send_arg, def_arg); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#68
+ # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#61
def arguments_match?(arguments, def_node); end
end
@@ -24273,27 +24184,24 @@ RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# 1.is_a?(Fixnum)
# 1.is_a?(Bignum)
-# @example
#
# # good
-#
# 1.is_a?(Integer)
#
-# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#20
+# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#16
class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26
+ # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#22
def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#30
+ # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26
def on_const(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#23
+# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#19
RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String)
# Looks for `reduce` or `inject` blocks where the value returned (implicitly or
@@ -24388,31 +24296,31 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#190
+ # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#191
def acceptable_return?(return_val, element_name); end
# Exclude `begin` nodes inside a `dstr` from being collected by `return_values`
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#198
+ # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#199
def allowed_type?(parent_node); end
- # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#158
+ # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#159
def block_arg_name(node, index); end
- # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#141
+ # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#142
def check_return_values(block_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#175
+ # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#176
def potential_offense?(return_values, block_body, element_name, accumulator_name); end
# Return values in a block are either the value given to next,
# the last line of a multiline block, or the only line of the block
#
- # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#127
+ # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#128
def return_values(block_body_node); end
# Look for an index of the accumulator being returned, except where the index
@@ -24420,7 +24328,7 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base
# This is always an offense, in order to try to catch potential exceptions
# due to type mismatches
#
- # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#166
+ # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#167
def returned_accumulator_index(return_values, accumulator_name, element_name); end
# If the accumulator is used in any return value, the node is acceptable since
@@ -24428,7 +24336,7 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#182
+ # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#183
def returns_accumulator_anywhere?(return_values, accumulator_name); end
end
@@ -24445,14 +24353,12 @@ RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil)
# @example
#
# # bad
-#
# def some_method
# return
# do_something
# end
#
# # bad
-#
# def some_method
# if cond
# return
@@ -24461,40 +24367,38 @@ RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil)
# end
# do_something
# end
-# @example
#
# # good
-#
# def some_method
# do_something
# end
#
-# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#37
+# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#32
class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#55
+ # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#50
def flow_command?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40
+ # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35
def on_begin(node); end
- # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40
+ # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35
def on_kwbegin(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#87
+ # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#82
def check_case(node); end
- # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#81
+ # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#76
def check_if(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#65
+ # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#60
def flow_expression?(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#38
+# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#33
RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String)
# Checks for loops that will have at most one iteration.
@@ -25165,97 +25069,94 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# def some_method
# some_var = 1
# do_something
# end
-# @example
#
# # good
-#
# def some_method
# some_var = 1
# do_something(some_var)
# end
#
-# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45
+# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#41
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#56
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52
def after_leaving_scope(scope, _variable_table); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158
def autocorrect(corrector, assignment); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#99
def chained_assignment?(node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#57
def check_for_unused_assignments(variable); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#142
def collect_variable_like_names(scope); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#75
def message_for_useless_assignment(assignment); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103
def message_specification(assignment, variable); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#113
def multiple_assignment_message(variable_name); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#81
def offense_range(assignment); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#118
def operator_assignment_message(scope, assignment); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#175
def remove_exception_assignment_part(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#199
def remove_local_variable_assignment_part(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188
def remove_trailing_character_from_operator(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#184
def rename_variable_with_underscore(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192
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#136
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132
def return_value_node_of_scope(scope); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#89
def sequential_assignment?(node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125
def similar_name_message(variable); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#151
def variable_like_method_invocation?(node); end
class << self
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#48
def joining_forces; end
end
end
-# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50
+# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#46
RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String)
# Checks for useless `else` in `begin..end` without `rescue`.
@@ -25265,16 +25166,13 @@ RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String)
# @example
#
# # bad
-#
# begin
# do_something
# else
# do_something_else # This will never be run.
# end
-# @example
#
# # good
-#
# begin
# do_something
# rescue
@@ -25283,13 +25181,13 @@ RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String)
# do_something_else
# end
#
-# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#31
+# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#27
class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#34
+ # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#30
def on_new_investigation; end
end
-# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#32
+# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#28
RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String)
# Checks for useless method definitions, specifically: empty constructors
@@ -25517,83 +25415,80 @@ RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil)
# @example
#
# # bad
-#
# def something
# x = Something.new
# x.attr = 5
# end
-# @example
#
# # good
-#
# def something
# x = Something.new
# x.attr = 5
# x
# end
#
-# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35
+# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#31
class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37
def on_def(node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37
def on_defs(node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#59
def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#67
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63
def last_expression(body); end
end
-# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#39
+# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35
RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#38
+# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#34
RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String)
# This class tracks variable assignments in a method body
# and if a variable contains object passed as argument at the end of
# the method.
#
-# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#76
+# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#72
class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker
# @return [MethodVariableTracker] a new instance of MethodVariableTracker
#
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#77
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#73
def initialize(body_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#163
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#159
def constructor?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#82
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#78
def contain_local_object?(variable_name); end
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#152
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148
def process_assignment(asgn_node, rhs_node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#100
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#96
def process_assignment_node(node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#142
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#138
def process_binary_operator_assignment(op_asgn_node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#133
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#129
def process_logical_operator_assignment(asgn_node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#114
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#110
def process_multiple_assignment(masgn_node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#92
+ # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#88
def scan(node, &block); end
end
@@ -25729,13 +25624,13 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/lint/void.rb#217
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#222
def autocorrect_nonmutating_send(corrector, node, suggestion); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#213
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#216
def autocorrect_void_expression(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#201
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#204
def autocorrect_void_op(corrector, node); end
# source://rubocop//lib/rubocop/cop/lint/void.rb#99
@@ -25744,32 +25639,32 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/lint/void.rb#113
def check_expression(expr); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#151
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#154
def check_literal(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#175
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#178
def check_nonmutating(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#159
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#162
def check_self(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#133
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#136
def check_var(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#167
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#170
def check_void_expression(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#123
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#125
def check_void_op(node, &block); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/void.rb#226
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#231
def entirely_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/void.rb#193
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#196
def in_void_context?(node); end
end
@@ -26135,12 +26030,12 @@ end
# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49
RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String)
-# Checks for excessive nesting of conditional and looping
-# constructs.
+# Checks for excessive nesting of conditional and looping constructs.
#
-# You can configure if blocks are considered using the `CountBlocks`
-# option. When set to `false` (the default) blocks are not counted
-# towards the nesting level. Set to `true` to count blocks as well.
+# You can configure if blocks are considered using the `CountBlocks` and `CountModifierForms`
+# options. When both are set to `false` (the default) blocks and modifier forms are not
+# counted towards the nesting level. Set them to `true` to include these in the nesting level
+# calculation as well.
#
# The maximum level of nesting allowed is configurable.
#
@@ -26159,15 +26054,25 @@ class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44
+ # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#52
def consider_node?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#54
+ # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#62
def count_blocks?; end
- # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#50
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44
+ def count_if_block?(node); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#66
+ def count_modifier_forms?; end
+
+ # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#58
def message(max); end
end
@@ -27034,6 +26939,36 @@ module RuboCop::Cop::MinBranchesCount
def min_branches_count?(node); end
end
+module RuboCop::Cop::Minitest; end
+
+class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::VisibilityHelp
+ include ::RuboCop::Cop::DefNode
+
+ # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11
+ def max=(value); end
+
+ # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#37
+ def on_class(class_node); end
+
+ private
+
+ # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#54
+ def assertions_count(node); end
+
+ # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#62
+ def assertions_count_based_on_type(node); end
+
+ # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#77
+ def assertions_count_in_assignment(node); end
+
+ # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#95
+ def assertions_count_in_branches(branches); end
+
+ # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#99
+ def max_assertions; end
+end
+
# Common code for indenting the first elements in multiline
# array literals, hash literals, and method definitions.
#
@@ -28550,94 +28485,109 @@ class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base
def on_defs(node); end
end
-# Checks that predicate methods names end with a question mark and
+# Checks that predicate method names end with a question mark and
# do not start with a forbidden prefix.
#
-# A method is determined to be a predicate method if its name starts
-# with one of the prefixes defined in the `NamePrefix` configuration.
-# You can change what prefixes are considered by changing this option.
-# Any method name that starts with one of these prefixes is required by
-# the cop to end with a `?`. Other methods can be allowed by adding to
-# the `AllowedMethods` configuration.
-#
-# NOTE: The `is_a?` method is allowed by default.
-#
-# If `ForbiddenPrefixes` is set, methods that start with the configured
-# prefixes will not be allowed and will be removed by autocorrection.
+# A method is determined to be a predicate method if its name starts with
+# one of the prefixes listed in the `NamePrefix` configuration. The list
+# defaults to `is_`, `has_`, and `have_` but may be overridden.
#
-# In other words, if `ForbiddenPrefixes` is empty, a method named `is_foo`
-# will register an offense only due to the lack of question mark (and will be
-# autocorrected to `is_foo?`). If `ForbiddenPrefixes` contains `is_`,
-# `is_foo` will register an offense both because the ? is missing and because of
-# the `is_` prefix, and will be corrected to `foo?`.
+# Predicate methods must end with a question mark.
#
-# NOTE: `ForbiddenPrefixes` is only applied to prefixes in `NamePrefix`;
-# a prefix in the former but not the latter will not be considered by
-# this cop.
+# When `ForbiddenPrefixes` is also set (as it is by default), predicate
+# methods which begin with a forbidden prefix are not allowed, even if
+# they end with a `?`. These methods should be changed to remove the
+# prefix.
#
-# @example
+# @example NamePrefix: ['is_', 'has_', 'have_'] (default)
# # bad
# def is_even(value)
# end
#
-# def is_even?(value)
-# end
-#
+# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default)
# # good
# def even?(value)
# end
#
+# # When ForbiddenPrefixes: []
+# # good
+# def is_even?(value)
+# end
+# @example NamePrefix: ['seems_to_be_']
# # bad
-# def has_value
+# def seems_to_be_even(value)
# end
#
-# def has_value?
+# # When ForbiddenPrefixes: ['seems_to_be_']
+# # good
+# def even?(value)
# end
#
+# # When ForbiddenPrefixes: []
# # good
-# def value?
+# def seems_to_be_even?(value)
# end
# @example AllowedMethods: ['is_a?'] (default)
+# # Despite starting with the `is_` prefix, this method is allowed
# # good
# def is_a?(value)
# end
+# @example AllowedMethods: ['is_even?']
+# # good
+# def is_even?(value)
+# end
+# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default)
+# # bad
+# define_method(:is_even) { |value| }
+#
+# # good
+# define_method(:even?) { |value| }
+# @example MethodDefinitionMacros: ['def_node_matcher']
+# # bad
+# def_node_matcher(:is_even) { |value| }
#
-# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#59
+# # good
+# # def_node_matcher(:even?) { |value| }
+#
+# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#75
class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedMethods
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#63
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#79
def dynamic_method_define(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98
def on_def(node); end
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98
def on_defs(node); end
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#69
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#85
def on_send(node); end
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#112
+ def validate_config; end
+
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124
def allowed_method_name?(method_name, prefix); end
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#106
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#132
def expected_name(method_name, prefix); end
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#120
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#146
def forbidden_prefixes; end
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#116
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#142
def message(method_name, new_name); end
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#128
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#154
def method_definition_macros(macro_name); end
- # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124
+ # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#150
def predicate_prefixes; end
end
@@ -28707,31 +28657,31 @@ class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96
def autocorrect(corrector, node, range, offending_name, preferred_name); end
- # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#116
+ # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#117
def correct_node(corrector, node, offending_name, preferred_name); end
# If the exception variable is reassigned, that assignment needs to be corrected.
# Further `lvar` nodes will not be corrected though since they now refer to a
# different variable.
#
- # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#134
+ # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143
def correct_reassignment(corrector, node, offending_name, preferred_name); end
- # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#159
+ # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#168
def message(node); end
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91
def offense_range(resbody); end
- # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143
+ # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152
def preferred_name(variable_name); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#165
+ # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#174
def shadowed_variable_name?(node); end
- # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152
+ # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#161
def variable_name(node); end
# @return [Boolean]
@@ -34434,7 +34384,6 @@ RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String)
#
# # good (without parentheses it's a syntax error)
# def foo() do_something end
-# @example
#
# # bad
# def Baz.foo()
@@ -34446,18 +34395,18 @@ RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String)
# do_something
# end
#
-# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#42
+# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#40
class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47
+ # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45
def on_def(node); end
- # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47
+ # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45
def on_defs(node); end
end
-# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45
+# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#43
RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String)
# Checks for places where the `#\_\_dir\_\_` method can replace more
@@ -35134,38 +35083,38 @@ RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
#
# # good
# 5.times { }
-# @example
+#
# # bad
# (0...10).each {}
#
# # good
# 10.times {}
#
-# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#25
+# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#24
class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#53
+ # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#52
def each_range(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#65
+ # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#64
def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#77
+ # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#76
def each_range_without_block_argument?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#30
+ # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#29
def on_block(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#46
+ # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#45
def offending?(node); end
end
-# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#28
+# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#27
RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String)
# Looks for inject / reduce calls where the passed in object is
@@ -35977,9 +35926,18 @@ RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# will not attempt to automatically add a binding, or add filename and
# line values.
#
-# This cop works only when a string literal is given as a code string.
+# NOTE: This cop works only when a string literal is given as a code string.
# No offense is reported if a string variable is given as below:
#
+# [source,ruby]
+# ----
+# code = <<-RUBY
+# def do_something
+# end
+# RUBY
+# eval code # not checked.
+# ----
+#
# @example
# # bad
# eval <<-RUBY
@@ -36004,100 +35962,93 @@ RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# def do_something
# end
# RUBY
-# @example
-# # not checked
-# code = <<-RUBY
-# def do_something
-# end
-# RUBY
-# eval code
#
-# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#56
+# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#57
class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#74
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#75
def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#81
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#82
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#69
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#70
def valid_eval_receiver?(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#186
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#187
def add_offense_for_different_line(node, line_node, line_diff); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#132
def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#201
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202
def add_offense_for_missing_line(node, code); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#208
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#209
def add_offense_for_missing_location(node, code); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#180
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181
def add_offense_for_same_line(node, line_node); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#144
def check_file(node, file_node); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#156
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#157
def check_line(node, code); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#96
def check_location(node, code); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#193
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#194
def expected_line(sign, line_diff); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#123
def file_and_line(node); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#168
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#169
def line_difference(line_node, code); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#220
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#221
def missing_line(node, code); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#110
def register_offense(node, &block); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#114
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#115
def special_file_keyword?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#119
def special_line_keyword?(node); end
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#172
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#173
def string_first_line(str_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127
+ # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#128
def with_binding?(node); end
end
-# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59
+# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60
RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60
+# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61
RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61
+# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#62
RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#63
+# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#64
RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#66
+# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#67
RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Checks for places where `Integer#even?` or `Integer#odd?`
@@ -36606,8 +36557,7 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Favor `File.(bin)read` convenience methods.
#
# @example
-# ## text mode
-# # bad
+# # bad - text mode
# File.open(filename).read
# File.open(filename, &:read)
# File.open(filename) { |f| f.read }
@@ -36622,9 +36572,8 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
#
# # good
# File.read(filename)
-# @example
-# ## binary mode
-# # bad
+#
+# # bad - binary mode
# File.open(filename, 'rb').read
# File.open(filename, 'rb', &:read)
# File.open(filename, 'rb') do |f|
@@ -36634,49 +36583,49 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# # good
# File.binread(filename)
#
-# source://rubocop//lib/rubocop/cop/style/file_read.rb#38
+# source://rubocop//lib/rubocop/cop/style/file_read.rb#35
class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/file_read.rb#65
+ # source://rubocop//lib/rubocop/cop/style/file_read.rb#62
def block_read?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/file_read.rb#49
+ # source://rubocop//lib/rubocop/cop/style/file_read.rb#46
def file_open?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/file_read.rb#69
+ # source://rubocop//lib/rubocop/cop/style/file_read.rb#66
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/style/file_read.rb#60
+ # source://rubocop//lib/rubocop/cop/style/file_read.rb#57
def send_read?(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/style/file_read.rb#84
+ # source://rubocop//lib/rubocop/cop/style/file_read.rb#81
def evidence(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/file_read.rb#100
+ # source://rubocop//lib/rubocop/cop/style/file_read.rb#97
def file_open_read?(node); end
- # source://rubocop//lib/rubocop/cop/style/file_read.rb#106
+ # source://rubocop//lib/rubocop/cop/style/file_read.rb#103
def read_method(mode); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/file_read.rb#92
+ # source://rubocop//lib/rubocop/cop/style/file_read.rb#89
def read_node?(node, block_pass); end
end
-# source://rubocop//lib/rubocop/cop/style/file_read.rb#42
+# source://rubocop//lib/rubocop/cop/style/file_read.rb#39
RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/file_read.rb#46
+# source://rubocop//lib/rubocop/cop/style/file_read.rb#43
RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set)
-# source://rubocop//lib/rubocop/cop/style/file_read.rb#44
+# source://rubocop//lib/rubocop/cop/style/file_read.rb#41
RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Favor `File.(bin)write` convenience methods.
@@ -36693,8 +36642,7 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# ----
#
# @example
-# ## text mode
-# # bad
+# # bad - text mode
# File.open(filename, 'w').write(content)
# File.open(filename, 'w') do |f|
# f.write(content)
@@ -36702,9 +36650,8 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
#
# # good
# File.write(filename, content)
-# @example
-# ## binary mode
-# # bad
+#
+# # bad - binary mode
# File.open(filename, 'wb').write(content)
# File.open(filename, 'wb') do |f|
# f.write(content)
@@ -36713,24 +36660,24 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# # good
# File.binwrite(filename, content)
#
-# source://rubocop//lib/rubocop/cop/style/file_write.rb#41
+# source://rubocop//lib/rubocop/cop/style/file_write.rb#38
class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#68
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#65
def block_write?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#85
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#82
def evidence(node); end
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#52
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#49
def file_open?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#72
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#69
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#63
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#60
def send_write?(param0 = T.unsafe(nil)); end
private
@@ -36738,31 +36685,31 @@ class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base
# @return [Boolean]
# @yield [content]
#
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#95
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#92
def file_open_write?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#123
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#120
def heredoc?(write_node); end
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#128
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#125
def heredoc_range(first_argument); end
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#108
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#105
def replacement(mode, filename, content, write_node); end
- # source://rubocop//lib/rubocop/cop/style/file_write.rb#104
+ # source://rubocop//lib/rubocop/cop/style/file_write.rb#101
def write_method(mode); end
end
-# source://rubocop//lib/rubocop/cop/style/file_write.rb#45
+# source://rubocop//lib/rubocop/cop/style/file_write.rb#42
RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/file_write.rb#47
+# source://rubocop//lib/rubocop/cop/style/file_write.rb#44
RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
-# source://rubocop//lib/rubocop/cop/style/file_write.rb#49
+# source://rubocop//lib/rubocop/cop/style/file_write.rb#46
RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set)
# Checks for division with integers coerced to floats.
@@ -37327,11 +37274,16 @@ class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#64
+ # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#70
def gvar_name(const_name); end
- # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#60
+ # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#62
def message(const_name); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#66
+ def namespaced?(node); end
end
# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37
@@ -37867,9 +37819,9 @@ RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil)
# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar }
# {foo: 1, bar: 2, baz: 3}.select {|k, v| k != :bar }
# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k != :bar }
-# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[foo bar].include?(k) }
-# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[foo bar].include?(k) }
-# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[foo bar].include?(k) }
+# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].include?(k) }
+# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].include?(k) }
+# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[bar].include?(k) }
#
# # good
# {foo: 1, bar: 2, baz: 3}.except(:bar)
@@ -37896,42 +37848,42 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#94
- def bad_method?(block); end
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#95
+ def bad_method?(method_name, block); end
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#166
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#169
def decorate_source(value); end
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#174
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#177
def except_key(node); end
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#153
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#156
def except_key_source(key); end
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#147
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#150
def extract_body_if_negated(body); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#128
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#131
def included?(negated, body); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#132
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135
def not_included?(negated, body); end
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#183
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#186
def offense_range(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#136
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#139
def safe_to_register_offense?(block, except_key); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/hash_except.rb#112
+ # source://rubocop//lib/rubocop/cop/style/hash_except.rb#115
def semantically_except_method?(send, block); end
end
@@ -38802,7 +38754,7 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri
#
# # good
# foo == bar
-# @example
+#
# # bad
# if foo.do_something?
# true
@@ -38816,61 +38768,61 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri
# # good
# num.nonzero? ? true : false
#
-# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#62
+# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#61
class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedMethods
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#74
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#73
def double_negative?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#70
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#69
def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#76
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#75
def on_if(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#136
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#135
def assume_boolean_value?(condition); end
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#113
def message(node, keyword); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#96
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#95
def multiple_elsif?(node); end
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#102
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#101
def offense_range_with_keyword(node, condition); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#153
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#152
def opposite_condition?(node); end
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#143
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#142
def replacement_condition(node, condition); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#158
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#157
def require_parentheses?(condition); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#122
+ # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#121
def return_boolean_value?(condition); end
end
-# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66
+# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#65
RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#67
+# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66
RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String)
# Checks for uses of semicolon in if statements.
@@ -39843,6 +39795,7 @@ RuboCop::Cop::Style::MagicCommentFormat::MSG_VALUE = T.let(T.unsafe(nil), String
RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), String)
# Prefer `select` or `reject` over `map { ... }.compact`.
+# This cop also handles `filter_map { ... }`, similar to `map { ... }.compact`.
#
# @example
#
@@ -39850,6 +39803,9 @@ RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil),
# array.map { |e| some_condition? ? e : next }.compact
#
# # bad
+# array.filter_map { |e| some_condition? ? e : next }
+#
+# # bad
# array.map do |e|
# if some_condition?
# e
@@ -39876,48 +39832,60 @@ RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil),
# # good
# array.reject { |e| some_condition? }
#
-# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#40
+# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#44
class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#46
- def map_and_compact?(param0 = T.unsafe(nil)); end
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#51
+ def conditional_block(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76
def on_csend(node); end
- # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#126
- def range(node); end
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#148
+ def current(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#162
+ def filter_map_range(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96
+ def inspect(node, block_argument_node, condition_node, return_value_node, range); end
+
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#158
+ def map_with_compact_range(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#92
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#114
def returns_block_argument?(block_argument_node, return_value_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#118
def truthy_branch?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#116
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#138
def truthy_branch_for_guard?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#106
+ # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#128
def truthy_branch_for_if?(node); end
end
-# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#43
+# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#47
RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String)
+# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#48
+RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
# Checks for usages of `each` with `<<`, `push`, or `append` which
# can be replaced by `map`.
#
@@ -40113,7 +40081,7 @@ RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Enforces the presence (default) or absence of parentheses in
-# method calls containing parameters.
+# method calls containing arguments.
#
# In the default style (require_parentheses), macro methods are allowed.
# Additional methods can be added to the `AllowedMethods` or
@@ -40343,110 +40311,110 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#70
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75
def allowed_camel_case_method_call?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179
def allowed_chained_call_with_parentheses?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#170
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175
def allowed_multiline_call_with_parentheses?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80
def allowed_string_interpolation_method_call?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188
def ambiguous_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217
def assigned_before?(node, target); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#220
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#225
def assignment_in_condition?(node); end
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#32
def autocorrect(corrector, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#156
def call_as_argument_or_chain?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#144
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#149
def call_in_argument_with_block?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#100
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#105
def call_in_literals?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#111
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#116
def call_in_logical_operators?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#157
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162
def call_in_match_pattern?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#120
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#125
def call_in_optional_arguments?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#124
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#129
def call_in_single_line_inheritance?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#133
def call_with_ambiguous_arguments?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#140
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#145
def call_with_braced_block?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#235
def forwards_anonymous_rest_arguments?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#199
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204
def hash_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#163
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168
def hash_literal_in_arguments?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#44
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#45
def inside_endless_method_def?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#216
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221
def inside_string_interpolation?(node); end
# Require hash value omission be enclosed in parentheses to prevent the following issue:
@@ -40454,20 +40422,25 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#58
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#59
def last_expression?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#87
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#92
def legitimate_call_with_parentheses?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#195
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200
def logical_operator?(node); end
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#67
+ def method_call_before_constant_resolution?(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#41
def offense_range(node); end
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16
@@ -40475,42 +40448,42 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85
def parentheses_at_the_end_of_multiline_call?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208
def regexp_slash_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#49
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50
def require_parentheses_for_hash_value_omission?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192
def splat?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#66
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#71
def super_call_without_arguments?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#62
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#63
def syntax_like_method_call?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196
def ternary_if?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212
def unary_literal?(node); end
end
@@ -41029,15 +41002,10 @@ class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/style/missing_else.rb#127
def check(node); end
- # source://rubocop//lib/rubocop/cop/style/missing_else.rb#181
+ # source://rubocop//lib/rubocop/cop/style/missing_else.rb#177
def empty_else_config; end
- # @return [Boolean]
- #
# source://rubocop//lib/rubocop/cop/style/missing_else.rb#171
- def empty_else_cop_enabled?; end
-
- # source://rubocop//lib/rubocop/cop/style/missing_else.rb#175
def empty_else_style; end
# @return [Boolean]
@@ -41749,11 +41717,6 @@ class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base
private
- # @return [Boolean]
- #
- # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#58
- def accept_node_type?(node); end
-
# Requires `then` for write `when` and its body on the same line.
#
# @return [Boolean]
@@ -41951,7 +41914,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18
+ # source://rubocop-sorbet/0.8.5/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
@@ -41969,7 +41932,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.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12
+ # source://rubocop-sorbet/0.8.5/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12
def t_let(param0 = T.unsafe(nil)); end
private
@@ -44352,7 +44315,7 @@ RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String)
#
# String interpolation is always kept in double quotes.
#
-# Note: `Lint/SymbolConversion` can be used in parallel to ensure that symbols
+# NOTE: `Lint/SymbolConversion` can be used in parallel to ensure that symbols
# are not quoted that don't need to be. This cop is for configuring the quoting
# style to use for symbols that require quotes.
#
@@ -44970,7 +44933,7 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String)
#
# # good
# a = b || c
-# @example
+#
# # bad
# if b
# b
@@ -44988,12 +44951,12 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String)
# c
# end
#
-# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#33
+# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#32
class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#43
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#42
def on_if(node); end
private
@@ -45003,116 +44966,116 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#167
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#166
def argument_with_operator?(argument); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#142
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#141
def asgn_type?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#132
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#131
def branches_have_assignment?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#146
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#145
def branches_have_method?(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#240
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#239
def correct_ternary(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#187
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#186
def else_source(else_branch, arithmetic_operation); end
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#213
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#212
def else_source_if_has_assignment(else_branch); end
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#203
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#202
def else_source_if_has_method(else_branch); end
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#175
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#174
def if_source(if_branch, arithmetic_operation); end
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#223
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#222
def make_ternary_form(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#64
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#63
def message(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#79
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#78
def offense?(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#72
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#71
def range_of_offense(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#88
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#87
def redundant_condition?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#255
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#254
def require_braces?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#248
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#247
def require_parentheses?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#161
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#160
def same_method?(if_branch, else_branch); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#155
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#154
def single_argument_method?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#104
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#103
def synonymous_condition_and_branch?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#259
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#258
def use_arithmetic_operation?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#100
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#99
def use_hash_key_access?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#96
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#95
def use_hash_key_assignment?(else_branch); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#92
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#91
def use_if_branch?(else_branch); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263
+ # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#262
def without_argument_parentheses_method?(node); end
end
-# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#39
+# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38
RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37
+# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#36
RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38
+# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37
RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String)
# Checks for redundant returning of true/false in conditionals.
@@ -45552,7 +45515,7 @@ RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String)
# Checks for the presence of superfluous `.rb` extension in
# the filename provided to `require` and `require_relative`.
#
-# Note: If the extension is omitted, Ruby tries adding '.rb', '.so',
+# NOTE: If the extension is omitted, Ruby tries adding '.rb', '.so',
# and so on to the name until found. If the file named cannot be found,
# a `LoadError` will be raised.
# There is an edge case where `foo.so` file is loaded instead of a `LoadError`
@@ -46621,13 +46584,10 @@ class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base
# 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#99
+ # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#98
def each_escape(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#126
+ # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#110
def escape_range_at_index(node, index); end
end
@@ -48459,6 +48419,20 @@ RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Since the `send` method can be used to call private methods, by default,
# only the `public_send` method is detected.
#
+# NOTE: Writer methods with names ending in `=` are always permitted because their
+# behavior differs as follows:
+#
+# [source,ruby]
+# ----
+# def foo=(foo)
+# @foo = foo
+# 42
+# end
+#
+# self.foo = 1 # => 1
+# send(:foo=, 1) # => 42
+# ----
+#
# @example
# # bad
# obj.public_send(:method_name)
@@ -48482,40 +48456,40 @@ RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# # good
# obj.method_name
#
-# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#40
+# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54
class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54
+ # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#68
def on_send(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#76
+ # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#90
def allow_send?; end
- # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#80
+ # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#94
def offense_range(node); end
- # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#84
+ # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#98
def removal_argument_range(first_argument, second_argument); end
end
-# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#46
+# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#60
RuboCop::Cop::Style::SendWithLiteralMethodName::METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp)
-# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#43
+# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#57
RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#47
+# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#61
RuboCop::Cop::Style::SendWithLiteralMethodName::RESERVED_WORDS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#44
+# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#58
RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#45
+# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#59
RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array)
# Checks for uses of `fail` and `raise`.
@@ -49040,10 +49014,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#261
def allow_modifier?; end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233
def arguments_range(node); end
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81
@@ -49061,25 +49035,25 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#145
def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#175
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#181
def correct_for_comment(corrector, node, if_branch); end
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#136
def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#165
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#171
def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end
# 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#184
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#190
def correct_outer_condition(corrector, condition); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#203
def insert_bang(corrector, node, is_modify_form); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#216
def insert_bang_for_and(corrector, node); end
# @return [Boolean]
@@ -49089,15 +49063,18 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#265
def outer_condition_modify_form?(node, if_branch); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#254
+ def parenthesized_method_arguments(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244
def replace_condition(condition); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#228
def require_parentheses?(condition); end
# @return [Boolean]
@@ -49110,7 +49087,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#239
def wrap_condition?(node); end
class << self
@@ -49879,8 +49856,25 @@ end
# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30
RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String)
-# Checks for redundant argument forwarding when calling super
-# with arguments identical to the method definition.
+# Checks for redundant argument forwarding when calling super with arguments identical to
+# the method definition.
+#
+# Using zero arity `super` within a `define_method` block results in `RuntimeError`:
+#
+# [source,ruby]
+# ----
+# def m
+# define_method(:foo) { super() } # => OK
+# end
+#
+# def m
+# define_method(:foo) { super } # => RuntimeError
+# end
+# ----
+#
+# Furthermore, any arguments accompanied by a block may potentially be delegating to
+# `define_method`, therefore, `super` used within these blocks will be allowed.
+# This approach might result in false negatives, yet ensuring safe detection takes precedence.
#
# @example
# # bad
@@ -49911,23 +49905,23 @@ RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String)
# super(&block)
# end
#
-# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#37
+# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#54
class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#45
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62
def on_super(super_node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#81
def arguments_identical?(def_node, def_args, super_args); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#117
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#136
def block_arg_same?(def_node, def_arg, super_arg); end
# Reassigning the block argument will still pass along the original block to super
@@ -49935,48 +49929,43 @@ class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#128
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#147
def block_reassigned?(def_node, block_arg_name); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#138
- def define_method?(node); end
-
- # @return [Boolean]
- #
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#134
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#158
def forward_arg_same?(def_arg, super_arg); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#97
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#116
def keyword_arg_same?(def_arg, super_arg); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#107
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#126
def keyword_rest_arg_same?(def_arg, super_arg); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#80
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#99
def positional_arg_same?(def_arg, super_arg); end
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#87
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#106
def positional_rest_arg_same(def_arg, super_arg); end
- # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#144
+ # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#162
def preprocess_super_args(super_args); end
end
-# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#41
+# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#58
RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#40
+# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#57
RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#43
+# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#60
RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String)
# Enforces the presence of parentheses in `super` containing arguments.
@@ -50289,12 +50278,12 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#267
+ # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#274
def allow_comments?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#263
+ # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#270
def allow_if_method_has_argument?(send_node); end
# @return [Boolean]
@@ -50305,19 +50294,19 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217
def autocorrect(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240
+ # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#247
def autocorrect_lambda_block(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#231
+ # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#238
def autocorrect_with_args(corrector, node, args, method_name); end
# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225
def autocorrect_without_args(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#253
+ # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#260
def begin_pos_for_replacement(node); end
- # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#248
+ # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#255
def block_range_with_space(node); end
# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208
@@ -51625,7 +51614,6 @@ RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String)
# while x.any?
# do_something(x.pop)
# end
-# @example
#
# # bad
# until x.empty? do
@@ -51637,18 +51625,18 @@ RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String)
# do_something(x.pop)
# end
#
-# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#31
+# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#29
class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36
+ # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34
def on_until(node); end
- # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36
+ # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34
def on_while(node); end
end
-# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34
+# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#32
RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String)
# Checks for while and until statements that would fit on one line
@@ -51663,7 +51651,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String)
#
# # good
# x += 1 while x < 10
-# @example
+#
# # bad
# until x > 10
# x += 1
@@ -51680,7 +51668,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String)
# x += 100
# end
#
-# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#36
+# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#35
class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Alignment
include ::RuboCop::Cop::LineLengthHelp
@@ -51688,14 +51676,14 @@ class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base
include ::RuboCop::Cop::StatementModifier
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42
+ # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41
def on_until(node); end
- # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42
+ # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41
def on_while(node); end
end
-# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40
+# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#39
RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String)
# Checks for array literals made up of word-like
@@ -52115,39 +52103,42 @@ class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base
# implement `#size`, but not `#empty`. We ignore those to
# reduce false positives.
#
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#139
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#147
def non_polymorphic_collection?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#109
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114
def nonzero_length_comparison(param0 = T.unsafe(nil)); end
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#51
+ def on_csend(node); end
+
# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130
- def other_receiver(param0 = T.unsafe(nil)); end
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#138
+ def other_length_node(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#106
def zero_length_comparison(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#96
- def zero_length_predicate(param0 = T.unsafe(nil)); end
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130
+ def zero_length_node(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#122
- def zero_length_receiver(param0 = T.unsafe(nil)); end
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101
+ def zero_length_predicate?(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#80
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#85
def check_nonzero_length_comparison(node); end
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#65
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#70
def check_zero_length_comparison(node); end
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#53
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#58
def check_zero_length_predicate(node); end
- # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114
+ # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#119
def replacement(node); end
end
@@ -52294,12 +52285,12 @@ class RuboCop::Cop::Team
# source://rubocop//lib/rubocop/cop/team.rb#51
def errors; end
- # source://rubocop//lib/rubocop/cop/team.rb#114
+ # source://rubocop//lib/rubocop/cop/team.rb#122
def external_dependency_checksum; end
# @deprecated
#
- # source://rubocop//lib/rubocop/cop/team.rb#110
+ # source://rubocop//lib/rubocop/cop/team.rb#114
def forces; end
# source://rubocop//lib/rubocop/cop/team.rb#76
@@ -52307,7 +52298,7 @@ class RuboCop::Cop::Team
# @return [Commissioner::InvestigationReport]
#
- # source://rubocop//lib/rubocop/cop/team.rb#81
+ # source://rubocop//lib/rubocop/cop/team.rb#85
def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end
# Returns the value of attribute updated_source_file.
@@ -52327,57 +52318,57 @@ class RuboCop::Cop::Team
private
- # source://rubocop//lib/rubocop/cop/team.rb#121
+ # source://rubocop//lib/rubocop/cop/team.rb#129
def autocorrect(processed_source, report, original:, offset:); end
- # source://rubocop//lib/rubocop/cop/team.rb#185
+ # source://rubocop//lib/rubocop/cop/team.rb#193
def autocorrect_report(report, offset:, original:); end
- # source://rubocop//lib/rubocop/cop/team.rb#140
+ # source://rubocop//lib/rubocop/cop/team.rb#148
def be_ready; end
- # source://rubocop//lib/rubocop/cop/team.rb#191
+ # source://rubocop//lib/rubocop/cop/team.rb#199
def collate_corrections(report, offset:, original:); end
- # source://rubocop//lib/rubocop/cop/team.rb#207
+ # source://rubocop//lib/rubocop/cop/team.rb#215
def each_corrector(report); end
- # source://rubocop//lib/rubocop/cop/team.rb#259
+ # source://rubocop//lib/rubocop/cop/team.rb#267
def handle_error(error, location, cop); end
- # source://rubocop//lib/rubocop/cop/team.rb#251
+ # source://rubocop//lib/rubocop/cop/team.rb#259
def handle_warning(error, location); end
# @return [Commissioner::InvestigationReport]
#
- # source://rubocop//lib/rubocop/cop/team.rb#154
+ # source://rubocop//lib/rubocop/cop/team.rb#162
def investigate_partial(cops, processed_source, offset:, original:); end
- # source://rubocop//lib/rubocop/cop/team.rb#234
+ # source://rubocop//lib/rubocop/cop/team.rb#242
def process_errors(file, errors); end
- # source://rubocop//lib/rubocop/cop/team.rb#148
+ # source://rubocop//lib/rubocop/cop/team.rb#156
def reset; end
# @return [Array]
#
- # source://rubocop//lib/rubocop/cop/team.rb#160
+ # source://rubocop//lib/rubocop/cop/team.rb#168
def roundup_relevant_cops(processed_source); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/team.rb#176
+ # source://rubocop//lib/rubocop/cop/team.rb#184
def support_target_rails_version?(cop); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/team.rb#170
+ # source://rubocop//lib/rubocop/cop/team.rb#178
def support_target_ruby_version?(cop); end
- # source://rubocop//lib/rubocop/cop/team.rb#222
+ # source://rubocop//lib/rubocop/cop/team.rb#230
def suppress_clobbering; end
- # source://rubocop//lib/rubocop/cop/team.rb#228
+ # source://rubocop//lib/rubocop/cop/team.rb#236
def validate_config; end
class << self
@@ -52628,19 +52619,19 @@ module RuboCop::Cop::Util
private
- # source://rubocop//lib/rubocop/cop/util.rb#35
+ # source://rubocop//lib/rubocop/cop/util.rb#39
def add_parentheses(node, corrector); end
- # source://rubocop//lib/rubocop/cop/util.rb#56
+ # source://rubocop//lib/rubocop/cop/util.rb#60
def any_descendant?(node, *types); end
- # source://rubocop//lib/rubocop/cop/util.rb#71
+ # source://rubocop//lib/rubocop/cop/util.rb#75
def args_begin(node); end
- # source://rubocop//lib/rubocop/cop/util.rb#83
+ # source://rubocop//lib/rubocop/cop/util.rb#87
def args_end(node); end
- # source://rubocop//lib/rubocop/cop/util.rb#104
+ # source://rubocop//lib/rubocop/cop/util.rb#108
def begins_its_line?(range); end
# This is a bad API
@@ -52653,78 +52644,78 @@ module RuboCop::Cop::Util
# source://rubocop//lib/rubocop/cop/util.rb#22
def comment_lines?(node); end
- # source://rubocop//lib/rubocop/cop/util.rb#192
+ # source://rubocop//lib/rubocop/cop/util.rb#198
def compatible_external_encoding_for?(src); end
# If converting a string to Ruby string literal source code, must
# double quotes be used?
#
- # source://rubocop//lib/rubocop/cop/util.rb#130
+ # source://rubocop//lib/rubocop/cop/util.rb#134
def double_quotes_required?(string); end
- # source://rubocop//lib/rubocop/cop/util.rb#144
+ # source://rubocop//lib/rubocop/cop/util.rb#148
def escape_string(string); end
# Returns, for example, a bare `if` node if the given node is an `if`
# with calls chained to the end of it.
#
- # source://rubocop//lib/rubocop/cop/util.rb#114
+ # source://rubocop//lib/rubocop/cop/util.rb#118
def first_part_of_call_chain(node); end
- # source://rubocop//lib/rubocop/cop/util.rb#197
+ # source://rubocop//lib/rubocop/cop/util.rb#203
def include_or_equal?(source, target); end
- # source://rubocop//lib/rubocop/cop/util.rb#179
+ # source://rubocop//lib/rubocop/cop/util.rb#185
def indent(node, offset: T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/util.rb#161
+ # source://rubocop//lib/rubocop/cop/util.rb#165
def interpret_string_escapes(string); end
- # source://rubocop//lib/rubocop/cop/util.rb#165
+ # source://rubocop//lib/rubocop/cop/util.rb#169
def line(node_or_range); end
- # source://rubocop//lib/rubocop/cop/util.rb#26
+ # source://rubocop//lib/rubocop/cop/util.rb#30
def line_range(node); end
- # source://rubocop//lib/rubocop/cop/util.rb#140
+ # source://rubocop//lib/rubocop/cop/util.rb#144
def needs_escaping?(string); end
- # source://rubocop//lib/rubocop/cop/util.rb#87
+ # source://rubocop//lib/rubocop/cop/util.rb#91
def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end
- # source://rubocop//lib/rubocop/cop/util.rb#30
+ # source://rubocop//lib/rubocop/cop/util.rb#34
def parentheses?(node); end
- # source://rubocop//lib/rubocop/cop/util.rb#173
+ # source://rubocop//lib/rubocop/cop/util.rb#177
def same_line?(node1, node2); end
- # source://rubocop//lib/rubocop/cop/util.rb#148
+ # source://rubocop//lib/rubocop/cop/util.rb#152
def to_string_literal(string); end
- # source://rubocop//lib/rubocop/cop/util.rb#185
+ # source://rubocop//lib/rubocop/cop/util.rb#191
def to_supported_styles(enforced_style); end
- # source://rubocop//lib/rubocop/cop/util.rb#157
+ # source://rubocop//lib/rubocop/cop/util.rb#161
def trim_string_interpolation_escape_character(str); end
class << self
- # source://rubocop//lib/rubocop/cop/util.rb#35
+ # source://rubocop//lib/rubocop/cop/util.rb#39
def add_parentheses(node, corrector); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/util.rb#56
+ # source://rubocop//lib/rubocop/cop/util.rb#60
def any_descendant?(node, *types); end
- # source://rubocop//lib/rubocop/cop/util.rb#71
+ # source://rubocop//lib/rubocop/cop/util.rb#75
def args_begin(node); end
- # source://rubocop//lib/rubocop/cop/util.rb#83
+ # source://rubocop//lib/rubocop/cop/util.rb#87
def args_end(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/util.rb#104
+ # source://rubocop//lib/rubocop/cop/util.rb#108
def begins_its_line?(range); end
# This is a bad API
@@ -52745,62 +52736,62 @@ module RuboCop::Cop::Util
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/util.rb#130
+ # source://rubocop//lib/rubocop/cop/util.rb#134
def double_quotes_required?(string); end
- # source://rubocop//lib/rubocop/cop/util.rb#144
+ # source://rubocop//lib/rubocop/cop/util.rb#148
def escape_string(string); end
# Returns, for example, a bare `if` node if the given node is an `if`
# with calls chained to the end of it.
#
- # source://rubocop//lib/rubocop/cop/util.rb#114
+ # source://rubocop//lib/rubocop/cop/util.rb#118
def first_part_of_call_chain(node); end
- # source://rubocop//lib/rubocop/cop/util.rb#179
+ # source://rubocop//lib/rubocop/cop/util.rb#185
def indent(node, offset: T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/util.rb#161
+ # source://rubocop//lib/rubocop/cop/util.rb#165
def interpret_string_escapes(string); end
- # source://rubocop//lib/rubocop/cop/util.rb#165
+ # source://rubocop//lib/rubocop/cop/util.rb#169
def line(node_or_range); end
- # source://rubocop//lib/rubocop/cop/util.rb#26
+ # source://rubocop//lib/rubocop/cop/util.rb#30
def line_range(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/util.rb#140
+ # source://rubocop//lib/rubocop/cop/util.rb#144
def needs_escaping?(string); end
# @yield [sexp]
#
- # source://rubocop//lib/rubocop/cop/util.rb#87
+ # source://rubocop//lib/rubocop/cop/util.rb#91
def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/util.rb#30
+ # source://rubocop//lib/rubocop/cop/util.rb#34
def parentheses?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/util.rb#173
+ # source://rubocop//lib/rubocop/cop/util.rb#177
def same_line?(node1, node2); end
- # source://rubocop//lib/rubocop/cop/util.rb#148
+ # source://rubocop//lib/rubocop/cop/util.rb#152
def to_string_literal(string); end
- # source://rubocop//lib/rubocop/cop/util.rb#185
+ # source://rubocop//lib/rubocop/cop/util.rb#191
def to_supported_styles(enforced_style); end
- # source://rubocop//lib/rubocop/cop/util.rb#157
+ # source://rubocop//lib/rubocop/cop/util.rb#161
def trim_string_interpolation_escape_character(str); end
end
end
-# source://rubocop//lib/rubocop/cop/util.rb#99
+# source://rubocop//lib/rubocop/cop/util.rb#103
RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash)
# Match literal regex characters, not including anchors, character
@@ -52812,7 +52803,7 @@ RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp)
# Arbitrarily chosen value, should be enough to cover
# the most nested source code in real world projects.
#
-# source://rubocop//lib/rubocop/cop/util.rb#98
+# source://rubocop//lib/rubocop/cop/util.rb#102
RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer)
# source://rubocop//lib/rubocop/cop/utils/format_string.rb#5
@@ -53045,59 +53036,59 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force
#
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#76
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#79
def investigate(processed_source); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#85
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#88
def process_node(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#71
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#74
def variable_table; end
private
- # source://rubocop//lib/rubocop/cop/variable_force.rb#368
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#380
def after_declaring_variable(arg); end
- # source://rubocop//lib/rubocop/cop/variable_force.rb#368
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#380
def after_entering_scope(arg); end
- # source://rubocop//lib/rubocop/cop/variable_force.rb#368
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#380
def after_leaving_scope(arg); end
- # source://rubocop//lib/rubocop/cop/variable_force.rb#368
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#380
def before_declaring_variable(arg); end
- # source://rubocop//lib/rubocop/cop/variable_force.rb#368
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#380
def before_entering_scope(arg); end
- # source://rubocop//lib/rubocop/cop/variable_force.rb#368
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#380
def before_leaving_scope(arg); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#339
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#351
def descendant_reference(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#329
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#341
def each_descendant_reference(loop_node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#314
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#326
def find_variables_in_loop(loop_node); end
# This is called for each scope recursively.
#
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#94
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#97
def inspect_variables_in_scope(scope_node); end
# Mark all assignments which are referenced in the same loop
@@ -53106,104 +53097,109 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force
#
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#295
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#307
def mark_assignments_as_referenced_in_loop(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#126
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#130
def node_handler_method_name(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#100
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#103
def process_children(origin_node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#231
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#243
def process_loop(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#160
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#182
+ def process_pattern_match_variable(node); end
+
+ # @api private
+ #
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#164
def process_regexp_named_captures(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#246
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#258
def process_rescue(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#265
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#277
def process_scope(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#284
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#296
def process_send(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#142
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#146
def process_variable_assignment(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#130
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#134
def process_variable_declaration(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#219
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#231
def process_variable_multiple_assignment(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#184
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#196
def process_variable_operator_assignment(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#226
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#238
def process_variable_referencing(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#257
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#269
def process_zero_arity_super(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#178
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#190
def regexp_captured_names(node); end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#351
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#363
def scanned_node?(node); end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#355
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#367
def scanned_nodes; end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#108
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#111
def skip_children!; end
# @api private
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#278
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#290
def twisted_nodes(node); end
end
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#32
+# source://rubocop//lib/rubocop/cop/variable_force.rb#35
RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array)
# This class represents each assignment of a variable.
@@ -53315,12 +53311,12 @@ RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#65
+# source://rubocop//lib/rubocop/cop/variable_force.rb#68
class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#66
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#69
def assignment?; end
# Returns the value of attribute node
@@ -53760,32 +53756,37 @@ end
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#39
+# source://rubocop//lib/rubocop/cop/variable_force.rb#42
RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array)
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#48
+# source://rubocop//lib/rubocop/cop/variable_force.rb#51
RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array)
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#42
+# source://rubocop//lib/rubocop/cop/variable_force.rb#45
RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol)
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#112
+# source://rubocop//lib/rubocop/cop/variable_force.rb#115
RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash)
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#40
+# source://rubocop//lib/rubocop/cop/variable_force.rb#43
RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array)
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#47
+# source://rubocop//lib/rubocop/cop/variable_force.rb#30
+RuboCop::Cop::VariableForce::PATTERN_MATCH_VARIABLE_TYPE = T.let(T.unsafe(nil), Symbol)
+
+# @api private
+#
+# source://rubocop//lib/rubocop/cop/variable_force.rb#50
RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array)
# @api private
@@ -53795,12 +53796,12 @@ RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Sy
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#50
+# source://rubocop//lib/rubocop/cop/variable_force.rb#53
RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol)
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#43
+# source://rubocop//lib/rubocop/cop/variable_force.rb#46
RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol)
# This class represents each reference of a variable.
@@ -53850,12 +53851,12 @@ RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsaf
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#55
+# source://rubocop//lib/rubocop/cop/variable_force.rb#58
RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array)
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#57
+# source://rubocop//lib/rubocop/cop/variable_force.rb#60
RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol)
# A Scope represents a context of local variable visibility.
@@ -53934,7 +53935,7 @@ RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(n
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#54
+# source://rubocop//lib/rubocop/cop/variable_force.rb#57
RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array)
# @api private
@@ -53944,12 +53945,12 @@ RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Sym
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#30
+# source://rubocop//lib/rubocop/cop/variable_force.rb#31
RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array)
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#45
+# source://rubocop//lib/rubocop/cop/variable_force.rb#48
RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol)
# A Variable represents existence of a local variable.
@@ -54066,12 +54067,12 @@ RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsa
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#59
+# source://rubocop//lib/rubocop/cop/variable_force.rb#62
class RuboCop::Cop::VariableForce::VariableReference < ::Struct
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/variable_force.rb#60
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#63
def assignment?; end
# Returns the value of attribute name
@@ -54153,7 +54154,7 @@ end
# @api private
#
-# source://rubocop//lib/rubocop/cop/variable_force.rb#52
+# source://rubocop//lib/rubocop/cop/variable_force.rb#55
RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol)
# Help methods for determining node visibility.
@@ -54503,13 +54504,10 @@ end
#
# source://rubocop//lib/rubocop/ext/regexp_node.rb#6
module RuboCop::Ext::RegexpNode
- # 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/ext/regexp_node.rb#19
+ # source://rubocop//lib/rubocop/ext/regexp_node.rb#18
def assign_properties(*_arg0); end
- # source://rubocop//lib/rubocop/ext/regexp_node.rb#53
+ # source://rubocop//lib/rubocop/ext/regexp_node.rb#31
def each_capture(named: T.unsafe(nil)); end
# Note: we extend Regexp nodes to provide `loc` and `expression`
@@ -54524,10 +54522,10 @@ module RuboCop::Ext::RegexpNode
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/ext/regexp_node.rb#65
+ # source://rubocop//lib/rubocop/ext/regexp_node.rb#43
def named_capturing?(exp, event, named); end
- # source://rubocop//lib/rubocop/ext/regexp_node.rb#73
+ # source://rubocop//lib/rubocop/ext/regexp_node.rb#51
def with_interpolations_blanked; end
end
@@ -54548,7 +54546,7 @@ module RuboCop::Ext::RegexpParser::Expression; end
module RuboCop::Ext::RegexpParser::Expression::Base
# Shortcut to `loc.expression`
#
- # source://rubocop//lib/rubocop/ext/regexp_parser.rb#27
+ # source://rubocop//lib/rubocop/ext/regexp_parser.rb#26
def expression; end
# E.g.
@@ -54561,7 +54559,7 @@ module RuboCop::Ext::RegexpParser::Expression::Base
#
# Please open issue if you need other locations
#
- # source://rubocop//lib/rubocop/ext/regexp_parser.rb#61
+ # source://rubocop//lib/rubocop/ext/regexp_parser.rb#44
def loc; end
# Returns the value of attribute origin.
@@ -54578,15 +54576,15 @@ module RuboCop::Ext::RegexpParser::Expression::Base
private
- # source://rubocop//lib/rubocop/ext/regexp_parser.rb#67
+ # source://rubocop//lib/rubocop/ext/regexp_parser.rb#50
def build_location; end
end
# Provide `CharacterSet` with `begin` and `end` locations.
#
-# source://rubocop//lib/rubocop/ext/regexp_parser.rb#79
+# source://rubocop//lib/rubocop/ext/regexp_parser.rb#62
module RuboCop::Ext::RegexpParser::Expression::CharacterSet
- # source://rubocop//lib/rubocop/ext/regexp_parser.rb#80
+ # source://rubocop//lib/rubocop/ext/regexp_parser.rb#63
def build_location; end
end
@@ -55281,15 +55279,15 @@ end
# This class provides helper methods used in the ERB CSS template.
#
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#135
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#137
class RuboCop::Formatter::HTMLFormatter::CSSContext
# Make Kernel#binding public.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#146
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#148
def binding; end
end
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#136
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#138
RuboCop::Formatter::HTMLFormatter::CSSContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash)
# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12
@@ -55361,60 +55359,60 @@ RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String)
# This class provides helper methods used in the ERB template.
#
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#61
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#63
class RuboCop::Formatter::HTMLFormatter::ERBContext
include ::RuboCop::PathUtil
include ::RuboCop::Formatter::TextUtil
# @return [ERBContext] a new instance of ERBContext
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#71
def initialize(files, summary); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#116
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#118
def base64_encoded_logo_image; end
# Make Kernel#binding public.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78
def binding; end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#81
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83
def decorated_message(offense); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#114
def escape(string); end
# Returns the value of attribute files.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#67
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69
def files; end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#92
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94
def highlight_source_tag(offense); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#85
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#87
def highlighted_source_line(offense); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#108
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110
def possible_ellipses(location); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#124
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#126
def render_css; end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#103
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#105
def source_after_highlight(offense); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#98
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#100
def source_before_highlight(offense); end
# Returns the value of attribute summary.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#67
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69
def summary; end
end
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#65
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#67
RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String)
# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25
@@ -58354,13 +58352,11 @@ class String
# is either empty or contains only whitespace characters.
#
# @example
- # ''.blank? #=> true
- # @example
- # ' '.blank? #=> true
- # @example
+ # ''.blank? #=> true
+ # ' '.blank? #=> true
# ' test'.blank? #=> false
# @return [Boolean] true is the string is blank, false otherwise
#
- # source://rubocop//lib/rubocop/core_ext/string.rb#19
+ # source://rubocop//lib/rubocop/core_ext/string.rb#15
def blank?; end
end
diff --git a/sorbet/rbi/gems/spoom@1.3.0.rbi b/sorbet/rbi/gems/spoom@1.3.0.rbi
index 2a5f77e0b..248e247ba 100644
--- a/sorbet/rbi/gems/spoom@1.3.0.rbi
+++ b/sorbet/rbi/gems/spoom@1.3.0.rbi
@@ -1010,7 +1010,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct
prop :strong, ::String
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -1350,7 +1350,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.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -1524,7 +1524,7 @@ class Spoom::Deadcode::Definition < ::T::Struct
def to_json(*args); end
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -2418,7 +2418,7 @@ class Spoom::Deadcode::Reference < ::T::Struct
def method?; end
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -2660,7 +2660,7 @@ class Spoom::Deadcode::Send < ::T::Struct
def each_arg_assoc(&block); end
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3279,7 +3279,7 @@ class Spoom::ExecResult < ::T::Struct
def to_s; end
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3477,7 +3477,7 @@ class Spoom::FileTree::Node < ::T::Struct
def path; end
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3543,7 +3543,7 @@ class Spoom::Git::Commit < ::T::Struct
def timestamp; end
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
# Parse a line formatted as `%h %at` into a `Commit`
@@ -3655,7 +3655,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.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3688,7 +3688,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.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3746,7 +3746,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.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3771,7 +3771,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.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3834,7 +3834,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.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3872,7 +3872,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.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -3938,7 +3938,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.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
diff --git a/sorbet/rbi/gems/tapioca@0.13.3.rbi b/sorbet/rbi/gems/tapioca@0.13.3.rbi
index afcd6237f..2c31af0e4 100644
--- a/sorbet/rbi/gems/tapioca@0.13.3.rbi
+++ b/sorbet/rbi/gems/tapioca@0.13.3.rbi
@@ -225,7 +225,7 @@ class RBI::TypedParam < ::T::Struct
const :type, ::String
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -1142,7 +1142,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct
const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart]
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -1153,7 +1153,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct
const :colors, T::Array[::Symbol]
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -2453,7 +2453,7 @@ class Tapioca::Loaders::Loader
# @param engine [T.class_of(Rails::Engine)]
# @return [Array]
#
- # source://sorbet-runtime/0.5.11481/lib/types/private/methods/_methods.rb#257
+ # source://sorbet-runtime/0.5.11551/lib/types/private/methods/_methods.rb#257
def eager_load_paths(*args, **_arg1, &blk); end
# source://tapioca//lib/tapioca/loaders/loader.rb#198
@@ -3361,7 +3361,7 @@ module Tapioca::Static::SymbolLoader
# @return [Array]
#
- # source://sorbet-runtime/0.5.11481/lib/types/private/methods/_methods.rb#257
+ # source://sorbet-runtime/0.5.11551/lib/types/private/methods/_methods.rb#257
def engines(*args, **_arg1, &blk); end
# source://tapioca//lib/tapioca/static/symbol_loader.rb#82
diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi
index e3ef31486..2253b49ea 100644
--- a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi
+++ b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi
@@ -381,7 +381,7 @@ class YARDSorbet::TStructProp < ::T::Struct
const :types, T::Array[::String]
class << self
- # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11551/lib/types/struct.rb#13
def inherited(s); end
end
end