diff --git a/Gemfile.lock b/Gemfile.lock index d4ecddad3e7..09addd43e4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -275,24 +275,23 @@ GEM rspec-sorbet (1.9.2) sorbet-runtime rspec-support (3.12.1) - rubocop (1.65.0) + rubocop (1.67.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) rubocop-capybara (2.20.0) rubocop (~> 1.41) rubocop-factory_bot (2.25.1) rubocop (~> 1.41) - rubocop-performance (1.21.0) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rspec (2.29.1) @@ -396,8 +395,8 @@ DEPENDENCIES rake (~> 13) rspec-its (~> 1.3) rspec-sorbet (~> 1.9.2) - rubocop (~> 1.65.0) - rubocop-performance (~> 1.21.0) + rubocop (~> 1.67.0) + rubocop-performance (~> 1.22.1) rubocop-rspec (~> 2.29.1) rubocop-sorbet (~> 0.8.5) simplecov (~> 0.22.0) diff --git a/common/dependabot-common.gemspec b/common/dependabot-common.gemspec index 6fa2ecded63..6edcda243d0 100644 --- a/common/dependabot-common.gemspec +++ b/common/dependabot-common.gemspec @@ -52,8 +52,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rspec", "~> 3.12" spec.add_development_dependency "rspec-its", "~> 1.3" spec.add_development_dependency "rspec-sorbet", "~> 1.9.2" - spec.add_development_dependency "rubocop", "~> 1.65.0" - spec.add_development_dependency "rubocop-performance", "~> 1.21.0" + spec.add_development_dependency "rubocop", "~> 1.67.0" + spec.add_development_dependency "rubocop-performance", "~> 1.22.1" spec.add_development_dependency "rubocop-rspec", "~> 2.29.1" spec.add_development_dependency "rubocop-sorbet", "~> 0.8.5" spec.add_development_dependency "simplecov", "~> 0.22.0" diff --git a/common/lib/dependabot/git_metadata_fetcher.rb b/common/lib/dependabot/git_metadata_fetcher.rb index 415e6dbedd3..ca1dddc92b2 100644 --- a/common/lib/dependabot/git_metadata_fetcher.rb +++ b/common/lib/dependabot/git_metadata_fetcher.rb @@ -235,7 +235,7 @@ def uri_with_auth(uri) uri.scheme = "https" if uri.scheme != "http" - if !uri.password && cred && cred.fetch("username", nil) && cred.fetch("password", nil) + if !uri.password && cred&.fetch("username", nil) && cred.fetch("password", nil) # URI doesn't have authentication details, but we have credentials uri.user = URI.encode_www_form_component(cred["username"]) uri.password = URI.encode_www_form_component(cred["password"]) diff --git a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi b/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi similarity index 81% rename from sorbet/rbi/gems/rubocop-ast@1.31.3.rbi rename to sorbet/rbi/gems/rubocop-ast@1.32.3.rbi index 4043181a6b9..3aabbc493df 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop-ast` gem. # Please instead update this file by running `bin/tapioca gem rubocop-ast`. + class Parser::Source::Range include ::RuboCop::AST::Ext::Range end @@ -22,7 +23,7 @@ end # node when the builder constructs the AST, making its methods available # to all `alias` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#8 class RuboCop::AST::AliasNode < ::RuboCop::AST::Node # Returns the new identifier as specified by the `alias`. # @@ -43,7 +44,7 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#8 class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode # The operator being used for assignment as a symbol. # @@ -84,7 +85,7 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all `arg` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#12 +# source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#9 class RuboCop::AST::ArgNode < ::RuboCop::AST::Node # Checks whether the argument has a default value # @@ -159,12 +160,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 +178,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. @@ -198,7 +203,7 @@ RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#8 class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node # The expression being assigned to the variable. # @@ -216,7 +221,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 +443,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 @@ -567,7 +572,7 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#8 class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node # The expression being assigned to the variable. # @@ -595,7 +600,7 @@ end # node when the builder constructs the AST, making its methods available # to all `class` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#8 class RuboCop::AST::ClassNode < ::RuboCop::AST::Node # The body of this `class` node. # @@ -623,415 +628,412 @@ end # # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#6 module RuboCop::AST::CollectionNode - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # source://forwardable/1.3.2/forwardable.rb#229 - def &(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def &(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def *(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def *(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def +(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def +(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def -(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def -(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def <<(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def <<(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def [](*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def []=(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def all?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def all?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def any?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def any?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def append(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def append(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def assoc(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def assoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def bsearch(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def bsearch_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def chain(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chain(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def chunk(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def chunk_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def clear(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def clear(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def collect(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def collect!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def collect_concat(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect_concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def combination(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def compact(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def compact!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def concat(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def count(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def count(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def cycle(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def cycle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def deconstruct(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def deconstruct(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def delete(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def delete_at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def delete_if(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def detect(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def detect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def difference(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def difference(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def dig(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def drop(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def drop_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def each(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def each_cons(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_cons(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def each_entry(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_entry(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def each_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def each_slice(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def each_with_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def each_with_object(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_object(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def empty?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def empty?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def entries(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def entries(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def fetch(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def fill(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fill(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def filter(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def filter!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def filter_map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def find(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def find_all(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_all(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def find_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def first(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def first(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def flat_map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flat_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def flatten(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def flatten!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def grep(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def grep_v(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep_v(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def group_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def group_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def include?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def include?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def inject(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def inject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def insert(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def insert(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def intersect?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersect?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def intersection(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersection(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def join(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def join(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def keep_if(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keep_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def last(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def lazy(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def lazy(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def length(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def length(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def map!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def max(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def max_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def member?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def member?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def min(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def min_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def minmax(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def minmax_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def none?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def none?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def one?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def one?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def pack(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pack(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def partition(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def partition(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def permutation(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def place(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def place(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def pop(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def prepend(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def prepend(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def product(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def product(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def push(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def push(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def rassoc(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rassoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def reduce(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reduce(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def reject(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def reject!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def repeated_combination(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def repeated_permutation(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def replace(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def reverse(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def reverse!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def reverse_each(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse_each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def rindex(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rindex(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def rotate(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def rotate!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def sample(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sample(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def select(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def select!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def shelljoin(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shelljoin(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def shift(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def shuffle(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def shuffle!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def size(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def size(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def slice(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def slice!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def slice_after(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_after(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def slice_before(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_before(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def slice_when(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_when(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def sort(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def sort!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def sort_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def sort_by!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def sum(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def take(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def take_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def tally(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tally(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def to_ary(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_ary(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def to_csv(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def to_h(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_set(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def to_set(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transpose(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def transpose(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def union(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def union(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def uniq(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def uniq!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def unshift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def unshift(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def values_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def values_at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def zip(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def zip(*args, **_arg1, &block); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def |(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def |(*_arg0, **_arg1, &_arg2); end end # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 @@ -1080,7 +1082,7 @@ end # A node extension for `const` nodes. # -# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#7 +# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#6 class RuboCop::AST::ConstNode < ::RuboCop::AST::Node # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) # @@ -1305,7 +1307,7 @@ end # node when the builder constructs the AST, making its methods available # to all `ensure` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#8 class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node # Returns the body of the `ensure` clause. # @@ -1313,6 +1315,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 @@ -1340,11 +1350,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. @@ -1359,7 +1364,7 @@ end # node when the builder constructs the AST, making its methods available # to all `for` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#8 class RuboCop::AST::ForNode < ::RuboCop::AST::Node # Returns the body of the `for` loop. # @@ -1542,7 +1547,7 @@ end # node when the builder constructs the AST, making its methods available # to all `hash` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#14 +# source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#8 class RuboCop::AST::HashNode < ::RuboCop::AST::Node # Checks whether the `hash` literal is delimited by curly braces. # @@ -1774,7 +1779,7 @@ end # node when the builder constructs the AST, making its methods available # to all `in` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#8 class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node # Returns the body of the `in` node. # @@ -2491,7 +2496,7 @@ end # plain node when the builder constructs the AST, making its methods # available to all `module` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#8 class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node # The body of this `module` node. # @@ -2543,19 +2548,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. @@ -2563,173 +2568,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. @@ -2742,163 +2747,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 @@ -2906,7 +2911,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 @@ -2914,94 +2919,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 @@ -3014,95 +3019,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 @@ -3115,56 +3120,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 @@ -3172,7 +3181,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 @@ -3180,18 +3189,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 @@ -3199,15 +3208,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 @@ -3216,70 +3225,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 @@ -3288,7 +3297,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 @@ -3299,76 +3308,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 @@ -3512,7 +3527,7 @@ RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 class RuboCop::AST::NodePattern include ::RuboCop::AST::NodePattern::MethodDefiner - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [NodePattern] a new instance of NodePattern # @@ -3530,8 +3545,8 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def ast; end - # source://forwardable/1.3.2/forwardable.rb#229 - def captures(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def captures(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 def encode_with(coder); end @@ -3559,16 +3574,16 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def match_code; end - # source://forwardable/1.3.2/forwardable.rb#229 - def named_parameters(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def named_parameters(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute pattern. # # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def pattern; end - # source://forwardable/1.3.2/forwardable.rb#229 - def positional_parameters(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def positional_parameters(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 def to_s; end @@ -3673,15 +3688,15 @@ end # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 class RuboCop::AST::NodePattern::Compiler - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Compiler] a new instance of Compiler # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#15 def initialize; end - # source://forwardable/1.3.2/forwardable.rb#229 - def bind(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bind(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute binding. # @@ -3806,7 +3821,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 @@ -3817,15 +3835,15 @@ end # Variant of the Compiler with tracing information for nodes # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#12 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#10 class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler # @return [Debug] a new instance of Debug # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 def initialize; end - # source://forwardable/1.3.2/forwardable.rb#229 - def comments(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def comments(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 def named_parameters; end @@ -3838,8 +3856,8 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 def parser; end - # source://forwardable/1.3.2/forwardable.rb#229 - def tokens(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tokens(*_arg0, **_arg1, &_arg2); end end # @api private @@ -4154,7 +4172,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 @@ -4308,6 +4325,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) @@ -4614,218 +4633,218 @@ end # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node include ::RuboCop::AST::Descendence - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # Note: `arity.end` may be `Float::INFINITY` # # @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#98 +# 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.2/forwardable.rb#229 - def arity(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def arity(*_arg0, **_arg1, &_arg2); 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.2/forwardable.rb#229 - def rest?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rest?(*_arg0, **_arg1, &_arg2); 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 @@ -4835,150 +4854,150 @@ 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/parser.racc.rb#13 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#12 class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Parser] a new instance of Parser # # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19 def initialize(builder = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#335 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#333 def _reduce_10(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#339 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 def _reduce_11(val, _values); end # reduce 12 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#345 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 def _reduce_13(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#349 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 def _reduce_14(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#353 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 def _reduce_15(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#357 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 def _reduce_16(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#361 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 def _reduce_17(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#365 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 def _reduce_18(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#369 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 def _reduce_19(val, _values); end # reduce 1 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#303 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 def _reduce_2(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#373 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 def _reduce_20(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#377 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 def _reduce_21(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#381 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 def _reduce_22(val, _values); end # reduce 24 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#389 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 def _reduce_25(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#395 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 def _reduce_26(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#307 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 def _reduce_3(val, _values); end # reduce 32 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#415 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 def _reduce_33(val, _values); end # reduce 36 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#425 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 def _reduce_37(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#429 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 def _reduce_38(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#433 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 def _reduce_39(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#311 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 def _reduce_4(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#437 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 def _reduce_40(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#441 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 def _reduce_41(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#445 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 def _reduce_42(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#449 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 def _reduce_43(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#453 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 def _reduce_44(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#457 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 def _reduce_45(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#461 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 def _reduce_46(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#315 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 def _reduce_5(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#319 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 def _reduce_6(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#323 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 def _reduce_7(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#327 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 def _reduce_8(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#331 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 def _reduce_9(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 def _reduce_none(val, _values); end - # source://forwardable/1.3.2/forwardable.rb#229 - def emit_atom(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_atom(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def emit_call(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_call(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def emit_capture(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_capture(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def emit_list(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_list(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def emit_unary_op(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_unary_op(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.2/forwardable.rb#229 - def emit_union(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_union(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 def inspect; end - # source://forwardable/1.3.2/forwardable.rb#229 - def next_token(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def next_token(*_arg0, **_arg1, &_arg2); end # (Similar API to `parser` gem) # Parses a source and returns the AST. @@ -5013,15 +5032,15 @@ RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227 RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#295 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#293 RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#244 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243 RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) # Overrides Parser to use `WithMeta` variants and provide additional methods # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#9 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#8 class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser # Returns the value of attribute comments. # @@ -5233,9 +5252,6 @@ RuboCop::AST::NodePattern::Sets::SET_CONTEXT_SHARED_CONTEXT = T.let(T.unsafe(nil # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) @@ -5257,9 +5273,6 @@ RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ENV = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_EQL_EQ_BE = T.let(T.unsafe(nil), Set) @@ -5359,6 +5372,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) @@ -5438,7 +5454,7 @@ RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGE_CHAIN = T.let(T.uns RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) @@ -5450,7 +5466,7 @@ RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT_FILTER_FILTER = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) @@ -5602,7 +5618,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 @@ -5624,7 +5640,7 @@ RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#9 +# source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#8 class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node # @return [AsgnNode] the assignment node # @@ -5657,7 +5673,7 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#8 class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode # The operator being used for assignment as a symbol. # @@ -5925,7 +5941,7 @@ RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all `arg` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#8 class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode # Returns the name of an argument. # @@ -5939,42 +5955,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 @@ -5982,181 +5998,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 @@ -6172,6 +6188,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. @@ -6270,7 +6296,7 @@ RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) # plain node when the builder constructs the AST, making its methods # available to all `resbody` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#8 class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node # Returns the body of the `rescue` clause. # @@ -6305,7 +6331,7 @@ end # plain node when the builder constructs the AST, making its methods # available to all `rescue` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#8 class RuboCop::AST::RescueNode < ::RuboCop::AST::Node # Returns the body of the rescue node. # @@ -6377,7 +6403,7 @@ RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Has # plain node when the builder constructs the AST, making its methods # available to all `sclass` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#8 class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node # The body of this `sclass` node. # @@ -7124,7 +7150,7 @@ RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) # node when the builder constructs the AST, making its methods available # to all `when` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#11 +# source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#8 class RuboCop::AST::WhenNode < ::RuboCop::AST::Node # Returns the body of the `when` node. # @@ -7213,3 +7239,340 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 def node_parts; end end + +class RuboCop::CommentConfig + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#34 + def initialize(processed_source); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#63 + def comment_only_line?(line_number); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#51 + def cop_disabled_line_ranges; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#39 + def cop_enabled_at_line?(cop, line_number); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#47 + def cop_opted_in?(cop); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#55 + def extra_enabled_comments; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#30 + def processed_source; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end + + private + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#96 + def analyze; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#124 + def analyze_cop(analysis, directive); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#144 + def analyze_disabled(analysis, directive); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#155 + def analyze_rest(analysis, directive); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#135 + def analyze_single_line(analysis, directive); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#164 + def cop_line_ranges(analysis); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#170 + def each_directive; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#69 + def extra_enabled_comments_with_names(extras:, names:); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#190 + def handle_enable_all(directive, names, extras); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#204 + def handle_switch(directive, names, extras); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#115 + def inject_disabled_cops_directives(analyses); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#183 + def non_comment_token_line_numbers; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#83 + def opt_in_cops; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#179 + def qualified_cop_name(cop_name); end +end + +class RuboCop::Config + # source://rubocop/1.67.0/lib/rubocop/config.rb#30 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#170 + def active_support_extensions_enabled?; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#96 + def add_excludes_from_higher_level(highest_config); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#197 + def allowed_camel_case_file?(file); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#241 + def base_dir_for_path_parameters; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#271 + def bundler_lock_file_path; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#51 + def check; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#142 + def clusivity_config_for_badge?(badge); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#108 + def deprecation_check; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#162 + def disabled_new_cops?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#166 + def enabled_new_cops?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#219 + def file_to_exclude?(file); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#178 + def file_to_include?(file); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#158 + def for_all_cops; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#128 + def for_badge(badge); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#122 + def for_cop(cop); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#153 + def for_department(department_name); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#296 + def gem_versions_in_target; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#300 + def inspect; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#76 + def internal?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#47 + def loaded_features; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#20 + def loaded_path; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#81 + def make_excludes_absolute; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#251 + def parser_engine; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#232 + def path_relative_to_config(path); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#228 + def patterns_to_exclude; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#224 + def patterns_to_include; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#282 + def pending_cops; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#211 + def possibly_include_hidden?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#71 + def signature; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#266 + def smart_loaded_path; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#255 + def target_rails_version; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#67 + def to_s; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#58 + def validate_after_resolution; end + + private + + # source://rubocop/1.67.0/lib/rubocop/config.rb#350 + def department_of(qualified_cop_name); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#338 + def enable_cop?(qualified_cop_name, cop_options); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#325 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#331 + def read_gem_versions_from_target_lockfile; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#312 + def read_rails_version_from_bundler_lock_file; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#307 + def target_rails_version_from_bundler_lock_file; end + + class << self + # source://rubocop/1.67.0/lib/rubocop/config.rb#22 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +class RuboCop::ConfigValidator + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#27 + def initialize(config); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#63 + def target_ruby_version; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#33 + def validate; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#59 + def validate_after_resolution; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#67 + def validate_section_presence(name); end + + private + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#104 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#254 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#77 + def check_obsoletions; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#84 + def check_target_ruby; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#195 + def each_invalid_parameter(cop_name); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#120 + def list_unknown_cops(invalid_cop_names); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#274 + def param_error_message(parent, key, value, supposed_values); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#242 + def reject_conflicting_safe_settings; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#233 + def reject_mutually_exclusive_defaults; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#142 + def suggestion(name); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#75 + def target_ruby; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#207 + def validate_enforced_styles(valid_cop_names); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#169 + def validate_new_cops_parameter; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#180 + def validate_parameter_names(valid_cop_names); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#227 + def validate_support_and_has_list(name, formats, valid); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#158 + def validate_syntax_cop; end +end + +# Similar to `Forwardable#def_delegators`, but simpler & faster +# +# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#5 +module RuboCop::SimpleForwardable + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#6 + def def_delegators(accessor, *methods); end +end diff --git a/sorbet/rbi/gems/rubocop-performance@1.21.0.rbi b/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop-performance@1.21.0.rbi rename to sorbet/rbi/gems/rubocop-performance@1.22.1.rbi index 951585c3614..afb57bf5119 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.21.0.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop-performance` gem. # Please instead update this file by running `bin/tapioca gem rubocop-performance`. + # source://rubocop-performance//lib/rubocop/performance.rb#3 module RuboCop; end @@ -13,28 +14,28 @@ module RuboCop::Cop; end module RuboCop::Cop::Lint; end class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - # source://rubocop/1.63.2/lib/rubocop/cop/lint/unused_method_argument.rb#66 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#66 def not_implemented?(param0 = T.unsafe(nil)); end private - # source://rubocop/1.63.2/lib/rubocop/cop/lint/unused_method_argument.rb#81 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#81 def autocorrect(corrector, node); end - # source://rubocop/1.63.2/lib/rubocop/cop/lint/unused_method_argument.rb#85 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#85 def check_argument(variable); end - # source://rubocop/1.63.2/lib/rubocop/cop/lint/unused_method_argument.rb#93 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#93 def ignored_method?(body); end - # source://rubocop/1.63.2/lib/rubocop/cop/lint/unused_method_argument.rb#98 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#98 def message(variable); end class << self # source://rubocop-performance//lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end - # source://rubocop/1.63.2/lib/rubocop/cop/lint/unused_method_argument.rb#75 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#75 def joining_forces; end end end @@ -127,41 +128,51 @@ RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#38 RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set) -# Identifies places where numeric argument to BigDecimal should be -# converted to string. Initializing from String is faster -# than from Numeric for BigDecimal. +# Identifies places where a float argument to BigDecimal should be converted to a string. +# Initializing from String is faster than from Float for BigDecimal. +# +# Also identifies places where an integer string argument to BigDecimal should be converted to +# an integer. Initializing from Integer is faster than from String for BigDecimal. # # @example # # bad -# BigDecimal(1, 2) -# 4.to_d(6) # BigDecimal(1.2, 3, exception: true) # 4.5.to_d(6, exception: true) # # # good -# BigDecimal('1', 2) -# BigDecimal('4', 6) # BigDecimal('1.2', 3, exception: true) # BigDecimal('4.5', 6, exception: true) # -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#23 +# # bad +# BigDecimal('1', 2) +# BigDecimal('4', 6) +# +# # good +# BigDecimal(1, 2) +# 4.to_d(6) +# +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 - def big_decimal_with_numeric_argument?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#39 + def big_decimal_with_numeric_argument(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#48 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#33 - def to_d?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#43 + def to_d(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#26 -RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#35 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG_FROM_FLOAT_TO_STRING = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#27 +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#36 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG_FROM_INTEGER_TO_STRING = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.7, `UnboundMethod#bind_call` has been added. @@ -213,6 +224,9 @@ RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # Identifies unnecessary use of a `block_given?` where explicit check # of block argument would suffice. # +# NOTE: This cop produces code with significantly worse performance when a +# block is being passed to the method and as such should not be enabled. +# # @example # # bad # def method(&block) @@ -231,26 +245,26 @@ RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # ... # end # -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#27 +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#35 + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#38 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#36 def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end class << self - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#51 + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#54 def autocorrect_incompatible_with; end end end -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#31 +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#34 RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `caller[n]` can be replaced by `caller(n..n).first`. @@ -473,7 +487,7 @@ RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # array.map! { |x| x.downcase } # array # -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#27 +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#21 class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#52 def chain_array_allocation?(param0 = T.unsafe(nil)); end @@ -1109,7 +1123,7 @@ class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base def combine_args(first_call_args, second_call_args); end # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#76 - def message(node, receiver, method, combined_args); end + def message(node, receiver, first_call_args, method, combined_args); end # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#68 def process_source(node); end @@ -1479,49 +1493,49 @@ RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # ary.map(&:foo).compact! # ary.compact.map(&:foo) # -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#30 +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#31 class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#40 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#41 def map_compact(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#54 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#54 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#94 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#95 def compact_method_with_final_newline_range(compact_method_range); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#90 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#91 def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#86 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#87 def map_method_and_compact_method_on_same_line?(map_node, compact_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#68 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#69 def remove_compact_method(corrector, map_node, compact_node, chained_method); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#82 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#83 def use_dot?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#35 +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#36 RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#36 +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#37 RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks if the map method is used in a chain. @@ -1961,10 +1975,10 @@ class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#98 def kwsplat_used?(pairs); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#146 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#144 def leading_spaces(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#150 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#148 def max_key_value_pairs; end # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#71 @@ -1998,44 +2012,44 @@ RuboCop::Cop::Performance::RedundantMerge::AREF_ASGN = T.let(T.unsafe(nil), Stri # A utility class for checking the use of values within an # `each_with_object` call. # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#156 +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#154 class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector extend ::RuboCop::AST::NodePattern::Macros # @return [EachWithObjectInspector] a new instance of EachWithObjectInspector # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#159 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#157 def initialize(node, receiver); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#190 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#188 def each_with_object_node(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#164 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#162 def value_used?; end private # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#174 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 def eligible_receiver?; end # Returns the value of attribute node. # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 def node; end # Returns the value of attribute receiver. # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 def receiver; end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#178 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#176 def second_argument; end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#185 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#183 def unwind(receiver); end end diff --git a/sorbet/rbi/gems/rubocop@1.65.0.rbi b/sorbet/rbi/gems/rubocop@1.67.0.rbi similarity index 96% rename from sorbet/rbi/gems/rubocop@1.65.0.rbi rename to sorbet/rbi/gems/rubocop@1.67.0.rbi index 043692fda01..53b26c0d920 100644 --- a/sorbet/rbi/gems/rubocop@1.65.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.67.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop` gem. # Please instead update this file by running `bin/tapioca gem rubocop`. + class Parser::Source::Comment include ::RuboCop::Ext::Comment end @@ -221,12 +222,6 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#73 def only_exclude?; end - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#162 - def options_config_in_root?; end - # @api private # @return [Boolean] # @@ -439,11 +434,11 @@ RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop//lib/rubocop/cli/command/lsp.rb#10 +# source://rubocop//lib/rubocop/cli/command/lsp.rb#8 class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 + # source://rubocop//lib/rubocop/cli/command/lsp.rb#11 def run; end end @@ -764,7 +759,7 @@ end # # source://rubocop//lib/rubocop/comment_config.rb#6 class RuboCop::CommentConfig - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [CommentConfig] a new instance of CommentConfig # @@ -776,8 +771,8 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://forwardable/1.3.3/forwardable.rb#231 - def config(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/comment_config.rb#51 def cop_disabled_line_ranges; end @@ -800,8 +795,8 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://forwardable/1.3.3/forwardable.rb#231 - def registry(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end private @@ -969,18 +964,18 @@ end class RuboCop::Config include ::RuboCop::PathUtil include ::RuboCop::FileFinder - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Config] a new instance of Config # # source://rubocop//lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # @@ -992,7 +987,7 @@ class RuboCop::Config # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#193 + # source://rubocop//lib/rubocop/config.rb#197 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -1001,12 +996,12 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # source://rubocop//lib/rubocop/config.rb#237 + # source://rubocop//lib/rubocop/config.rb#241 def base_dir_for_path_parameters; end # @return [String, nil] # - # source://rubocop//lib/rubocop/config.rb#267 + # source://rubocop//lib/rubocop/config.rb#271 def bundler_lock_file_path; end # source://rubocop//lib/rubocop/config.rb#51 @@ -1018,42 +1013,42 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#108 def deprecation_check; end - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://rubocop//lib/rubocop/config.rb#162 def disabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_key(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://rubocop//lib/rubocop/config.rb#166 def enabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#215 + # source://rubocop//lib/rubocop/config.rb#219 def file_to_exclude?(file); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#174 + # source://rubocop//lib/rubocop/config.rb#178 def file_to_include?(file); end # source://rubocop//lib/rubocop/config.rb#158 @@ -1084,10 +1079,10 @@ class RuboCop::Config # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) # - # source://rubocop//lib/rubocop/config.rb#292 + # source://rubocop//lib/rubocop/config.rb#296 def gem_versions_in_target; end - # source://rubocop//lib/rubocop/config.rb#296 + # source://rubocop//lib/rubocop/config.rb#300 def inspect; end # True if this is a config file that is shipped with RuboCop @@ -1097,11 +1092,11 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#76 def internal?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def key?(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keys(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#47 def loaded_features; end @@ -1114,25 +1109,25 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#81 def make_excludes_absolute; end - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def merge(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#247 + # source://rubocop//lib/rubocop/config.rb#251 def parser_engine; end - # source://rubocop//lib/rubocop/config.rb#228 + # source://rubocop//lib/rubocop/config.rb#232 def path_relative_to_config(path); end - # source://rubocop//lib/rubocop/config.rb#224 + # source://rubocop//lib/rubocop/config.rb#228 def patterns_to_exclude; end - # source://rubocop//lib/rubocop/config.rb#220 + # source://rubocop//lib/rubocop/config.rb#224 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#278 + # source://rubocop//lib/rubocop/config.rb#282 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1140,69 +1135,74 @@ class RuboCop::Config # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#207 + # source://rubocop//lib/rubocop/config.rb#211 def possibly_include_hidden?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#71 def signature; end - # source://rubocop//lib/rubocop/config.rb#262 + # source://rubocop//lib/rubocop/config.rb#266 def smart_loaded_path; end - # source://rubocop//lib/rubocop/config.rb#251 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop//lib/rubocop/config.rb#255 def target_rails_version; end - # source://forwardable/1.3.3/forwardable.rb#231 - def target_ruby_version(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_hash(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#67 def to_s; end - # source://forwardable/1.3.3/forwardable.rb#231 - def transform_values(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def validate(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#58 def validate_after_resolution; end private - # source://rubocop//lib/rubocop/config.rb#346 + # source://rubocop//lib/rubocop/config.rb#350 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#334 + # source://rubocop//lib/rubocop/config.rb#338 def enable_cop?(qualified_cop_name, cop_options); end # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` # @return [Float] The major and minor version, like `7.1` # - # source://rubocop//lib/rubocop/config.rb#321 + # source://rubocop//lib/rubocop/config.rb#325 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop//lib/rubocop/config.rb#327 + # source://rubocop//lib/rubocop/config.rb#331 def read_gem_versions_from_target_lockfile; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # source://rubocop//lib/rubocop/config.rb#308 + # source://rubocop//lib/rubocop/config.rb#312 def read_rails_version_from_bundler_lock_file; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # source://rubocop//lib/rubocop/config.rb#303 + # source://rubocop//lib/rubocop/config.rb#307 def target_rails_version_from_bundler_lock_file; end class << self @@ -1519,10 +1519,10 @@ class RuboCop::ConfigLoader def resolver; end # source://rubocop//lib/rubocop/config_loader.rb#238 - def yaml_safe_load(yaml_code, filename); end + def yaml_tree_to_hash(yaml_tree); end # source://rubocop//lib/rubocop/config_loader.rb#248 - def yaml_safe_load!(yaml_code, filename); end + def yaml_tree_to_hash!(yaml_tree); end end end @@ -1629,12 +1629,12 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#268 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 def gem_config_path(gem_name, relative_config_path); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#245 def handle_disabled_by_default(config, new_default_configuration); end # @api private @@ -1674,7 +1674,7 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#264 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#263 def transform(config, &block); end # @api private @@ -2256,23 +2256,23 @@ end # # source://rubocop//lib/rubocop/config_validator.rb#6 class RuboCop::ConfigValidator - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [ConfigValidator] a new instance of ConfigValidator # - # source://rubocop//lib/rubocop/config_validator.rb#26 + # source://rubocop//lib/rubocop/config_validator.rb#27 def initialize(config); end - # source://forwardable/1.3.3/forwardable.rb#231 - def for_all_cops(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def smart_loaded_path(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config_validator.rb#62 + # source://rubocop//lib/rubocop/config_validator.rb#63 def target_ruby_version; end - # source://rubocop//lib/rubocop/config_validator.rb#32 + # source://rubocop//lib/rubocop/config_validator.rb#33 def validate; end # Validations that should only be run after all config resolving has @@ -2281,76 +2281,76 @@ class RuboCop::ConfigValidator # chain has been loaded so that only the final value is validated, and # any obsolete but overridden values are ignored. # - # source://rubocop//lib/rubocop/config_validator.rb#58 + # source://rubocop//lib/rubocop/config_validator.rb#59 def validate_after_resolution; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#66 + # source://rubocop//lib/rubocop/config_validator.rb#67 def validate_section_presence(name); end private # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#103 + # source://rubocop//lib/rubocop/config_validator.rb#104 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#253 + # source://rubocop//lib/rubocop/config_validator.rb#254 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_validator.rb#76 + # source://rubocop//lib/rubocop/config_validator.rb#77 def check_obsoletions; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#83 + # source://rubocop//lib/rubocop/config_validator.rb#84 def check_target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#194 + # source://rubocop//lib/rubocop/config_validator.rb#195 def each_invalid_parameter(cop_name); end - # source://rubocop//lib/rubocop/config_validator.rb#119 + # source://rubocop//lib/rubocop/config_validator.rb#120 def list_unknown_cops(invalid_cop_names); end # FIXME: Handling colors in exception messages like this is ugly. # - # source://rubocop//lib/rubocop/config_validator.rb#273 + # source://rubocop//lib/rubocop/config_validator.rb#274 def param_error_message(parent, key, value, supposed_values); end - # source://rubocop//lib/rubocop/config_validator.rb#241 + # source://rubocop//lib/rubocop/config_validator.rb#242 def reject_conflicting_safe_settings; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#232 + # source://rubocop//lib/rubocop/config_validator.rb#233 def reject_mutually_exclusive_defaults; end - # source://rubocop//lib/rubocop/config_validator.rb#141 + # source://rubocop//lib/rubocop/config_validator.rb#142 def suggestion(name); end # Returns the value of attribute target_ruby. # - # source://rubocop//lib/rubocop/config_validator.rb#74 + # source://rubocop//lib/rubocop/config_validator.rb#75 def target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#206 + # source://rubocop//lib/rubocop/config_validator.rb#207 def validate_enforced_styles(valid_cop_names); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#168 + # source://rubocop//lib/rubocop/config_validator.rb#169 def validate_new_cops_parameter; end - # source://rubocop//lib/rubocop/config_validator.rb#179 + # source://rubocop//lib/rubocop/config_validator.rb#180 def validate_parameter_names(valid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#226 + # source://rubocop//lib/rubocop/config_validator.rb#227 def validate_support_and_has_list(name, formats, valid); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#157 + # source://rubocop//lib/rubocop/config_validator.rb#158 def validate_syntax_cop; end end @@ -2359,25 +2359,25 @@ end # source://rubocop//lib/rubocop/config_validator.rb#10 RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/config_validator.rb#21 +# source://rubocop//lib/rubocop/config_validator.rb#22 RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/config_validator.rb#20 +# source://rubocop//lib/rubocop/config_validator.rb#21 RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#19 +# source://rubocop//lib/rubocop/config_validator.rb#20 RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#12 +# source://rubocop//lib/rubocop/config_validator.rb#13 RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#16 +# source://rubocop//lib/rubocop/config_validator.rb#17 RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/util.rb#4 @@ -2626,85 +2626,83 @@ RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#6 class RuboCop::Cop::AnnotationComment - extend ::Forwardable - # @param comment [Parser::Source::Comment] # @param keywords [Array] # @return [AnnotationComment] a new instance of AnnotationComment # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#13 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#11 def initialize(comment, keywords); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#19 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#17 def annotation?; end # Returns the range bounds for just the annotation # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#31 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#29 def bounds; end # Returns the value of attribute colon. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def colon; end # Returns the value of attribute comment. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def comment; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#21 def correct?(colon:); end # Returns the value of attribute keyword. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def keyword; end # Returns the value of attribute margin. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def margin; end # Returns the value of attribute note. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def note; end # Returns the value of attribute space. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def space; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#67 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#65 def just_keyword_of_sentence?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#63 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#61 def keyword_appearance?; end # Returns the value of attribute keywords. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#37 def keywords; end - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#53 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#51 def regex; end - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 def split_comment(comment); end end -# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#50 +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#48 RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) # Handles the `MinSize` configuration option for array-based cops @@ -2962,19 +2960,19 @@ class RuboCop::Cop::Base # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#343 + # source://rubocop//lib/rubocop/cop/base.rb#351 def always_autocorrect?; end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#329 + # source://rubocop//lib/rubocop/cop/base.rb#337 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#314 + # source://rubocop//lib/rubocop/cop/base.rb#318 def callbacks_needed; end # Returns the value of attribute config. @@ -2991,7 +2989,7 @@ class RuboCop::Cop::Base # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#349 + # source://rubocop//lib/rubocop/cop/base.rb#357 def contextual_autocorrect?; end # Configuration Helpers @@ -3004,7 +3002,7 @@ class RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#285 + # source://rubocop//lib/rubocop/cop/base.rb#289 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -3026,7 +3024,7 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#234 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#353 + # source://rubocop//lib/rubocop/cop/base.rb#361 def inspect; end # Gets called if no message is specified when calling `add_offense` or @@ -3041,7 +3039,7 @@ class RuboCop::Cop::Base # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#305 + # source://rubocop//lib/rubocop/cop/base.rb#309 def offenses; end # Called after all on_... have been called @@ -3064,7 +3062,7 @@ class RuboCop::Cop::Base # There should be very limited reasons for a Cop to do it's own parsing # - # source://rubocop//lib/rubocop/cop/base.rb#290 + # source://rubocop//lib/rubocop/cop/base.rb#294 def parse(source, path = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/base.rb#264 @@ -3079,14 +3077,19 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#296 + # source://rubocop//lib/rubocop/cop/base.rb#300 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#276 + # source://rubocop//lib/rubocop/cop/base.rb#280 def relevant_file?(file); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#276 + def string_literals_frozen_by_default?; end + # source://rubocop//lib/rubocop/cop/base.rb#268 def target_rails_version; end @@ -3095,90 +3098,90 @@ class RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/base.rb#471 + # source://rubocop//lib/rubocop/cop/base.rb#479 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#365 + # source://rubocop//lib/rubocop/cop/base.rb#373 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#435 + # source://rubocop//lib/rubocop/cop/base.rb#443 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#361 + # source://rubocop//lib/rubocop/cop/base.rb#369 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#394 + # source://rubocop//lib/rubocop/cop/base.rb#402 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#409 + # source://rubocop//lib/rubocop/cop/base.rb#417 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#379 + # source://rubocop//lib/rubocop/cop/base.rb#387 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#371 + # source://rubocop//lib/rubocop/cop/base.rb#379 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#383 + # source://rubocop//lib/rubocop/cop/base.rb#391 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#375 + # source://rubocop//lib/rubocop/cop/base.rb#383 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#499 + # source://rubocop//lib/rubocop/cop/base.rb#507 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#495 + # source://rubocop//lib/rubocop/cop/base.rb#503 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#449 + # source://rubocop//lib/rubocop/cop/base.rb#457 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#485 + # source://rubocop//lib/rubocop/cop/base.rb#493 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#477 + # source://rubocop//lib/rubocop/cop/base.rb#485 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#467 + # source://rubocop//lib/rubocop/cop/base.rb#475 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#491 + # source://rubocop//lib/rubocop/cop/base.rb#499 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#512 + # source://rubocop//lib/rubocop/cop/base.rb#520 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#464 def range_from_node_or_range(node_or_range); end # Actually private methods # - # source://rubocop//lib/rubocop/cop/base.rb#404 + # source://rubocop//lib/rubocop/cop/base.rb#412 def reset_investigation; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#520 + # source://rubocop//lib/rubocop/cop/base.rb#528 def target_satisfies_all_gem_version_requirements?; end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#424 + # source://rubocop//lib/rubocop/cop/base.rb#432 def use_corrector(range, corrector); end class << self @@ -3198,7 +3201,7 @@ class RuboCop::Cop::Base # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#319 + # source://rubocop//lib/rubocop/cop/base.rb#323 def callbacks_needed; end # source://rubocop//lib/rubocop/cop/base.rb#97 @@ -3289,12 +3292,12 @@ class RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/base.rb#387 + # source://rubocop//lib/rubocop/cop/base.rb#395 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#391 +# source://rubocop//lib/rubocop/cop/base.rb#399 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -3812,56 +3815,56 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::GemDeclaration - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#67 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#68 def includes_commit_reference?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#62 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#63 def includes_version_specification?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#71 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#72 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#85 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#86 def allowed_gem?(node); end - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#89 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#90 def allowed_gems; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#111 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#112 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#117 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#118 def forbidden_style?; end - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#94 def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#101 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#102 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#105 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#106 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#121 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#122 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#125 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#126 def version_specification?(expression); end end @@ -3872,6 +3875,9 @@ RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#59 +RuboCop::Cop::Bundler::GemVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#60 RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) # Passing symbol arguments to `source` (e.g. `source :rubygems`) is @@ -4900,22 +4906,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#65 + # source://rubocop//lib/rubocop/cop/cop.rb#73 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#121 + # source://rubocop//lib/rubocop/cop/cop.rb#129 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @deprecated # - # source://rubocop//lib/rubocop/cop/cop.rb#97 + # source://rubocop//lib/rubocop/cop/cop.rb#105 def corrections; end - # source://rubocop//lib/rubocop/cop/cop.rb#82 + # source://rubocop//lib/rubocop/cop/cop.rb#90 def find_location(node, loc); end # Returns the value of attribute offenses. @@ -4925,71 +4931,76 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # Called after all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#114 + # source://rubocop//lib/rubocop/cop/cop.rb#122 def on_investigation_end; end # Called before all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#108 + # source://rubocop//lib/rubocop/cop/cop.rb#116 def on_new_investigation; end # @deprecated Use class method # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/cop.rb#88 + # source://rubocop//lib/rubocop/cop/cop.rb#96 def support_autocorrect?; end private - # source://rubocop//lib/rubocop/cop/cop.rb#139 + # source://rubocop//lib/rubocop/cop/cop.rb#147 def apply_correction(corrector); end # Override Base # - # source://rubocop//lib/rubocop/cop/cop.rb#135 + # source://rubocop//lib/rubocop/cop/cop.rb#143 def callback_argument(_range); end - # source://rubocop//lib/rubocop/cop/cop.rb#156 + # source://rubocop//lib/rubocop/cop/cop.rb#164 def correction_lambda; end - # source://rubocop//lib/rubocop/cop/cop.rb#162 + # source://rubocop//lib/rubocop/cop/cop.rb#170 def dedupe_on_node(node); end # Just for legacy # # @yield [corrector] # - # source://rubocop//lib/rubocop/cop/cop.rb#144 + # source://rubocop//lib/rubocop/cop/cop.rb#152 def emulate_v0_callsequence(corrector); end - # source://rubocop//lib/rubocop/cop/cop.rb#175 + # source://rubocop//lib/rubocop/cop/cop.rb#183 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/cop.rb#169 + # source://rubocop//lib/rubocop/cop/cop.rb#177 def suppress_clobbering; end class << self # @deprecated Use Registry.all # - # source://rubocop//lib/rubocop/cop/cop.rb#48 + # source://rubocop//lib/rubocop/cop/cop.rb#56 def all; end - # source://rubocop//lib/rubocop/cop/cop.rb#29 + # @private + # + # source://rubocop//lib/rubocop/cop/cop.rb#25 + def inherited(_subclass); end + + # source://rubocop//lib/rubocop/cop/cop.rb#37 def joining_forces; end # @deprecated Use Registry.qualified_cop_name # - # source://rubocop//lib/rubocop/cop/cop.rb#57 + # source://rubocop//lib/rubocop/cop/cop.rb#65 def qualified_cop_name(name, origin); end # @deprecated Use Registry.global # - # source://rubocop//lib/rubocop/cop/cop.rb#39 + # source://rubocop//lib/rubocop/cop/cop.rb#47 def registry; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/cop.rb#25 + # source://rubocop//lib/rubocop/cop/cop.rb#33 def support_autocorrect?; end end end @@ -5157,24 +5168,34 @@ module RuboCop::Cop::Documentation # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 + # source://rubocop//lib/rubocop/cop/documentation.rb#25 def base_url_for(cop_class, config); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#40 + # source://rubocop//lib/rubocop/cop/documentation.rb#57 def builtin?(cop_class); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#35 + # source://rubocop//lib/rubocop/cop/documentation.rb#47 def default_base_url; end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#10 def department_to_basename(department); end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#15 @@ -5183,25 +5204,35 @@ module RuboCop::Cop::Documentation class << self # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 + # source://rubocop//lib/rubocop/cop/documentation.rb#25 def base_url_for(cop_class, config); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/documentation.rb#40 + # source://rubocop//lib/rubocop/cop/documentation.rb#57 def builtin?(cop_class); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#35 + # source://rubocop//lib/rubocop/cop/documentation.rb#47 def default_base_url; end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#10 def department_to_basename(department); end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#15 @@ -5596,21 +5627,24 @@ module RuboCop::Cop::FrozenStringLiteral # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 def frozen_string_literal_comment_exists?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#66 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 def frozen_string_literal_specified?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#60 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#70 def frozen_string_literals_disabled?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#42 def frozen_string_literals_enabled?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#86 def leading_comment_lines; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#72 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#82 def leading_magic_comments; end + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#35 + def uninterpolated_heredoc?(node); end + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#31 def uninterpolated_string?(node); end @@ -7300,19 +7334,19 @@ class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#58 def check_body(body, node); end - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#65 + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#69 def check_modifier(send_node, end_range); end - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#92 def expected_indent_offset; end - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#84 + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 def message(range); end # An offset that is not expected, but correct if the configuration is # changed. # - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#94 + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#98 def unexpected_indent_offset; end end @@ -7496,7 +7530,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 @@ -7511,7 +7545,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 @@ -7519,17 +7553,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. @@ -7604,7 +7638,7 @@ RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) # start of the line where the expression started. # # `either` (which is the default) : the `end` is allowed to be in either -# location. The autofixer will default to `start_of_line`. +# location. The autocorrect will default to `start_of_line`. # # @example EnforcedStyleAlignWith: either (default) # # bad @@ -7669,54 +7703,63 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#228 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#246 def add_space_before(corrector, loc, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#205 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#223 def alt_start_msg(start_loc, source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#155 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#145 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 def block_end_align_target(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#123 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#113 def check_block_alignment(start_node, block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#178 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#196 def compute_do_source_line_column(node, end_loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#220 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#238 def compute_start_col(ancestor_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#119 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#109 def disqualified_parent?(parent, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 def end_align_target?(node, parent); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#168 + # In offense message, we want to show the assignment LHS rather than + # the entire assignment. + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#191 + def find_lhs_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#162 def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#233 def format_source_line_column(source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 def loc_to_source_line_column(loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#136 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#126 def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#232 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#250 def remove_space_before(corrector, end_pos, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#172 def start_for_block_node(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#179 + def start_for_line_node(block_node); end end # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 @@ -8517,43 +8560,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 @@ -9176,19 +9216,14 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # `AllowAdjacentOneLineDefs` configures whether adjacent # one-line definitions are considered an offense. # -# @example AllowAdjacentOneLineDefs: false +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. # # # bad -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end +# def a +# end +# def b +# end # @example # # # good @@ -9252,14 +9287,19 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # class ErrorB < BaseError; end # # class ErrorC < BaseError; end -# @example EmptyLineBetweenMethodDefs: true (default) -# # checks for empty lines between method definitions. +# @example AllowAdjacentOneLineDefs: false # # # bad -# def a -# end -# def b -# end +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end # # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base @@ -9285,84 +9325,84 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#290 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#291 def allowance_range?; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#274 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#275 def autocorrect_insert_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#268 def autocorrect_remove_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#227 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#228 def blank_lines_count_between(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#171 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#172 def candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#192 def class_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#255 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#256 def def_end(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#163 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#164 def def_location(correction_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#247 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#248 def def_start(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#178 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#179 def empty_line_between_macros; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#259 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#260 def end_loc(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#205 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#206 def expected_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#223 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#224 def line_count_allowed?(count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#239 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#240 def lines_between_defs(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#183 def macro_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#235 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#236 def maximum_empty_lines; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#199 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#200 def message(node, count: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#188 def method_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#231 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#232 def minimum_empty_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#196 def module_candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#215 def multiple_blank_lines_groups?(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#281 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#282 def node_type(node); end class << self @@ -10056,22 +10096,24 @@ class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCo # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 def check_body(body, line_of_def_or_kwbegin); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#113 def keyword_locations(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#130 def keyword_locations_in_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#121 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#126 def keyword_locations_in_rescue(node); end + # @return [Boolean] + # # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 - def last_rescue_and_end_on_same_line(body); end + def last_body_and_end_on_same_line?(body); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#100 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#105 def message(location, keyword); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#109 def style; end end @@ -10730,7 +10772,6 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # defined inside a method call. # # # bad -# # consistent # array = [ # :value # ] @@ -10750,68 +10791,66 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # brackets are indented to the same position. # # # bad -# # align_brackets # and_now_for_something = [ # :completely_different # ] # # # good -# # align_brackets # and_now_for_something = [ # :completely_different # ] # -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#85 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::MultilineElementIndentation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 def on_array(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#191 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#188 def array_alignment_config; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#111 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 def autocorrect(corrector, node); end # Returns the description of what the correct indentation is based on. # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#149 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#146 def base_description(indent_base_type); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#115 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 def brace_alignment_style; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#119 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#116 def check(array_node, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#133 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#130 def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#185 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#182 def enforce_first_argument_with_fixed_indentation?; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#162 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#159 def message(base_description); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#170 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#167 def message_for_right_bracket(indent_base_type); end end -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first element in a @@ -11153,30 +11192,36 @@ RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), Stri # qux: "b", # } # ) +# @example AllowedMethods: ['some_method'] +# +# # good +# some_method(foo, bar, +# baz) # -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#66 +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#71 class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::FirstElementLineBreak + include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_super(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#91 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#99 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#70 +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#76 RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first parameter in a @@ -11340,16 +11385,22 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # Alternatively you can specify multiple allowed styles. That's done by # passing a list of styles to EnforcedStyles. # -# @example EnforcedLastArgumentHashStyle: ignore_explicit -# # Ignore only explicit hashes. -# +# @example EnforcedHashRocketStyle: key (default) # # bad -# do_something(foo: 1, -# bar: 2) +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } # # # good -# do_something({foo: 1, -# bar: 2}) +# { +# :foo => bar, +# :ba => baz +# } # @example EnforcedHashRocketStyle: separator # # bad # { @@ -11468,22 +11519,16 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # # good # do_something(foo: 1, # bar: 2) -# @example EnforcedHashRocketStyle: key (default) +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. +# # # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } +# do_something(foo: 1, +# bar: 2) # # # good -# { -# :foo => bar, -# :ba => baz -# } +# do_something({foo: 1, +# bar: 2}) # # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base @@ -12126,13 +12171,12 @@ end # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#40 RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) -# Checks for indentation that doesn't use the specified number -# of spaces. +# Checks for indentation that doesn't use the specified number of spaces. +# The indentation width can be configured using the `Width` setting. The default width is 2. # -# See also the IndentationConsistency cop which is the companion to this -# one. +# See also the `Layout/IndentationConsistency` cop which is the companion to this one. # -# @example +# @example Width: 2 (default) # # bad # class A # def test @@ -12165,7 +12209,7 @@ RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#45 +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#44 class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp @@ -12175,126 +12219,126 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#57 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#56 def access_modifier?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#80 def on_block(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#138 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#137 def on_case(case_node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#146 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#145 def on_case_match(case_match); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#103 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#120 def on_def(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#120 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 def on_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 def on_for(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#155 def on_if(node, base = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#72 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 def on_module(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#80 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 def on_resbody(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#61 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#60 def on_rescue(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#103 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#127 def on_until(node, base = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#127 def on_while(node, base = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#227 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#226 def access_modifier_indentation_style; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#165 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#164 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#235 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#234 def check_assignment(node, rhs); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#255 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#254 def check_if(node, body, else_clause, base_loc); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#268 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#267 def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#169 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#168 def check_members(base, members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#193 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#192 def check_members_for_indented_internal_methods_style(members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#199 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#198 def check_members_for_normal_style(base, members); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#341 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#340 def check_rescue?(rescue_node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#377 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#376 def configured_indentation_width; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#207 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#206 def each_member(members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#231 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#230 def indentation_consistency_style; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#323 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#322 def indentation_to_check?(base_loc, body_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#219 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#218 def indented_internal_methods_style?; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#381 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#380 def leftmost_modifier_of(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#302 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#301 def message(configured_indentation_width, indentation, name); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#360 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#359 def offending_range(body_node, indentation); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#278 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#277 def offense(body_node, indentation, style); end # Returns true if the given node is within another node that has @@ -12302,29 +12346,29 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#313 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#312 def other_offense_in_same_range?(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#181 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#180 def select_check_member(member); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#345 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#344 def skip_check?(base_loc, body_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#223 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#222 def special_modifier?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#368 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#367 def starts_with_access_modifier?(body_node); end end -# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#53 +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#52 RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) # Checks for indentation of the first non-blank non-comment @@ -12404,72 +12448,98 @@ RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) # # #ruby=2.7.0 # #ruby-gemset=myproject +# @example AllowRBSInlineAnnotation: false (default) # -# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#52 +# # bad +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# @example AllowRBSInlineAnnotation: true +# +# # good +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#70 class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#58 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#76 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#95 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#114 def allow_doxygen_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#103 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#122 def allow_gemfile_ruby_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#79 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#138 + def allow_rbs_inline_annotation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#98 def allowed_on_first_line?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#99 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#118 def doxygen_comment_style?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#107 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#126 def gemfile?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#115 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#134 def gemfile_ruby_comment?(comment); end - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#75 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#94 def hash_mark(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#91 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#110 def rackup_config_file?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#87 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#106 def rackup_options?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#111 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#142 + def rbs_inline_annotation?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#130 def ruby_comment_in_gemfile?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#83 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#102 def shebang?(comment); end end -# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#56 +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#74 RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) # Checks for unnecessary leading blank lines at the beginning @@ -12808,20 +12878,20 @@ RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_IN # * `Layout/ArrayAlignment` # * `Layout/BlockAlignment` # * `Layout/BlockEndNewline` -# * `LayoutClosingParenthesisIndentation` -# * `LayoutFirstArgumentIndentation` -# * `LayoutFirstArrayElementIndentation` -# * `LayoutFirstHashElementIndentation` -# * `LayoutFirstParameterIndentation` -# * `LayoutHashAlignment` -# * `LayoutIndentationWidth` -# * `LayoutMultilineArrayLineBreaks` -# * `LayoutMultilineBlockLayout` -# * `LayoutMultilineHashBraceLayout` -# * `LayoutMultilineHashKeyLineBreaks` -# * `LayoutMultilineMethodArgumentLineBreaks` -# * `LayoutMultilineMethodParameterLineBreaks` -# * `Layout/ParameterAlignment` +# * `Layout/ClosingParenthesisIndentation` +# * `Layout/FirstArgumentIndentation` +# * `Layout/FirstArrayElementIndentation` +# * `Layout/FirstHashElementIndentation` +# * `Layout/FirstParameterIndentation` +# * `Layout/HashAlignment` +# * `Layout/IndentationWidth` +# * `Layout/MultilineArrayLineBreaks` +# * `Layout/MultilineBlockLayout` +# * `Layout/MultilineHashBraceLayout` +# * `Layout/MultilineHashKeyLineBreaks` +# * `Layout/MultilineMethodArgumentLineBreaks` +# * `Layout/MultilineMethodParameterLineBreaks` +# * `Layout//ParameterAlignment` # * `Style/BlockDelimiters` # # Together, these cops will pretty print hashes, arrays, @@ -16548,7 +16618,7 @@ class RuboCop::Cop::LineBreakCorrector # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#58 + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#60 def trailing_class_definition?(token, body); end end end @@ -16593,7 +16663,7 @@ module RuboCop::Cop::LineLengthHelp # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#32 def line_length(line); end - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#105 + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#110 def line_length_without_directive(line); end # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#51 @@ -16607,7 +16677,7 @@ module RuboCop::Cop::LineLengthHelp # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#98 + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#103 def valid_uri?(uri_ish_string); end end @@ -16676,7 +16746,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. @@ -16709,38 +16778,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 @@ -16753,51 +16822,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 @@ -16918,38 +16986,39 @@ RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsa # # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#59 class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RationalLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#65 def on_erange(node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#65 def on_irange(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#82 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#84 def acceptable?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#89 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#92 def acceptable_call?(node); end # @yield [range.begin] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#77 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#78 def each_boundary(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#99 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#102 def require_parentheses_for_method_chain?; end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#62 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#63 RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) # Checks for ambiguous regexp literals in the first argument of @@ -16963,40 +17032,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 @@ -17090,17 +17158,17 @@ RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T. class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#25 + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#24 def big_decimal_new(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#30 + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#29 def on_send(node); end end # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#20 RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#22 +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#21 RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for places where binary operator has identical operands. @@ -17162,7 +17230,6 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni # # # good # true -# @example # # # bad # :false @@ -17170,23 +17237,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 @@ -17197,54 +17264,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 @@ -17491,7 +17549,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # binding.pry # do_something # end -# @example # # # bad (ok during development) # @@ -17500,7 +17557,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # byebug # do_something # end -# @example # # # good # @@ -17520,50 +17576,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. @@ -17700,25 +17756,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') @@ -17726,51 +17774,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 @@ -17967,17 +18015,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 @@ -17985,13 +18030,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'. @@ -18028,23 +18073,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. @@ -18196,7 +18238,6 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def foo # 1 # end @@ -18204,19 +18245,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 @@ -18224,98 +18261,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. @@ -18463,6 +18498,53 @@ end # source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) +# Checks for duplicate literal, constant, or variable elements in Set. +# +# @example +# +# # bad +# Set[:foo, :bar, :foo] +# +# # good +# Set[:foo, :bar] +# +# # bad +# Set.new([:foo, :bar, :foo]) +# +# # good +# Set.new([:foo, :bar]) +# +# # bad +# [:foo, :bar, :foo].to_set +# +# # good +# [:foo, :bar].to_set +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#28 +class RuboCop::Cop::Lint::DuplicateSetElement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#43 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#43 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#35 + def set_init_elements(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#64 + def register_offense(current_element, prev_element); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#31 +RuboCop::Cop::Lint::DuplicateSetElement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#32 +RuboCop::Cop::Lint::DuplicateSetElement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks if each_with_object is called with an immutable # argument. Since the argument is the object that the given block shall # make calls on to build something based on the enumerable that @@ -18472,31 +18554,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 @@ -18516,7 +18595,6 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni # else do_this # do_that # end -# @example # # # good # @@ -18536,28 +18614,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. @@ -18781,104 +18859,100 @@ class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#70 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#71 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#156 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#177 def all_branches_body_missing?(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#83 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#95 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#142 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#163 def branch_range(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#104 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#125 def correct_other_branches(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#162 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#183 def deletion_range(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#158 def else_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#131 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#152 def empty_elsif_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#123 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#144 def empty_if_branch?(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#89 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#87 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#101 def remove_comments(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#96 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#109 def remove_empty_branch(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#116 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 def require_other_branches_correction?(node); end 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. @@ -19013,24 +19087,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. @@ -19043,7 +19114,6 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # do_something # when baz # end -# @example # # # good # case condition @@ -19071,15 +19141,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. @@ -19092,17 +19162,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 @@ -19110,8 +19177,7 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # cleanup # end # -# # also good -# +# # good # def foo # begin # do_something @@ -19123,16 +19189,13 @@ 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#45 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#43 RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warnings in Ruby 2.6. @@ -19276,7 +19339,15 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # floating-point value representation to be exactly the same, which is very unlikely # if you perform any arithmetic operations involving precision loss. # -# # good - comparing against zero +# @example +# # bad +# x == 0.1 +# x != 0.1 +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# # good - comparing against zero # x == 0.0 # x != 0.0 # @@ -19290,14 +19361,6 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # # Or some other epsilon based type of comparison: # # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ # -# @example -# # bad -# x == 0.1 -# x != 0.1 -# -# # good - using BigDecimal -# x.to_d == 0.1.to_d -# # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 @@ -19344,21 +19407,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 @@ -19372,138 +19432,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` @@ -19683,12 +19736,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 = [ @@ -19696,45 +19746,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 extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#36 + # 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#90 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#92 def display_str(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#57 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#59 def each_bad_cons(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#72 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#74 def ending_delimiter(str); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#98 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#100 def str_content(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#84 def string_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#88 def string_literals?(node1, node2); end end -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 +# 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#32 +# 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#28 +# 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. @@ -19796,7 +19846,6 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # @example # # # bad -# # class C # private # @@ -19804,10 +19853,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # puts 'hi' # end # end -# @example # # # good -# # class C # def self.method # puts 'hi' @@ -19815,10 +19862,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # # private_class_method :method # end -# @example # # # good -# # class C # class << self # private @@ -19829,49 +19874,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`. @@ -19950,33 +19995,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. @@ -20006,16 +20048,19 @@ class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#48 + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#41 def deprecated_it_method?(node); end - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 - def on_block(node); end + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#34 + def on_send(node); end end # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#30 RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#32 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks uses of lambda without a literal block. # It emulates the following warning in Ruby 3.0: # @@ -20219,84 +20264,84 @@ 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#60 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#127 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#133 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#103 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#111 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#144 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#118 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#174 def ends_heredoc_line?(node); end + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#82 + def handle_special_regexp_chars(begin_node, value); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#163 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#182 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#46 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#165 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#170 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#54 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`. @@ -20309,15 +20354,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 # @@ -20326,7 +20362,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 # @@ -20336,29 +20378,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 @@ -20704,15 +20746,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 # @@ -20720,7 +20764,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # bar = -> { puts 'hello' } # bar.call # end -# @example # # # good # @@ -20740,7 +20783,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example # # # good # @@ -20774,49 +20816,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. @@ -20882,38 +20921,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 @@ -20924,16 +20960,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 @@ -20943,7 +20976,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 # @@ -20952,19 +20984,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. @@ -21605,28 +21637,28 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#60 def chained_calls?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#49 - def first_argument_block_type?(first_arg); end + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#56 + def compound_range?(first_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#57 - def first_argument_starts_with_left_parenthesis?(node); end + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#47 + def first_argument_block_type?(first_arg); end - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#86 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#85 def space_range(expr, space_length); end - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#70 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#69 def spaces_before_left_parenthesis(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#66 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#65 def ternary_expression?(node); end # @return [Boolean] @@ -21636,7 +21668,7 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#53 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#51 def valid_first_argument?(first_arg); end end @@ -21652,44 +21684,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)` @@ -21701,43 +21730,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 @@ -21803,35 +21829,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 @@ -22012,13 +22035,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" @@ -22032,54 +22056,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. @@ -22380,7 +22404,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 # @@ -22533,47 +22557,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`. @@ -22753,38 +22774,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 @@ -22878,34 +22896,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` @@ -22983,7 +22998,6 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) # def foo=(bar) # return 42 # end -# @example # # # good # def initialize @@ -22996,18 +23010,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 @@ -23019,28 +23033,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 @@ -23049,85 +23060,126 @@ 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 -# call in an `&&` or `||` condition that safe navigation is used for all -# method calls on that same object. +# Check to make sure that if safe navigation is used in an `&&` or `||` condition, +# consistent and appropriate safe navigation, without excess or deficiency, +# is used for all method calls on the same object. # # @example # # bad -# foo&.bar && foo.baz +# foo&.bar && foo&.baz # -# # bad -# foo.bar || foo&.baz +# # good +# foo&.bar && foo.baz # # # bad -# foo&.bar && (foobar.baz || foo.baz) +# foo.bar && foo&.baz # # # good # foo.bar && foo.baz # +# # bad +# foo&.bar || foo.baz +# # # good # foo&.bar || foo&.baz # +# # bad +# foo.bar || foo&.baz +# # # good +# foo.bar || foo.baz +# +# # bad # foo&.bar && (foobar.baz || foo&.baz) # -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#29 +# # good +# foo&.bar && (foobar.baz || foo.baz) +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#41 class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::NilMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#42 - def check(node); end + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#48 + def on_and(node); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#36 - def on_csend(node); end + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#48 + def on_or(node); end private - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#61 - def autocorrect(corrector, node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#96 + def already_appropriate_call?(operand, dot_op); end # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#67 - def location(node, unsafe_method_call); end + def collect_operands(node, operand_nodes); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#83 + def find_consistent_parts(grouped_operands); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#120 + def most_left_indices(grouped_operands); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#150 + def nilable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#134 + def operand_in_and?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#142 + def operand_in_or?(node); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#71 - def top_conditional_ancestor(node); end + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#111 + def operand_nodes(operand, operand_nodes); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#82 - def unsafe_method_calls(method_calls, safe_nav_receiver); end + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#74 + def receiver_name_as_key(method, fully_receivers); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#100 + def register_offense(operand, dot_operator); end end -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#34 -RuboCop::Cop::Lint::SafeNavigationConsistency::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#45 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_DOT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#46 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_SAFE_NAVIGATION_MSG = T.let(T.unsafe(nil), String) # Checks to make sure safe navigation isn't used with `empty?` in # a conditional. @@ -23576,17 +23628,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 # @@ -23594,10 +23645,8 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # do_something(foo) # end # end -# @example # # # good -# # def some_method # foo = 1 # @@ -23606,37 +23655,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 @@ -24287,27 +24336,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 @@ -24459,14 +24505,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 @@ -24475,40 +24519,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. @@ -24866,7 +24908,7 @@ class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base def message(variable); end class << self - # source://rubocop-performance/1.21.0/lib/rubocop-performance.rb#15 + # source://rubocop-performance/1.22.1/lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 @@ -24925,33 +24967,46 @@ RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#48 RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Identifies places where `URI.regexp` is obsolete and should -# not be used. Instead, use `URI::DEFAULT_PARSER.make_regexp`. +# Identifies places where `URI.regexp` is obsolete and should not be used. +# +# For Ruby 3.3 or lower, use `URI::DEFAULT_PARSER.make_regexp`. +# For Ruby 3.4 or higher, use `URI::RFC2396_PARSER.make_regexp`. +# +# NOTE: If you need to support both Ruby 3.3 and lower as well as Ruby 3.4 and higher, +# consider manually changing the code as follows: +# +# [source,ruby] +# ---- +# defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER +# ---- # # @example # # bad # URI.regexp('http://example.com') # -# # good +# # good - Ruby 3.3 or lower # URI::DEFAULT_PARSER.make_regexp('http://example.com') # -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#16 +# # good - Ruby 3.4 or higher +# URI::RFC2396_PARSER.make_regexp('http://example.com') +# +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#29 class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#23 + # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#40 def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#36 + def uri_constant?(param0 = T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#19 +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#32 RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#21 +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#33 RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#20 -RuboCop::Cop::Lint::UriRegexp::URI_CONSTANTS = T.let(T.unsafe(nil), Array) - # Checks for redundant access modifiers, including those with no # code, those which are repeated, and leading `public` modifiers in a # class or module body. Conditionally-defined methods are considered as @@ -25173,103 +25228,105 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # reassignments and properly handles varied cases such as branch, loop, # rescue, ensure, etc. # +# This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from +# operator assignment can cause NameError if this assignment has been used to declare +# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause +# "undefined local variable or method `a' for main:Object (NameError)". +# # NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables # can lead to a syntax error, so this case is not autocorrected. # # @example # # # bad -# # 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#40 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#51 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#165 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#106 def chained_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 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#149 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#82 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#110 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#120 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#88 def offense_range(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125 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#182 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#206 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#195 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#191 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#199 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#139 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#96 def sequential_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132 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#158 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#47 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#45 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless `else` in `begin..end` without `rescue`. @@ -25279,16 +25336,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 @@ -25297,13 +25351,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 @@ -25365,6 +25419,62 @@ end # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) +# Certain numeric operations have no impact, being: +# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. +# These are probably leftover from debugging, or are mistakes. +# +# @example +# +# # bad +# x + 0 +# x - 0 +# x * 1 +# x / 1 +# x ** 1 +# +# # good +# x +# +# # bad +# x += 0 +# x -= 0 +# x *= 1 +# x /= 1 +# x **= 1 +# +# # good +# x = x +# +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#32 +class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#54 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#41 + def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#38 + def useless_operation?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#67 + def useless?(operation, number); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#34 +RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#35 +RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for useless `rescue`s, which only reraise rescued exceptions. # # @example @@ -25531,83 +25641,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,61 +25836,77 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 + # source://rubocop//lib/rubocop/cop/lint/void.rb#95 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/void.rb#222 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#258 + def all_keys_entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#262 + def all_values_entirely_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#236 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#216 + # source://rubocop//lib/rubocop/cop/lint/void.rb#230 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#204 + # source://rubocop//lib/rubocop/cop/lint/void.rb#218 def autocorrect_void_op(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#99 + # source://rubocop//lib/rubocop/cop/lint/void.rb#101 def check_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#113 + # source://rubocop//lib/rubocop/cop/lint/void.rb#198 + def check_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#115 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#154 + # source://rubocop//lib/rubocop/cop/lint/void.rb#156 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#178 + # source://rubocop//lib/rubocop/cop/lint/void.rb#180 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#162 + # source://rubocop//lib/rubocop/cop/lint/void.rb#164 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#136 + # source://rubocop//lib/rubocop/cop/lint/void.rb#138 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + # source://rubocop//lib/rubocop/cop/lint/void.rb#172 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#125 + # source://rubocop//lib/rubocop/cop/lint/void.rb#127 def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#231 + # source://rubocop//lib/rubocop/cop/lint/void.rb#245 def entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#196 + # source://rubocop//lib/rubocop/cop/lint/void.rb#211 def in_void_context?(node); end end @@ -25799,13 +25922,13 @@ RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/void.rb#61 RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#77 +# source://rubocop//lib/rubocop/cop/lint/void.rb#76 RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#79 +# source://rubocop//lib/rubocop/cop/lint/void.rb#78 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#70 +# source://rubocop//lib/rubocop/cop/lint/void.rb#69 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/void.rb#64 @@ -25826,9 +25949,6 @@ RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/void.rb#59 RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#69 -RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) - # Common functionality for obtaining source ranges from regexp matches # # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 @@ -26091,8 +26211,9 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # The cop can be configured to ignore blocks passed to certain methods. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: This cop does not apply for `Struct` definitions. # @@ -26100,7 +26221,7 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` # instead. By default, there are no methods to allowed. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # something do # array = [ # +1 @@ -26108,7 +26229,7 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # 2 # ] # -# hash = { # +3 +# hash = { # +1 # key: 'value' # } # @@ -26121,32 +26242,32 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#44 +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#45 class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_block(node); end - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#80 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#81 def cop_label; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#62 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#63 def method_receiver_excluded?(node); end end -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49 +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#50 RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) # Checks for excessive nesting of conditional and looping constructs. @@ -26203,12 +26324,13 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: This cop also applies for `Struct` definitions. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # class Foo # ARRAY = [ # +1 @@ -26216,7 +26338,7 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # 2 # ] # -# HASH = { # +3 +# HASH = { # +1 # key: 'value' # } # @@ -26229,24 +26351,24 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#39 +# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#40 class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#52 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#53 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#43 def on_class(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 def on_sclass(node); end private - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#70 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#71 def message(length, max_length); end end @@ -26377,15 +26499,16 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is # deprecated and only kept for backwards compatibility. # Please use `AllowedMethods` and `AllowedPatterns` instead. # By default, there are no methods to allowed. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # def m # array = [ # +1 @@ -26393,7 +26516,7 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # 2 # ] # -# hash = { # +3 +# hash = { # +1 # key: 'value' # } # @@ -26406,33 +26529,33 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#42 +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#43 class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_block(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_def(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#65 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#66 def cop_label; end end -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#47 +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#48 RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # Checks if the length of a module exceeds some maximum value. @@ -26440,10 +26563,11 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # module M # ARRAY = [ # +1 @@ -26451,7 +26575,7 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # 2 # ] # -# HASH = { # +3 +# HASH = { # +1 # key: 'value' # } # @@ -26464,24 +26588,24 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#37 +# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#38 class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#52 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#44 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#45 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#40 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#41 def on_module(node); end private - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#55 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#56 def message(length, max_length); end end @@ -27475,16 +27599,21 @@ class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#61 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#66 def bad_reader_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#65 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#70 def bad_writer_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#53 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#54 def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#62 + def proper_attribute_name?(node); end end # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 @@ -28168,10 +28297,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#111 def add_offenses_for_token(token, word_locations); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#167 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#176 def add_to_flagged_term_hash(regex_string, term, term_definition); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#193 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#202 def array_to_ignorecase_regex(strings); end # @return [Boolean] @@ -28179,55 +28308,58 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 def check_token?(type); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#243 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#252 def create_message(word, message = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#217 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#226 def create_multiple_word_message_for_file(words); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#213 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#222 def create_single_word_message_for_file(word); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#198 def ensure_regex_string(regex); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#169 def extract_regexp(term, term_definition); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#251 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#260 def find_flagged_term(word); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#265 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#274 def format_suggestions(suggestions); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#206 def investigate_filepath; end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 def investigate_tokens; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#231 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#240 def mask_input(str); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#280 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#289 def offense_range(token, word); end + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 + def preferred_sole_term(suggestions); end + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 def preprocess_check_config; end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 def preprocess_flagged_terms; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#258 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#267 def preprocess_suggestions(suggestions); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#188 def process_allowed_regex(allowed); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#221 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#230 def scan_for_words(input); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#183 def set_regexes(flagged_term_strings, allowed_strings); end end @@ -28574,94 +28706,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. +# 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. # -# NOTE: The `is_a?` method is allowed by default. +# Predicate methods must end with a question mark. # -# If `ForbiddenPrefixes` is set, methods that start with the configured -# prefixes will not be allowed and will be removed by autocorrection. +# 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. # -# 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?`. -# -# 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. -# -# @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| } +# +# # good +# def_node_matcher(:even?) { |value| } # -# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#59 +# 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 @@ -28731,31 +28878,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] @@ -28852,9 +28999,22 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # can be used to specify whether method names and symbols should be checked. # Both are enabled by default. # -# @example AllowedPatterns: ['_v\d+\z'] +# @example EnforcedStyle: normalcase (default) +# # bad +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method1(arg_1); end +# # # good -# :some_sym_v1 +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method1(arg1); end # @example EnforcedStyle: snake_case # # bad # :some_sym1 @@ -28916,22 +29076,9 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # @example AllowedIdentifiers: [capture3] # # good # expect(Open3).to receive(:capture3) -# @example EnforcedStyle: normalcase (default) -# # bad -# :some_sym_1 -# variable_1 = 1 -# -# def some_method_1; end -# -# def some_method1(arg_1); end -# +# @example AllowedPatterns: ['_v\d+\z'] # # good -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method1(arg1); end +# :some_sym_v1 # # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base @@ -29071,8 +29218,8 @@ class RuboCop::Cop::Offense def cop_name; end # @api public - # @return [Boolean] whether this offense can be automatically corrected via - # autocorrect or a todo. + # @return [Boolean] whether this offense can be automatically corrected via autocorrect. + # This includes todo comments, for example when requested with `--disable-uncorrectable`. # # source://rubocop//lib/rubocop/cop/offense.rb#102 def correctable?; end @@ -30574,64 +30721,63 @@ end module RuboCop::Cop::StatementModifier include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp private - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#79 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#80 def code_after(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#103 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#104 def comment_disables_cop?(comment); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#71 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#72 def first_line_comment(node); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#58 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#57 def if_body_source(if_body); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#44 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#43 def length_in_modifier_form(node); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#97 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#98 def max_line_length; end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#67 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#66 def method_source(if_body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#38 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#37 def modifier_fits_on_single_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#27 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#26 def non_eligible_body?(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#34 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#33 def non_eligible_condition?(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#20 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#19 def non_eligible_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#85 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#86 def parenthesize?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#12 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#11 def single_line_as_modifier?(node); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#51 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#50 def to_modifier_form(node); end end @@ -30675,6 +30821,17 @@ end module RuboCop::Cop::StringLiteralsHelp private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#24 + def enforce_double_quotes?; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#20 + def preferred_string_literal; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#28 + def string_literals_config; end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#9 @@ -30742,6 +30899,8 @@ module RuboCop::Cop::Style; end # class Foo # # private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES # # end # @example AllowModifiersOnSymbols: false @@ -30749,6 +30908,8 @@ module RuboCop::Cop::Style; end # class Foo # # private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES # # end # @example AllowModifiersOnAttrs: true (default) @@ -30778,101 +30939,106 @@ module RuboCop::Cop::Style; end # # end # -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#109 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#113 class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 def access_modifier_with_attr?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#130 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#134 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#140 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#146 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#205 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#199 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#177 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 def allow_modifiers_on_attrs?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#173 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#183 def allow_modifiers_on_symbols?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#158 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#164 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#269 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#279 def def_source(node, def_node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#240 def find_argument_less_modifier_node(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#229 def find_corresponding_def_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#197 def group_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#201 def inline_style?; end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#261 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#271 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 def message(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#181 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#179 + def percent_symbol_array?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#275 def remove_node(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#244 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#254 def replace_def(corrector, node, def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#213 def right_siblings_same_inline_method?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#248 def select_grouped_def_nodes(node); end end -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#119 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#120 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#124 RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#125 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#129 RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for grouping of accessors in `class` and `module` bodies. @@ -30882,6 +31048,9 @@ RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsa # NOTE: If there is a method call before the accessor method it is always allowed # as it might be intended like Sorbet. # +# NOTE: If there is a RBS::Inline annotation comment just after the accessor method +# it is always allowed. +# # @example EnforcedStyle: grouped (default) # # bad # class Foo @@ -30918,73 +31087,73 @@ RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsa # attr_reader :baz # end # -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#50 +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#53 class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::VisibilityHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 def on_class(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 def on_module(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 def on_sclass(node); end private - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#82 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#85 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#74 def check(send_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#122 def class_send_elements(class_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#165 def group_accessors(node, accessors); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#99 def groupable_accessor?(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#142 def groupable_sibling_accessors(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 def grouped_style?; end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#151 def message(send_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#156 def preferred_accessors(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#94 def previous_line_comment?(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#171 def separate_accessors(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#138 def separated_style?; end end -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#56 +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#57 +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#60 RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) # Enforces the use of either `#alias` or `#alias_method` @@ -31211,15 +31380,20 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # # This cop handles not only method forwarding but also forwarding to `super`. # -# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) -# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. -# def foo(&block) -# bar(&block) +# @example +# # bad +# def foo(*args, &block) +# bar(*args, &block) +# end +# +# # bad +# def foo(*args, **kwargs, &block) +# bar(*args, **kwargs, &block) # end # # # good -# def foo(&) -# bar(&) +# def foo(...) +# bar(...) # end # @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) # # bad @@ -31282,20 +31456,15 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**) # bar(**) # end -# @example -# # bad -# def foo(*args, &block) -# bar(*args, &block) -# end -# -# # bad -# def foo(*args, **kwargs, &block) -# bar(*args, **kwargs, &block) +# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) +# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. +# def foo(&block) +# bar(&block) # end # # # good -# def foo(...) -# bar(...) +# def foo(&) +# bar(&) # end # # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 @@ -31312,38 +31481,38 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#188 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#353 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#366 def add_parens_if_missing(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#215 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#345 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#340 def arguments_range(node, first_node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#267 def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#542 def explicit_block_name?; end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 def extract_forwardable_args(args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#242 def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] @@ -31353,30 +31522,35 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#294 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#296 def outside_block?(node); end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#284 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#286 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#300 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#302 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#316 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#318 def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#308 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#310 def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#349 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 + def send_inside_block?(send_classifications); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#356 def use_anonymous_forwarding?; end class << self @@ -31405,115 +31579,133 @@ RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), Stri # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#374 class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier extend ::RuboCop::AST::NodePattern::Macros # @return [SendNodeClassifier] a new instance of SendNodeClassifier # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#372 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#403 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#431 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#387 + def def_all_anonymous_args?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#381 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#394 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#384 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#419 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#382 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#413 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#378 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#396 + def send_all_anonymous_args?(param0 = T.unsafe(nil)); end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#468 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#513 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#464 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#509 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#523 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#449 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#494 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#412 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#472 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#517 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#474 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#491 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#536 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#527 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#457 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#502 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#470 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#445 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#490 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#441 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#486 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#437 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 def referenced_rest_arg?; end + # def foo(a = 41, ...) is a syntax error in 3.0. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#458 + def ruby_30_or_lower_optarg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 + def ruby_32_only_anonymous_forwarding?; end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#421 - def ruby_32_missing_rest_or_kwest?; end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#466 + def ruby_32_or_higher_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#453 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#498 def target_ruby_version; end end @@ -32097,13 +32289,24 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # `lambda`, `proc`, and `it` are their defaults. # Additional methods can be added to the `AllowedMethods`. # -# @example AllowedPatterns: ['map'] +# @example EnforcedStyle: line_count_based (default) +# # bad - single line block +# items.each do |item| item / 5 end # -# # good +# # good - single line block +# items.each { |item| item / 5 } +# +# # bad - multi-line block # things.map { |thing| # something = thing.some_method # process(something) # } +# +# # good - multi-line block +# things.map do |thing| +# something = thing.some_method +# process(something) +# end # @example EnforcedStyle: semantic # # Prefer `do...end` over `{...}` for procedural blocks. # @@ -32224,25 +32427,14 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # something = thing.some_method # process(something) # } -# @example EnforcedStyle: line_count_based (default) -# # bad - single line block -# items.each do |item| item / 5 end -# -# # good - single line block -# items.each { |item| item / 5 } +# @example AllowedPatterns: ['map'] # -# # bad - multi-line block +# # good # things.map { |thing| # something = thing.some_method # process(something) # } # -# # good - multi-line block -# things.map do |thing| -# something = thing.some_method -# process(something) -# end -# # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle @@ -32251,165 +32443,175 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#198 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#198 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#183 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#459 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#472 def array_or_range?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#208 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#212 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#463 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#476 def begin_required?(block_node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#236 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#240 def braces_for_chaining_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#413 def braces_for_chaining_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#248 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#252 def braces_required_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#390 def braces_required_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#381 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#394 def braces_required_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#423 def braces_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#455 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#468 def conditional?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#427 def correction_would_break_code?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#309 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#313 def end_of_chain(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#424 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#437 def functional_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#420 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#433 def functional_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#330 def get_blocks(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#398 def line_count_based_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#218 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#222 def line_count_based_message(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#252 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#256 def message(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#300 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#304 def move_comment_before_block(corrector, comment, block_node, closing_brace); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#432 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#445 def procedural_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#441 def procedural_oneliners_may_have_braces?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#344 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#349 def proper_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#316 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#320 def remove_trailing_whitespace(corrector, range, comment); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#263 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#267 def replace_braces_with_do_end(corrector, loc); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#279 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#283 def replace_do_end_with_braces(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#356 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#362 def require_braces?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#370 + def require_do_end?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#461 def return_value_of_scope?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#436 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#449 def return_value_used?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#389 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#402 def semantic_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#230 def semantic_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#364 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 def special_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#370 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#383 def special_method_proper_block_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#296 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#300 def whitespace_after?(range, length = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#292 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#296 def whitespace_before?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#322 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 def with_block?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 + def autocorrect_incompatible_with; end + end end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#175 @@ -33113,6 +33315,7 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # array.reject(&:nil?) # array.reject { |e| e.nil? } # array.select { |e| !e.nil? } +# array.filter { |e| !e.nil? } # array.grep_v(nil) # array.grep_v(NilClass) # @@ -33121,10 +33324,9 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # bad # hash.reject!(&:nil?) -# array.delete_if(&:nil?) # hash.reject! { |k, v| v.nil? } -# array.delete_if { |e| e.nil? } # hash.select! { |k, v| !v.nil? } +# hash.filter! { |k, v| !v.nil? } # # # good # hash.compact! @@ -33139,22 +33341,22 @@ class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#85 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#86 def grep_v_with_nil?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#90 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#90 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#64 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#65 def reject_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#57 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#58 def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#74 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#75 def select_method?(param0 = T.unsafe(nil)); end private @@ -33174,6 +33376,9 @@ class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base def to_enum_method?(node); end end +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#53 +RuboCop::Cop::Style::CollectionCompact::FILTER_METHODS = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50 RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) @@ -33316,6 +33521,9 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) # can be combined into a single loop. It is very likely that combining them # will make the code more efficient and more concise. # +# NOTE: Autocorrection is not applied when the block variable names differ in separate loops, +# as it is impossible to determine which variable name should be prioritized. +# # @example # # bad # def method @@ -33361,44 +33569,44 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) # each_slice(3) { |slice| do_something(slice) } # end # -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59 +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#77 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#84 def on_for(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#88 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95 def collection_looping_method?(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 def combine_with_left_sibling(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#119 def correct_end_of_block(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#93 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#100 def same_collection_looping_block?(node, sibling); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#108 def same_collection_looping_for?(node, sibling); end end -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#65 RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) # Enforces using `` or %x around command literals. @@ -33647,7 +33855,7 @@ RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), S # These keywords are: `class`, `module`, `def`, `begin`, `end`. # # Note that some comments -# are allowed. +# and RBS::Inline annotation comments are allowed. # # Autocorrection removes comments from `end` keyword and keeps comments # for `class`, `module`, `def` and `begin` above the keyword. @@ -33691,10 +33899,15 @@ class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#83 def offensive?(comment); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#95 + def rbs_inline_annotation?(line, comment); end + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#70 def register_offense(comment, matched_keyword); end - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#89 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#91 def source_line(comment); end end @@ -34458,7 +34671,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() @@ -34470,18 +34682,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 @@ -35158,38 +35370,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 @@ -35506,10 +35718,10 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#193 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#194 def autocorrect_forbidden?(type); end - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#186 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#187 def base_node(node); end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#145 @@ -35518,7 +35730,7 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/empty_else.rb#180 - def comment_in_else?(loc); end + def comment_in_else?(node); end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#160 def empty_check(node); end @@ -35528,7 +35740,7 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/empty_else.rb#156 def empty_style?; end - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#197 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#198 def missing_else_style; end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#166 @@ -35577,26 +35789,14 @@ RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::EmptyHeredoc < ::RuboCop::Cop::Base include ::RuboCop::Cop::Heredoc include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#43 + # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#44 def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#63 - def enforce_double_quotes?; end - - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#59 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#67 - def string_literals_config; end end -# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#41 +# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#42 RuboCop::Cop::Style::EmptyHeredoc::MSG = T.let(T.unsafe(nil), String) # Checks for parentheses for empty lambda parameters. Parentheses @@ -35637,7 +35837,9 @@ RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) # @example # # bad # a = Array.new +# a = Array[] # h = Hash.new +# h = Hash[] # s = String.new # # # good @@ -35645,83 +35847,79 @@ RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) # h = {} # s = '' # -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#19 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#21 class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base include ::RuboCop::Cop::FrozenStringLiteral include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 def array_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 def array_with_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#54 + def array_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 def hash_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#46 def hash_with_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#50 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#62 + def hash_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#69 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 def str_node(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#111 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#118 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#74 - def enforce_double_quotes?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#82 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 def first_argument_unparenthesized?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#129 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#136 def frozen_strings?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#102 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#109 def offense_array_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#106 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#113 def offense_hash_node?(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#60 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#79 def offense_message(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#70 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#96 def replacement_range(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#78 - def string_literals_config; end end -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#24 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#27 RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#25 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#26 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#29 RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) # Checks for the formatting of empty method definitions. @@ -36001,9 +36199,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 @@ -36028,100 +36235,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?` @@ -36630,8 +36830,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 } @@ -36646,9 +36845,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| @@ -36658,49 +36856,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. @@ -36717,8 +36915,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) @@ -36726,9 +36923,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) @@ -36737,24 +36933,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 @@ -36762,31 +36958,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. @@ -37039,17 +37235,21 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # The reason is that _unannotated_ format is very similar # to encoded URLs or Date/Time formatting strings. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # It is allowed to contain unannotated token # if the number of them is less than or equals to # `MaxUnannotatedPlaceholdersAllowed`. # -# @example AllowedPatterns: ['redirect'] +# @example EnforcedStyle: annotated (default) +# +# # bad +# format('%{greeting}', greeting: 'Hello') +# format('%s', 'Hello') # # # good -# redirect('foo/%{bar_id}') +# format('%s', greeting: 'Hello') # @example EnforcedStyle: template # # # bad @@ -37093,14 +37293,10 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # # # bad # redirect('foo/%{bar_id}') -# @example EnforcedStyle: annotated (default) -# -# # bad -# format('%{greeting}', greeting: 'Hello') -# format('%s', 'Hello') +# @example AllowedPatterns: ['redirect'] # # # good -# format('%s', greeting: 'Hello') +# redirect('foo/%{bar_id}') # # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85 class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base @@ -37351,11 +37547,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 @@ -37518,10 +37719,10 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#114 class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -37549,12 +37750,12 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#285 def accepted_if?(node, ending); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#299 def allowed_consecutive_conditionals?; end # @return [Boolean] @@ -37593,7 +37794,7 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#295 def remove_whole_lines(corrector, range); end # @return [Boolean] @@ -37789,80 +37990,83 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::Lint::UnusedArgument extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#74 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#79 def check_unused_block_args(node, key, value); end # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#51 def each_arguments(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#61 + def hash_mutated?(param0 = T.unsafe(nil), param1); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 def kv_each(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#56 def kv_each_with_block_pass(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#65 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#95 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#100 def on_block_pass(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#65 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#180 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 def check_argument(variable); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#204 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#210 def correct_args(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#190 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#196 def correct_implicit(node, corrector, method_name); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#195 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#201 def correct_key_value_each(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#176 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#182 def format_message(method_name, current); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#103 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#108 def handleable?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#211 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#217 def kv_range(outer_node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#133 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 def message(prefer, method_name, unused_code); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#145 def register_each_args_offense(node, message, prefer, unused_range); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#116 def register_kv_offense(target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#146 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#152 def register_kv_with_block_pass_offense(node, target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#167 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#173 def root_receiver(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#121 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#127 def unused_block_arg_exist?(node, block_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#157 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#163 def use_array_converter_method_as_preceding?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#192 def used?(arg); end end @@ -38047,22 +38251,15 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # * either_consistent - accepts both shorthand and explicit use of hash literal value, # but they must be consistent # -# @example EnforcedShorthandSyntax: either_consistent -# -# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted -# {foo: foo, bar: bar} -# -# # bad - `bar` value can be omitted -# {foo:, bar: bar} -# -# # bad - mixed syntaxes -# {foo:, bar: baz} +# @example EnforcedStyle: ruby19 (default) +# # bad +# {:a => 2} +# {b: 1, :c => 2} # # # good -# {foo:, bar:} -# -# # good - can't omit `baz` -# {foo: foo, bar: baz} +# {a: 2, b: 1} +# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol +# {d: 1, 'e' => 2} # technically not forbidden # @example EnforcedStyle: hash_rockets # # bad # {a: 1, b: 2} @@ -38086,7 +38283,7 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # good # {a: 1, b: 2} # {:c => 3, 'd' => 4} -# @example EnforcedShorthandSyntax: always (default) +# @example EnforcedShorthandSyntax: always # # # bad # {foo: foo, bar: bar} @@ -38100,7 +38297,7 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good # {foo: foo, bar: bar} -# @example EnforcedShorthandSyntax: either +# @example EnforcedShorthandSyntax: either (default) # # # good # {foo: foo, bar: bar} @@ -38126,15 +38323,22 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good - can't omit `baz` # {foo: foo, bar: baz} -# @example EnforcedStyle: ruby19 (default) -# # bad -# {:a => 2} -# {b: 1, :c => 2} +# @example EnforcedShorthandSyntax: either_consistent +# +# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} # # # good -# {a: 2, b: 1} -# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol -# {d: 1, 'e' => 2} # technically not forbidden +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} # # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#131 class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base @@ -38633,9 +38837,9 @@ RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::CommentsHelp extend ::RuboCop::Cop::AutoCorrector @@ -38779,7 +38983,6 @@ RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), Str class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -38826,7 +39029,7 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri # # # good # foo == bar -# @example +# # # bad # if foo.do_something? # true @@ -38840,61 +39043,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. @@ -38912,25 +39115,47 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base include ::RuboCop::Cop::OnNormalIfUnless extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#23 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#24 def on_normal_if_unless(node); end private - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#38 - def autocorrect(node); end + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#54 + def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#56 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#93 def build_else_branch(second_condition); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#47 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#84 + def build_expression(expr); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#75 def correct_elsif(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#40 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#66 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#113 + def require_argument_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#62 + def use_block_in_branches?(node); end end # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#21 +RuboCop::Cop::Style::IfWithSemicolon::MSG_NEWLINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#22 RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) # Checks for `raise` or `fail` statements which do not specify an @@ -38987,6 +39212,9 @@ class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#46 def alternative_pattern_source(pattern); end + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#50 + def collect_alternative_patterns(pattern); end end # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 @@ -39662,12 +39890,22 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # NOTE: If one of these configuration is set to nil, any capitalization is allowed. # -# @example ValueCapitalization: uppercase +# @example EnforcedStyle: snake_case (default) +# # The `snake_case` style will enforce that the frozen string literal +# # comment is written in snake case. (Words separated by underscores) # # bad # # frozen-string-literal: true # +# module Bar +# # ... +# end +# # # good -# # frozen-string-literal: TRUE +# # frozen_string_literal: false +# +# module Bar +# # ... +# end # @example EnforcedStyle: kebab_case # # The `kebab_case` style will enforce that the frozen string literal # # comment is written in kebab case. (Words separated by hyphens) @@ -39720,22 +39958,12 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # # good # # frozen-string-literal: TRUE -# @example EnforcedStyle: snake_case (default) -# # The `snake_case` style will enforce that the frozen string literal -# # comment is written in snake case. (Words separated by underscores) +# @example ValueCapitalization: uppercase # # bad # # frozen-string-literal: true # -# module Bar -# # ... -# end -# # # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end +# # frozen-string-literal: TRUE # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base @@ -39817,7 +40045,7 @@ end # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#107 class RuboCop::Cop::Style::MagicCommentFormat::CommentRange - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [CommentRange] a new instance of CommentRange # @@ -39835,11 +40063,11 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 def directives; end - # source://forwardable/1.3.3/forwardable.rb#231 - def loc(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def loc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def text(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def text(*_arg0, **_arg1, &_arg2); end # A magic comment can contain one value (normal style) or # multiple directives (emacs style) @@ -39968,8 +40196,10 @@ RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T. # return value of `Enumerable#map` is an `Array`. They are not autocorrected # when a return value could be used because these types differ. # -# NOTE: It only detects when the mapping destination is a local variable -# initialized as an empty array and referred to only by the pushing operation. +# NOTE: It only detects when the mapping destination is either: +# * a local variable initialized as an empty array and referred to only by the +# pushing operation; +# * or, if it is the single block argument to a `[].tap` block. # This is because, if not, it's challenging to statically guarantee that the # mapping destination variable remains an empty array: # @@ -39991,74 +40221,93 @@ RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T. # # good # dest = src.map { |e| e * 2 } # +# # bad +# [].tap do |dest| +# src.each { |e| dest << e * 2 } +# end +# +# # good +# dest = src.map { |e| e * 2 } +# # # good - contains another operation # dest = [] # src.each { |e| dest << e * 2; puts e } # dest # -# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#50 +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#60 class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#75 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#104 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#67 def each_block_with_push?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#76 def empty_array_asgn?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#69 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#88 + def empty_array_tap(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#98 def lvar_ref?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#208 def correct_push_node(corrector, push_node); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#163 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#216 def correct_return_value_handling(corrector, block, dest_var); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#151 def dest_used_only_for_mapping?(block, dest_var, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#102 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#145 def find_closest_assignment(block, dest_var); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#94 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#128 def find_dest_var(block); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#127 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#176 def new_method_name; end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#116 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#136 + def offending_empty_array_tap?(node, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#159 def register_offense(block, dest_var, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#148 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#195 def remove_assignment(corrector, asgn); end + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#202 + def remove_tap(corrector, node, block_node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#182 def return_value_used?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#71 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#100 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#54 +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#64 RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String) # Looks for uses of `map.to_h` or `collect.to_h` that could be @@ -40153,7 +40402,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 @@ -40211,13 +40460,27 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # - Parentheses are required in anonymous arguments, keyword arguments # and block passing in Ruby 3.2. # -# @example AllowParenthesesInStringInterpolation: true +# @example EnforcedStyle: require_parentheses (default) +# +# # bad +# array.delete e # # # good -# "#{t('this.is.good')}" +# array.delete(e) # # # good -# "#{t 'this.is.also.good'}" +# # Operators don't need parens +# foo == bar +# +# # good +# # Setter methods don't need parens +# foo.bar = baz +# +# # okay with `puts` listed in `AllowedMethods` +# puts 'test' +# +# # okay with `^assert` listed in `AllowedPatterns` +# assert_equal 'test', x # @example EnforcedStyle: omit_parentheses # # # bad @@ -40316,27 +40579,13 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # "#{t 'this.is.better'}" -# @example EnforcedStyle: require_parentheses (default) -# -# # bad -# array.delete e -# -# # good -# array.delete(e) +# @example AllowParenthesesInStringInterpolation: true # # # good -# # Operators don't need parens -# foo == bar +# "#{t('this.is.good')}" # # # good -# # Setter methods don't need parens -# foo.bar = baz -# -# # okay with `puts` listed in `AllowedMethods` -# puts 'test' -# -# # okay with `^assert` listed in `AllowedPatterns` -# assert_equal 'test', x +# "#{t 'this.is.also.good'}" # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202 class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base @@ -40344,6 +40593,7 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses extend ::RuboCop::Cop::AutoCorrector @@ -40379,114 +40629,116 @@ end # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#9 module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + include ::RuboCop::Cop::RangeHelp + private # @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_camel_case_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#184 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180 def allowed_multiline_call_with_parentheses?(node); end # @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 allowed_string_interpolation_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#193 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#222 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#225 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 def assignment_in_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#32 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#34 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#156 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#161 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#149 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 def call_in_argument_with_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#105 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 def call_in_literals?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#116 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#121 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167 def call_in_match_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#125 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#130 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#129 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#134 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#133 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#138 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#145 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#150 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#235 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#240 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#209 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#173 def hash_literal_in_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#45 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 def inside_endless_method_def?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#226 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -40494,75 +40746,75 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#59 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#64 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#92 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#97 def legitimate_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#205 def logical_operator?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#67 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#72 def method_call_before_constant_resolution?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#41 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#46 def offense_range(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#18 def omit_parentheses(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#90 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#208 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#213 def regexp_slash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#55 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#192 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#197 def splat?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#71 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#76 def super_call_without_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#63 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#68 def syntax_like_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#201 def ternary_if?(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 unary_literal?(node); end end -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#11 +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#13 RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#10 +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#12 RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) # Style require_parentheses @@ -40598,8 +40850,8 @@ RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_ # Checks for unwanted parentheses in parameterless method calls. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # NOTE: This cop allows the use of `it()` without arguments in blocks, # as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. @@ -41074,15 +41326,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] @@ -41460,7 +41707,6 @@ RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -41794,11 +42040,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] @@ -41862,58 +42103,53 @@ class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62 def on_or(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#86 def simple_comparison_lhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#91 def simple_comparison_rhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#83 def simple_double_comparison?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#153 def allow_method_comparison?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#134 def comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#157 def comparisons_threshold; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#126 def nested_comparison?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#95 def nested_variable_comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#148 def reset_comparison; end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#138 def root_of_or_node(or_node); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150 - def switch_comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#122 def variable_name(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#101 def variables_in_node(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#109 def variables_in_simple_node(node); end end @@ -41996,7 +42232,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 @@ -42014,7 +42250,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 @@ -43258,8 +43494,8 @@ RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) # These can be replaced by their respective predicate methods. # This cop can also be configured to do the reverse. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # This cop disregards `#nonzero?` as its value is truthy or falsey, # but not `true` and `false`, and thus not always interchangeable with @@ -43470,42 +43706,42 @@ class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#77 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 def always_multiline?; end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#63 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 def cannot_replace_to_ternary?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#93 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#97 def expr_replacement(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#114 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#118 def keyword_with_changed_precedence?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#55 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#107 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#111 def method_call_with_changed_precedence?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#99 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#103 def requires_parentheses?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#67 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#71 def ternary_correction(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#89 def ternary_replacement(node); end end @@ -43571,27 +43807,35 @@ RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#27 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#30 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53 - def anonymous_forwarding?(argument); end + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#75 + def insert_space_after?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#58 + def invalid_syntax_argument?(argument); end # Checks for an acceptable case of `foo.+(bar).baz`. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#47 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#52 def method_call_with_parenthesized_arg?(argument); end - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#64 def wrap_in_parentheses_if_chained(corrector, node); end end +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#25 +RuboCop::Cop::Style::OperatorMethodCall::INVALID_SYNTAX_ARG_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#23 RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String) @@ -43941,14 +44185,14 @@ class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#234 def cop_config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#230 def extract_sources(node); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 - def source(node); end + def source(node, loc); end end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#29 @@ -43957,37 +44201,37 @@ RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) # An internal class for correcting parallel assignment # guarded by if, unless, while, or until # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#275 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#285 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#286 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#291 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#292 def modifier_range(node); end end # An internal class for correcting parallel assignment # protected by rescue # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#240 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#242 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#252 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#253 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#263 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#264 def begin_correction(rescue_result); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#258 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#259 def def_correction(rescue_result); end end @@ -44430,7 +44674,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#108 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#106 def alternative_style; end # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#71 @@ -44451,7 +44695,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#112 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#110 def quoted?(sym_node); end # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#99 @@ -44459,7 +44703,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#116 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#114 def wrong_quotes?(node); end end @@ -44892,81 +45136,86 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#72 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 def offensive_kwbegins(param0); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#80 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#80 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#95 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#99 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#103 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#107 def allowable_kwbegin?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 def begin_block_has_multiline_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 def condition_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#185 def contain_rescue_or_ensure?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#162 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#166 def correct_modifier_form_after_multiline_begin_block(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 def empty_begin?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#114 def register_offense(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#139 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#143 def remove_begin(corrector, offense_range, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#131 def replace_begin_with_statement(corrector, offense_range, node); end # Restore comments that occur between "begin" and "first_child". # These comments will be moved to above the assignment line. # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#149 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#153 def restore_removed_comments(corrector, offense_range, node, first_child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#156 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#160 def use_modifier_form_after_multiline_begin_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#194 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#198 def valid_begin_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#187 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#191 def valid_context_using_only_begin?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#71 + def autocorrect_incompatible_with; end + end end # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#69 @@ -45015,7 +45264,7 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # # # good # a = b || c -# @example +# # # bad # if b # b @@ -45033,7 +45282,7 @@ 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 @@ -45151,13 +45400,13 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base 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. @@ -46007,6 +46256,37 @@ end # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) +# Before Ruby 3.0, interpolated strings followed the frozen string literal +# magic comment which sometimes made it necessary to explicitly unfreeze them. +# Ruby 3.0 changed interpolated strings to always be unfrozen which makes +# unfreezing them redundant. +# +# @example +# # bad +# +"#{foo} bar" +# +# # bad +# "#{foo} bar".dup +# +# # good +# "#{foo} bar" +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#21 +class RuboCop::Cop::Style::RedundantInterpolationUnfreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#32 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#26 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#28 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Check for redundant line continuation. # # This cop marks a line continuation as redundant if removing the backslash @@ -46095,7 +46375,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base def ends_with_backslash_without_comment?(source_line); end # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 - def find_node_for_line(line); end + def find_node_for_line(last_line); end # @return [Boolean] # @@ -46466,38 +46746,39 @@ RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.un # # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#65 def determinist_regexp?(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#69 def preferred_argument(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#84 def replacement(regexp_node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#42 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#40 RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#44 RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) # Checks for unnecessary single-element Regexp character classes. @@ -46666,13 +46947,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 @@ -47705,6 +47983,9 @@ class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70 def correct_rescue_block(corrector, node, parenthesized); end + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#96 + def heredoc_end(node); end + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86 def indentation_and_offset(node, parenthesized); end @@ -47891,7 +48172,8 @@ RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/return_nil.rb#40 RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) -# Checks if `return` or `return nil` is used in predicate method definitions. +# Checks for predicate method definitions that return `nil`. +# A predicate method should only return a boolean value. # # @example # # bad @@ -47914,6 +48196,24 @@ RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) # # do_something? # end +# +# # bad +# def foo? +# if condition +# nil +# else +# true +# end +# end +# +# # good +# def foo? +# if condition +# false +# else +# true +# end +# end # @example AllowedMethods: ['foo?'] # # good # def foo? @@ -47929,31 +48229,48 @@ RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) # do_something? # end # -# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#50 +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#69 class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#81 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#81 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#77 def return_nil?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 - def nil_node_at_the_end_of_method_body(body); end + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#128 + def handle_if(if_node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#113 + def handle_implicit_return_values(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#122 + def handle_nil(nil_node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#118 + def handle_return(return_node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#94 + def last_node_of_type(node, type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#103 + def node_type?(node, type); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#107 def register_offense(offense_node, replacement); end end -# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#74 RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) # Transforms usages of a method call safeguarded by a non `nil` @@ -47970,9 +48287,9 @@ RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe( # `foo&.bar` can start returning `nil` as well as what the method # returns. # -# The default for `MaxChainLength` is `2` +# The default for `MaxChainLength` is `2`. # We have limited the cop to not register an offense for method chains -# that exceed this option is set. +# that exceed this option's value. # # @example # # bad @@ -48032,6 +48349,9 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#128 + def and_inside_begin?(param0 = T.unsafe(nil)); end + # if format: (if checked_variable body nil) # unless format: (if checked_variable nil body) # @@ -48041,96 +48361,104 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#125 def not_nil_check?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#133 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#149 def on_and(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#127 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#133 def on_if(node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#173 + def report_offense(node, rhs, rhs_receiver, *removal_ranges, offense_range: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#131 + def strip_begin(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#114 def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#307 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#348 def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#200 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#265 def allowed_if_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#154 - def autocorrect(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#210 + def and_parts(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#299 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#340 def begin_range(node, method_call); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#261 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#302 def chain_length(method_chain, method); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#139 - def check_node(node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#192 + def collect_and_clauses(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#181 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#246 def comments(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#303 - def end_range(node, method_call); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#204 + def concat_nodes(nodes, and_node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#166 - def extract_body(node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#344 + def end_range(node, method_call); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#243 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#284 def extract_common_parts(method_chain, checked_variable); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#209 - def extract_parts(node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#231 + def extract_if_body(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#233 - def extract_parts_from_and(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#218 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#269 def extract_parts_from_if(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#251 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#292 def find_matching_receiver_invocation(method_chain, checked_variable); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#174 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#186 + def find_method_chain(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#239 def handle_comments(corrector, node, method_call); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#320 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#362 def max_chain_length; end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#204 - def method_call(node); end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#295 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#336 def method_called?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#287 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#328 def negated?(send_node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#187 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#217 + def offending_node?(node, lhs_receiver, rhs, rhs_receiver); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#252 def relevant_comment_ranges(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#281 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#322 def unsafe_method?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#269 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#310 def unsafe_method_used?(method_chain, method); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#150 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#227 def use_var_only_in_unless_modifier?(node, variable); end end @@ -48234,7 +48562,7 @@ RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # See https://bugs.ruby-lang.org/issues/17030 # # @example -# # bad (select or find_all) +# # bad (select, filter, or find_all) # array.select { |x| x.match? /regexp/ } # array.select { |x| /regexp/.match?(x) } # array.select { |x| x =~ /regexp/ } @@ -48255,53 +48583,53 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#79 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#81 def calls_lvar?(param0 = T.unsafe(nil), param1); end # Returns true if a node appears to return a hash # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#65 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#67 def creates_hash?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#76 def env_const?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#90 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#90 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#58 def regexp_match?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#133 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#136 def extract_send_node(block_node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#146 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#149 def find_regexp(node, block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#157 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#160 def match_predicate_without_receiver?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#142 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145 def opposite?(regexp_method_send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#107 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#110 def receiver_allowed?(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#121 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#124 def register_offense(node, block_node, regexp, replacement); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#113 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#116 def replacement(regexp_method_send_node, node); end end @@ -48311,7 +48639,7 @@ RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#52 RuboCop::Cop::Style::SelectByRegexp::OPPOSITE_REPLACEMENTS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#53 +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#55 RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#51 @@ -49099,10 +49427,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 @@ -49120,25 +49448,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] @@ -49148,15 +49476,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] @@ -49169,7 +49500,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 @@ -50273,11 +50604,13 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # `define_method?` methods are allowed by default. # These are customizable with `AllowedMethods` option. # -# @example AllCops:ActiveSupportExtensionsEnabled: true +# @example +# # bad +# something.map { |s| s.upcase } +# something.map { _1.upcase } +# # # good -# ->(x) { x.foo } -# proc { |x| x.foo } -# Proc.new { |x| x.foo } +# something.map(&:upcase) # @example AllowMethodsWithArguments: false (default) # # bad # something.do_something(foo) { |o| o.bar } @@ -50320,13 +50653,11 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # lambda(&:foo) # proc(&:foo) # Proc.new(&:foo) -# @example -# # bad -# something.map { |s| s.upcase } -# something.map { _1.upcase } -# +# @example AllCops:ActiveSupportExtensionsEnabled: true # # good -# something.map(&:upcase) +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } # # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base @@ -51276,11 +51607,27 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods # are allowed by default. These are customizable with `AllowedMethods` option. # -# @example AllowedMethods: ['allowed_method'] -# # good -# def allowed_method +# @example +# # bad +# def foo # @foo # end +# +# def bar=(val) +# @bar = val +# end +# +# def self.baz +# @baz +# end +# +# # good +# attr_reader :foo +# attr_writer :bar +# +# class << self +# attr_reader :baz +# end # @example ExactNameMatch: true (default) # # good # def name @@ -51332,26 +51679,10 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # def self.foo # @foo # end -# @example -# # bad -# def foo -# @foo -# end -# -# def bar=(val) -# @bar = val -# end -# -# def self.baz -# @baz -# end -# +# @example AllowedMethods: ['allowed_method'] # # good -# attr_reader :foo -# attr_writer :bar -# -# class << self -# attr_reader :baz +# def allowed_method +# @foo # end # # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 @@ -51696,7 +52027,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 @@ -51708,18 +52038,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 @@ -51734,7 +52064,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 @@ -51751,22 +52081,21 @@ 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 - include ::RuboCop::Cop::RangeHelp 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 @@ -52186,42 +52515,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#143 + # 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#110 + # 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#45 + # 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#134 + # 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#102 + # 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#126 + # 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#97 + # 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#81 + # 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#66 + # 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#54 + # 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#115 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#119 def replacement(node); end end @@ -52341,138 +52670,138 @@ end # first the ones needed for autocorrection (if any), then the rest # (unless autocorrections happened). # -# source://rubocop//lib/rubocop/cop/team.rb#12 +# source://rubocop//lib/rubocop/cop/team.rb#13 class RuboCop::Cop::Team # @return [Team] a new instance of Team # - # source://rubocop//lib/rubocop/cop/team.rb#55 + # source://rubocop//lib/rubocop/cop/team.rb#61 def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#66 + # source://rubocop//lib/rubocop/cop/team.rb#72 def autocorrect?; end # Returns the value of attribute cops. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def cops; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#70 + # source://rubocop//lib/rubocop/cop/team.rb#76 def debug?; end # Returns the value of attribute errors. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def errors; end - # source://rubocop//lib/rubocop/cop/team.rb#122 + # source://rubocop//lib/rubocop/cop/team.rb#128 def external_dependency_checksum; end # @deprecated # - # source://rubocop//lib/rubocop/cop/team.rb#114 + # source://rubocop//lib/rubocop/cop/team.rb#120 def forces; end - # source://rubocop//lib/rubocop/cop/team.rb#76 + # source://rubocop//lib/rubocop/cop/team.rb#82 def inspect_file(processed_source); end # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#85 + # source://rubocop//lib/rubocop/cop/team.rb#91 def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # Returns the value of attribute updated_source_file. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def updated_source_file; end # Returns the value of attribute updated_source_file. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def updated_source_file?; end # Returns the value of attribute warnings. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def warnings; end private - # source://rubocop//lib/rubocop/cop/team.rb#129 + # source://rubocop//lib/rubocop/cop/team.rb#139 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop//lib/rubocop/cop/team.rb#193 + # source://rubocop//lib/rubocop/cop/team.rb#203 def autocorrect_report(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#148 + # source://rubocop//lib/rubocop/cop/team.rb#158 def be_ready; end - # source://rubocop//lib/rubocop/cop/team.rb#199 + # source://rubocop//lib/rubocop/cop/team.rb#209 def collate_corrections(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#215 + # source://rubocop//lib/rubocop/cop/team.rb#225 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#267 + # source://rubocop//lib/rubocop/cop/team.rb#277 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#259 + # source://rubocop//lib/rubocop/cop/team.rb#269 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#162 + # source://rubocop//lib/rubocop/cop/team.rb#172 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#242 + # source://rubocop//lib/rubocop/cop/team.rb#252 def process_errors(file, errors); end - # source://rubocop//lib/rubocop/cop/team.rb#156 + # source://rubocop//lib/rubocop/cop/team.rb#166 def reset; end # @return [Array] # - # source://rubocop//lib/rubocop/cop/team.rb#168 + # source://rubocop//lib/rubocop/cop/team.rb#178 def roundup_relevant_cops(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#184 + # source://rubocop//lib/rubocop/cop/team.rb#194 def support_target_rails_version?(cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#178 + # source://rubocop//lib/rubocop/cop/team.rb#188 def support_target_ruby_version?(cop); end - # source://rubocop//lib/rubocop/cop/team.rb#230 + # source://rubocop//lib/rubocop/cop/team.rb#240 def suppress_clobbering; end - # source://rubocop//lib/rubocop/cop/team.rb#236 + # source://rubocop//lib/rubocop/cop/team.rb#246 def validate_config; end class << self # @return [Array] needed for the given cops # - # source://rubocop//lib/rubocop/cop/team.rb#37 + # source://rubocop//lib/rubocop/cop/team.rb#43 def forces_for(cops); end # @return [Team] with cops assembled from the given `cop_classes` # - # source://rubocop//lib/rubocop/cop/team.rb#22 + # source://rubocop//lib/rubocop/cop/team.rb#28 def mobilize(cop_classes, config, options = T.unsafe(nil)); end # @return [Array] # - # source://rubocop//lib/rubocop/cop/team.rb#28 + # source://rubocop//lib/rubocop/cop/team.rb#34 def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end # @return [Team] # - # source://rubocop//lib/rubocop/cop/team.rb#14 + # source://rubocop//lib/rubocop/cop/team.rb#15 def new(cop_or_classes, config, options = T.unsafe(nil)); end end end @@ -53119,59 +53448,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 @@ -53180,104 +53509,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. @@ -53389,12 +53723,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 @@ -53834,32 +54168,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 @@ -53869,12 +54208,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. @@ -53924,12 +54263,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. @@ -54008,7 +54347,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 @@ -54018,12 +54357,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. @@ -54140,12 +54479,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 @@ -54227,7 +54566,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. @@ -54577,13 +54916,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` @@ -54598,10 +54934,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 @@ -54788,11 +55124,16 @@ module RuboCop::FileFinder # source://rubocop//lib/rubocop/file_finder.rb#20 def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#26 + def traverse_directories_upwards(start_dir, stop_dir = T.unsafe(nil)); end + private # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#28 + # source://rubocop//lib/rubocop/file_finder.rb#36 def traverse_files_upwards(filename, start_dir, stop_dir); end class << self @@ -55616,40 +55957,92 @@ end # This formatter formats the report data in JUnit format. # -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#17 +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#15 class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter # @return [JUnitFormatter] a new instance of JUnitFormatter # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#18 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#24 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#55 - def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#64 - def classname_attribute_value(file); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#29 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#32 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#71 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 def finished(_inspected_files); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 + private + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#106 + def add_failure_to(testcase, offenses, cop_name); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#85 + def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#94 + def classname_attribute_value(file); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#81 def offenses_for_cop(all_offenses, cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#47 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#77 def relevant_for_output?(options, target_offenses); end - private + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#101 + def reset_count; end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#83 - def add_failure_to(testcase, offenses, cop_name); end + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#118 + def xml_escape(string); end +end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#78 - def reset_count; end +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#16 +RuboCop::Formatter::JUnitFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#132 +class RuboCop::Formatter::JUnitFormatter::FailureElement + # @return [FailureElement] a new instance of FailureElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#135 + def initialize(type:, message:, text:); end + + # Returns the value of attribute message. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def message; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def text; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def type; end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#122 +class RuboCop::Formatter::JUnitFormatter::TestCaseElement + # @return [TestCaseElement] a new instance of TestCaseElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#125 + def initialize(classname:, name:); end + + # Returns the value of attribute classname. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def classname; end + + # Returns the value of attribute failures. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def failures; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def name; end end # This formatter displays the report data in markdown @@ -56056,227 +56449,6 @@ module RuboCop::LSP end end -# Log for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/logger.rb#16 -class RuboCop::LSP::Logger - class << self - # @api private - # - # source://rubocop//lib/rubocop/lsp/logger.rb#17 - def log(message); end - end -end - -# Routes for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/routes.rb#18 -class RuboCop::LSP::Routes - # @api private - # @return [Routes] a new instance of Routes - # - # source://rubocop//lib/rubocop/lsp/routes.rb#25 - def initialize(server); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#31 - def for(name); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#38 - def handle_initialize(request); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#57 - def handle_initialized(_request); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#167 - def handle_method_missing(request); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#64 - def handle_shutdown(request); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#156 - def handle_unsupported_method(request, method = T.unsafe(nil)); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#205 - def diagnostic(file_uri, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#175 - def extract_initialization_options_from(request); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#185 - def format_file(file_uri, command: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#219 - def remove_file_protocol_from(uri); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#223 - def to_diagnostic(offense); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#235 - def to_range(location); end - - class << self - private - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#19 - def handle(name, &block); end - end -end - -# Runtime for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/runtime.rb#16 -class RuboCop::LSP::Runtime - # @api private - # @return [Runtime] a new instance of Runtime - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#19 - def initialize(config_store); end - - # This abuses the `--stdin` option of rubocop and reads the formatted text - # from the `options[:stdin]` that rubocop mutates. This depends on - # `parallel: false` as well as the fact that RuboCop doesn't otherwise dup - # or reassign that options object. Risky business! - # - # Reassigning `options[:stdin]` is done here: - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/team.rb#L131 - # Printing `options[:stdin]` - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cli/command/execute_runner.rb#L95 - # Setting `parallel: true` would break this here: - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/runner.rb#L72 - # - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#38 - def format(path, text, command:); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def layout_mode=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def lint_mode=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#55 - def offenses(path, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def safe_autocorrect=(_arg0); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#77 - def config_only_options; end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#84 - def redirect_stdout(&block); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#92 - def run_rubocop(options, path); end -end - -# Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/server.rb#22 -class RuboCop::LSP::Server - # @api private - # @return [Server] a new instance of Server - # - # source://rubocop//lib/rubocop/lsp/server.rb#23 - def initialize(config_store); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#61 - def configure(options); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#53 - def format(path, text, command:); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#57 - def offenses(path, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#34 - def start; end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#67 - def stop(&block); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#49 - def write(response); end -end - -# Severity for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/severity.rb#7 -class RuboCop::LSP::Severity - class << self - # @api private - # - # source://rubocop//lib/rubocop/lsp/severity.rb#17 - def find_by(rubocop_severity); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/lsp/severity.rb#8 -RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) - # Encapsulation of a lockfile for use when checking for gems. # Does not actually resolve gems, just parses the lockfile. # @@ -56327,17 +56499,17 @@ class RuboCop::Lockfile private - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lockfile.rb#85 - def bundler_lock_parser_defined?; end - # @api private # @return [Bundler::LockfileParser, nil] # # source://rubocop//lib/rubocop/lockfile.rb#72 def parser; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#85 + def use_bundler_lock_parser?; end end # Parse different formats of magic comments. @@ -57102,12 +57274,12 @@ class RuboCop::RemoteConfig # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#19 + # source://rubocop//lib/rubocop/remote_config.rb#23 def file; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#32 + # source://rubocop//lib/rubocop/remote_config.rb#36 def inherit_from_remote(file, path); end # @api private @@ -57119,46 +57291,46 @@ class RuboCop::RemoteConfig # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#95 + # source://rubocop//lib/rubocop/remote_config.rb#99 def cache_name_from_uri; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#78 + # source://rubocop//lib/rubocop/remote_config.rb#82 def cache_path; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/remote_config.rb#82 + # source://rubocop//lib/rubocop/remote_config.rb#86 def cache_path_exists?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/remote_config.rb#86 + # source://rubocop//lib/rubocop/remote_config.rb#90 def cache_path_expired?; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#101 + # source://rubocop//lib/rubocop/remote_config.rb#105 def cloned_url; end # @api private # @yield [request] # - # source://rubocop//lib/rubocop/remote_config.rb#53 + # source://rubocop//lib/rubocop/remote_config.rb#57 def generate_request(uri); end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#62 + # source://rubocop//lib/rubocop/remote_config.rb#66 def handle_response(response, limit, &block); end # @api private # @raise [ArgumentError] # - # source://rubocop//lib/rubocop/remote_config.rb#40 + # source://rubocop//lib/rubocop/remote_config.rb#44 def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end end @@ -57221,7 +57393,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#236 + # source://rubocop//lib/rubocop/result_cache.rb#229 def context_checksum(team, options); end # @api private @@ -57261,14 +57433,6 @@ class RuboCop::ResultCache # source://rubocop//lib/rubocop/result_cache.rb#142 def symlink_protection_triggered?(path); end - # The external dependency checksums are cached per RuboCop team so that - # the checksums don't need to be recomputed for each file. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#227 - def team_checksum(team); end - class << self # @api private # @return [Boolean] @@ -57414,10 +57578,10 @@ class RuboCop::Runner # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#427 + # source://rubocop//lib/rubocop/runner.rb#430 def considered_failure?(offense); end - # source://rubocop//lib/rubocop/runner.rb#460 + # source://rubocop//lib/rubocop/runner.rb#463 def default_config(cop_name); end # source://rubocop//lib/rubocop/runner.rb#276 @@ -57446,16 +57610,16 @@ class RuboCop::Runner # source://rubocop//lib/rubocop/runner.rb#244 def file_started(file); end - # source://rubocop//lib/rubocop/runner.rb#407 + # source://rubocop//lib/rubocop/runner.rb#410 def filter_cop_classes(cop_classes, config); end # source://rubocop//lib/rubocop/runner.rb#108 def find_target_files(paths); end - # source://rubocop//lib/rubocop/runner.rb#418 + # source://rubocop//lib/rubocop/runner.rb#421 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#475 + # source://rubocop//lib/rubocop/runner.rb#478 def get_processed_source(file); end # source://rubocop//lib/rubocop/runner.rb#346 @@ -57472,25 +57636,25 @@ class RuboCop::Runner # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#456 + # source://rubocop//lib/rubocop/runner.rb#459 def mark_as_safe_by_config?(config); end - # source://rubocop//lib/rubocop/runner.rb#464 + # source://rubocop//lib/rubocop/runner.rb#467 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/runner.rb#368 + # source://rubocop//lib/rubocop/runner.rb#371 def mobilize_team(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#373 + # source://rubocop//lib/rubocop/runner.rb#376 def mobilized_cop_classes(config); end - # source://rubocop//lib/rubocop/runner.rb#436 + # source://rubocop//lib/rubocop/runner.rb#439 def offenses_to_report(offenses); end # source://rubocop//lib/rubocop/runner.rb#156 def process_file(file); end - # source://rubocop//lib/rubocop/runner.rb#397 + # source://rubocop//lib/rubocop/runner.rb#400 def qualify_option_cop_names; end # @yield [cop] @@ -57506,17 +57670,17 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#503 + # source://rubocop//lib/rubocop/runner.rb#506 def standby_team(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#414 + # source://rubocop//lib/rubocop/runner.rb#417 def style_guide_cops_only?(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#448 + # source://rubocop//lib/rubocop/runner.rb#451 def supports_safe_autocorrect?(offense); end # @yield [team] @@ -57788,34 +57952,34 @@ class RuboCop::TargetRuby # @api private # @return [TargetRuby] a new instance of TargetRuby # - # source://rubocop//lib/rubocop/target_ruby.rb#254 + # source://rubocop//lib/rubocop/target_ruby.rb#258 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#270 + # source://rubocop//lib/rubocop/target_ruby.rb#274 def rubocop_version_with_support; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#258 + # source://rubocop//lib/rubocop/target_ruby.rb#262 def source; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_ruby.rb#266 + # source://rubocop//lib/rubocop/target_ruby.rb#270 def supported?; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#262 + # source://rubocop//lib/rubocop/target_ruby.rb#266 def version; end class << self # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#240 + # source://rubocop//lib/rubocop/target_ruby.rb#244 def supported_versions; end end end @@ -57824,23 +57988,23 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#187 +# source://rubocop//lib/rubocop/target_ruby.rb#191 class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#188 + # source://rubocop//lib/rubocop/target_ruby.rb#192 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#221 + # source://rubocop//lib/rubocop/target_ruby.rb#225 def bundler_lock_file_path; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#194 + # source://rubocop//lib/rubocop/target_ruby.rb#198 def find_version; end end @@ -57853,18 +58017,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#228 +# source://rubocop//lib/rubocop/target_ruby.rb#232 class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#229 + # source://rubocop//lib/rubocop/target_ruby.rb#233 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#235 + # source://rubocop//lib/rubocop/target_ruby.rb#239 def find_version; end end @@ -57876,42 +58040,37 @@ end class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop//lib/rubocop/target_ruby.rb#64 + # source://rubocop//lib/rubocop/target_ruby.rb#62 def gem_requirement_versions(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#70 + # source://rubocop//lib/rubocop/target_ruby.rb#68 def name; end - # source://rubocop//lib/rubocop/target_ruby.rb#59 + # source://rubocop//lib/rubocop/target_ruby.rb#57 def required_ruby_version(param0); end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#121 - def find_default_minimal_known_ruby(right_hand_side); end + # source://rubocop//lib/rubocop/target_ruby.rb#123 + def find_minimal_known_ruby(right_hand_side); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#76 + # source://rubocop//lib/rubocop/target_ruby.rb#74 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#86 - def gemspec_filename; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#93 + # source://rubocop//lib/rubocop/target_ruby.rb#84 def gemspec_filepath; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#117 + # source://rubocop//lib/rubocop/target_ruby.rb#119 def version_from_array(array); end # @api private @@ -57921,15 +58080,10 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#105 + # source://rubocop//lib/rubocop/target_ruby.rb#107 def version_from_right_hand_side(right_hand_side); end end -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#56 -RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) - # @api private # # source://rubocop//lib/rubocop/target_ruby.rb#7 @@ -57963,49 +58117,49 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#133 +# source://rubocop//lib/rubocop/target_ruby.rb#137 class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#137 + # source://rubocop//lib/rubocop/target_ruby.rb#141 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#143 + # source://rubocop//lib/rubocop/target_ruby.rb#147 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#151 + # source://rubocop//lib/rubocop/target_ruby.rb#155 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#147 + # source://rubocop//lib/rubocop/target_ruby.rb#151 def pattern; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#158 + # source://rubocop//lib/rubocop/target_ruby.rb#162 def version_file; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#134 +# source://rubocop//lib/rubocop/target_ruby.rb#138 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#135 +# source://rubocop//lib/rubocop/target_ruby.rb#139 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#244 +# source://rubocop//lib/rubocop/target_ruby.rb#248 RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) # A place where information about a target ruby version is found. @@ -58041,34 +58195,34 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#166 +# source://rubocop//lib/rubocop/target_ruby.rb#170 class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#170 + # source://rubocop//lib/rubocop/target_ruby.rb#174 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#176 + # source://rubocop//lib/rubocop/target_ruby.rb#180 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#180 + # source://rubocop//lib/rubocop/target_ruby.rb#184 def pattern; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#167 +# source://rubocop//lib/rubocop/target_ruby.rb#171 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#168 +# source://rubocop//lib/rubocop/target_ruby.rb#172 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rubocop//lib/rubocop/ast_aliases.rb#7 @@ -58094,12 +58248,12 @@ module RuboCop::Version class << self # @api private # - # source://rubocop//lib/rubocop/version.rb#108 + # source://rubocop//lib/rubocop/version.rb#110 def document_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#58 + # source://rubocop//lib/rubocop/version.rb#60 def extension_versions(env); end # Returns feature version in one of two ways: @@ -58109,30 +58263,30 @@ module RuboCop::Version # # @api private # - # source://rubocop//lib/rubocop/version.rb#92 + # source://rubocop//lib/rubocop/version.rb#94 def feature_version(feature); end # @api private # - # source://rubocop//lib/rubocop/version.rb#43 + # source://rubocop//lib/rubocop/version.rb#45 def parser_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#113 + # source://rubocop//lib/rubocop/version.rb#115 def server_mode; end # @api private # - # source://rubocop//lib/rubocop/version.rb#21 + # source://rubocop//lib/rubocop/version.rb#22 def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end end end -# source://rubocop//lib/rubocop/version.rb#12 +# source://rubocop//lib/rubocop/version.rb#13 RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/version.rb#16 +# source://rubocop//lib/rubocop/version.rb#17 RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) # source://rubocop//lib/rubocop/version.rb#8 @@ -58161,14 +58315,23 @@ module RuboCop::YAMLDuplicationChecker # # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#7 def check(yaml_string, filename, &on_duplicated); end + end +end - private +# @api private +# +# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#14 +class RuboCop::YAMLDuplicationChecker::DuplicationCheckHandler < ::Psych::TreeBuilder + # @api private + # @return [DuplicationCheckHandler] a new instance of DuplicationCheckHandler + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#15 + def initialize(&block); end - # @api private - # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#21 - def traverse(tree, &on_duplicated); end - end + # @api private + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#20 + def end_mapping; end end # Extensions to the core String class @@ -58181,13 +58344,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/updater/Gemfile.lock b/updater/Gemfile.lock index c9f5cd8f4b7..dbef9e3f44b 100644 --- a/updater/Gemfile.lock +++ b/updater/Gemfile.lock @@ -202,7 +202,7 @@ GEM google-protobuf (>= 3.18, < 5.a) gpgme (2.0.24) mini_portile2 (~> 2.7) - hashdiff (1.1.0) + hashdiff (1.1.1) http (5.1.1) addressable (~> 2.8) http-cookie (~> 1.0) @@ -295,12 +295,12 @@ GEM parallel_tests (4.7.1) parallel parseconfig (1.0.8) - parser (3.3.4.2) + parser (3.3.5.0) ast (~> 2.4.1) racc psych (5.1.2) stringio - public_suffix (6.0.0) + public_suffix (6.0.1) racc (1.8.1) rainbow (3.1.1) rake (13.2.1) @@ -314,8 +314,7 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.3.6) - strscan + rexml (3.3.8) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -334,24 +333,23 @@ GEM rspec-sorbet (1.9.2) sorbet-runtime rspec-support (3.13.1) - rubocop (1.65.1) + rubocop (1.67.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.1) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) rubocop-capybara (2.20.0) rubocop (~> 1.41) rubocop-factory_bot (2.25.1) rubocop (~> 1.41) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rspec (2.29.1) @@ -361,7 +359,7 @@ GEM rubocop-rspec_rails (~> 2.28) rubocop-rspec_rails (2.28.3) rubocop (~> 1.40) - rubocop-sorbet (0.8.5) + rubocop-sorbet (0.8.6) rubocop (>= 1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) @@ -383,7 +381,6 @@ GEM sorbet-runtime (0.5.11577) stackprof (0.2.25) stringio (3.1.0) - strscan (3.1.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) toml-rb (2.2.0) @@ -394,14 +391,14 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.8.2) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) vcr (6.3.1) base64 - webmock (3.23.1) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.1) + webrick (1.8.2) PLATFORMS ruby @@ -444,8 +441,8 @@ DEPENDENCIES rspec (~> 3.12) rspec-its (~> 1.3) rspec-sorbet (~> 1.9.2) - rubocop (~> 1.65.0) - rubocop-performance (~> 1.21.0) + rubocop (~> 1.67.0) + rubocop-performance (~> 1.22.1) rubocop-rspec (~> 2.29.1) rubocop-sorbet (~> 0.8.5) sentry-opentelemetry (~> 5.16)