diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.41.0.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.43.0.rbi similarity index 97% rename from Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.41.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.43.0.rbi index 22b17ef931..898cc36258 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.41.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.43.0.rbi @@ -500,6 +500,14 @@ end # source://rubocop-ast//lib/rubocop/ast/builder.rb#14 RuboCop::AST::BuilderExtensions::NODE_MAP = T.let(T.unsafe(nil), Hash) +# A parser builder, based on the one provided by prism, +# which is capable of emitting AST for more recent Rubies. +# +# source://rubocop-ast//lib/rubocop/ast/builder_prism.rb#7 +class RuboCop::AST::BuilderPrism < ::Prism::Translation::Parser::Builder + include ::RuboCop::AST::BuilderExtensions +end + # A node extension for `case_match` nodes. This will be used in place of # a plain node when the builder constructs the AST, making its methods # available to all `case_match` nodes within RuboCop. @@ -4056,13 +4064,13 @@ end 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 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#116 def initialize; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def comments(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#121 def named_parameters; end # Returns the value of attribute node_ids. @@ -4070,7 +4078,7 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#33 def node_ids; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#125 def parser; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -4114,11 +4122,6 @@ class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#111 def ruby_ast(ruby); end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#116 - def ruby_parser; end end # @api private @@ -4229,36 +4232,36 @@ end # @api private # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#139 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler # @api private # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#140 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#133 def do_compile; end private # @api private # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#150 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#143 def node_id; end # @api private # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#146 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#139 def tracer(kind); end end # @api private # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#156 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#149 class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler end # @api private # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#161 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#154 class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler end @@ -5086,116 +5089,116 @@ class RuboCop::AST::NodePattern::Parser < ::Racc::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#333 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#335 def _reduce_10(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#339 def _reduce_11(val, _values); end # reduce 12 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#345 def _reduce_13(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#349 def _reduce_14(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#353 def _reduce_15(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#357 def _reduce_16(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#361 def _reduce_17(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#365 def _reduce_18(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#369 def _reduce_19(val, _values); end # reduce 1 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#303 def _reduce_2(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#373 def _reduce_20(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#377 def _reduce_21(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#381 def _reduce_22(val, _values); end # reduce 24 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#389 def _reduce_25(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#395 def _reduce_26(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#307 def _reduce_3(val, _values); end # reduce 32 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#415 def _reduce_33(val, _values); end # reduce 36 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#425 def _reduce_37(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#429 def _reduce_38(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#433 def _reduce_39(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#311 def _reduce_4(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#437 def _reduce_40(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#441 def _reduce_41(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#445 def _reduce_42(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#449 def _reduce_43(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#453 def _reduce_44(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#457 def _reduce_45(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#461 def _reduce_46(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#315 def _reduce_5(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#319 def _reduce_6(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#323 def _reduce_7(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#327 def _reduce_8(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#331 def _reduce_9(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465 def _reduce_none(val, _values); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -5255,10 +5258,10 @@ 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#293 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#295 RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#244 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 @@ -5385,9 +5388,6 @@ RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), Set) @@ -5589,9 +5589,6 @@ RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PRESENT_ANY_BLANK_ETC = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) @@ -6166,7 +6163,7 @@ class RuboCop::AST::ProcessedSource # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#49 def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil), prism_result: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#95 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#91 def [](*args); end # Returns the value of attribute ast. @@ -6174,12 +6171,12 @@ class RuboCop::AST::ProcessedSource # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 def ast; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#73 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#69 def ast_with_comments; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#134 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#130 def blank?; end # Returns the value of attribute buffer. @@ -6189,12 +6186,12 @@ class RuboCop::AST::ProcessedSource # Raw source checksum for tracking infinite loops. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#106 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#102 def checksum; end # @return [Comment, nil] the comment at that line, if any. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#139 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#135 def comment_at_line(line); end # Consider using `each_comment_in_lines` instead @@ -6202,7 +6199,7 @@ 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#161 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#157 def commented?(source_range); end # Returns the value of attribute comments. @@ -6214,17 +6211,17 @@ class RuboCop::AST::ProcessedSource # # @deprecated Use `each_comment_in_lines` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#169 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#165 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#161 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#157 def contains_comment?(source_range); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#183 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#179 def current_line(token); end # Returns the value of attribute diagnostics. @@ -6234,53 +6231,53 @@ class RuboCop::AST::ProcessedSource # @deprecated Use `comments.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#111 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 def each_comment(&block); end # Enumerates on the comments contained with the given `line_range` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#149 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#145 def each_comment_in_lines(line_range); end # @deprecated Use `tokens.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#121 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#117 def each_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#130 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126 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#116 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#112 def find_comment(&block); end # @deprecated Use `tokens.find` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#122 def find_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#204 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#200 def first_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#187 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#183 def following_line(token); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#208 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#204 def last_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#191 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#187 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#144 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#140 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#81 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#77 def lines; end # source://rubocop-md/2.0.0/lib/rubocop/markdown/rubocop_ext.rb#85 @@ -6301,7 +6298,7 @@ class RuboCop::AST::ProcessedSource # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 def path; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#179 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#175 def preceding_line(token); end # Returns the value of attribute raw_source. @@ -6318,12 +6315,12 @@ class RuboCop::AST::ProcessedSource # 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#215 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#211 def sorted_tokens; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#173 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#169 def start_with?(string); end # Returns the value of attribute tokens. @@ -6331,44 +6328,48 @@ class RuboCop::AST::ProcessedSource # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 def tokens; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#198 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#194 def tokens_within(range_or_node); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#99 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#95 def valid_syntax?; end private - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#329 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#327 def builder_class(parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#222 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#218 def comment_index; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#366 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#337 def create_parser(ruby_version, parser_engine, prism_result); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#400 + # The Parser gem does not support Ruby 3.5 or later. + # It is also not fully compatible with Ruby 3.4 but for + # now respects using parser for backwards compatibility. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#383 + def default_parser_engine(ruby_version); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#391 def first_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#405 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#396 def last_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#263 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#366 + def normalize_parser_engine(parser_engine, ruby_version); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#259 def parser_class(ruby_version, parser_engine); end - # Prism is a native extension, a `LoadError` will be raised if linked to an incompatible - # Ruby version. Only raise if it really was caused by Prism not being present. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#343 - def require_prism; end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#410 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#401 def source_range(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#247 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#243 def tokenize(parser); end class << self @@ -7499,28 +7500,28 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node end class RuboCop::CommentConfig - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#34 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#34 def initialize(processed_source); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#63 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def config(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#51 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#51 def cop_disabled_line_ranges; end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#39 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#39 def cop_enabled_at_line?(cop, line_number); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#47 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#47 def cop_opted_in?(cop); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#55 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#55 def extra_enabled_comments; end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#30 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#30 def processed_source; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -7528,51 +7529,51 @@ class RuboCop::CommentConfig private - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#96 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#96 def analyze; end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#124 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#124 def analyze_cop(analysis, directive); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#144 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#144 def analyze_disabled(analysis, directive); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#155 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#155 def analyze_rest(analysis, directive); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#135 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#135 def analyze_single_line(analysis, directive); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#164 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#164 def cop_line_ranges(analysis); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#170 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#170 def each_directive; end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#69 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#69 def extra_enabled_comments_with_names(extras:, names:); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#190 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#190 def handle_enable_all(directive, names, extras); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#204 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#204 def handle_switch(directive, names, extras); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#115 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#115 def inject_disabled_cops_directives(analyses); end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#183 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#183 def non_comment_token_line_numbers; end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#83 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#83 def opt_in_cops; end - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#179 + # source://rubocop/1.75.0/lib/rubocop/comment_config.rb#179 def qualified_cop_name(cop_name); end end class RuboCop::Config - # source://rubocop/1.74.0/lib/rubocop/config.rb#31 + # source://rubocop/1.75.0/lib/rubocop/config.rb#31 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -7581,40 +7582,40 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def []=(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#183 + # source://rubocop/1.75.0/lib/rubocop/config.rb#212 def active_support_extensions_enabled?; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#98 + # source://rubocop/1.75.0/lib/rubocop/config.rb#127 def add_excludes_from_higher_level(highest_config); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#210 + # source://rubocop/1.75.0/lib/rubocop/config.rb#239 def allowed_camel_case_file?(file); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#254 + # source://rubocop/1.75.0/lib/rubocop/config.rb#283 def base_dir_for_path_parameters; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#284 + # source://rubocop/1.75.0/lib/rubocop/config.rb#313 def bundler_lock_file_path; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#56 + # source://rubocop/1.75.0/lib/rubocop/config.rb#85 def check; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#151 + # source://rubocop/1.75.0/lib/rubocop/config.rb#180 def clusivity_config_for_badge?(badge); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#171 + # source://rubocop/1.75.0/lib/rubocop/config.rb#200 def cop_enabled?(name); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def delete(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#110 + # source://rubocop/1.75.0/lib/rubocop/config.rb#139 def deprecation_check; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def dig(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#175 + # source://rubocop/1.75.0/lib/rubocop/config.rb#204 def disabled_new_cops?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -7623,40 +7624,40 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def each_key(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#179 + # source://rubocop/1.75.0/lib/rubocop/config.rb#208 def enabled_new_cops?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def fetch(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#232 + # source://rubocop/1.75.0/lib/rubocop/config.rb#261 def file_to_exclude?(file); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#191 + # source://rubocop/1.75.0/lib/rubocop/config.rb#220 def file_to_include?(file); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#167 + # source://rubocop/1.75.0/lib/rubocop/config.rb#196 def for_all_cops; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#137 + # source://rubocop/1.75.0/lib/rubocop/config.rb#166 def for_badge(badge); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#124 + # source://rubocop/1.75.0/lib/rubocop/config.rb#153 def for_cop(cop); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#162 + # source://rubocop/1.75.0/lib/rubocop/config.rb#191 def for_department(department_name); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#131 + # source://rubocop/1.75.0/lib/rubocop/config.rb#160 def for_enabled_cop(cop); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#309 + # source://rubocop/1.75.0/lib/rubocop/config.rb#338 def gem_versions_in_target; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#313 + # source://rubocop/1.75.0/lib/rubocop/config.rb#342 def inspect; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#81 + # source://rubocop/1.75.0/lib/rubocop/config.rb#110 def internal?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -7665,16 +7666,16 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def keys(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#52 + # source://rubocop/1.75.0/lib/rubocop/config.rb#81 def loaded_features; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#21 + # source://rubocop/1.75.0/lib/rubocop/config.rb#21 def loaded_path; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#48 + # source://rubocop/1.75.0/lib/rubocop/config.rb#77 def loaded_plugins; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#86 + # source://rubocop/1.75.0/lib/rubocop/config.rb#115 def make_excludes_absolute; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -7683,37 +7684,37 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#264 + # source://rubocop/1.75.0/lib/rubocop/config.rb#293 def parser_engine; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#245 + # source://rubocop/1.75.0/lib/rubocop/config.rb#274 def path_relative_to_config(path); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#241 + # source://rubocop/1.75.0/lib/rubocop/config.rb#270 def patterns_to_exclude; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#237 + # source://rubocop/1.75.0/lib/rubocop/config.rb#266 def patterns_to_include; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#295 + # source://rubocop/1.75.0/lib/rubocop/config.rb#324 def pending_cops; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#224 + # source://rubocop/1.75.0/lib/rubocop/config.rb#253 def possibly_include_hidden?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def replace(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#76 + # source://rubocop/1.75.0/lib/rubocop/config.rb#105 def signature; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#279 + # source://rubocop/1.75.0/lib/rubocop/config.rb#308 def smart_loaded_path; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#187 + # source://rubocop/1.75.0/lib/rubocop/config.rb#216 def string_literals_frozen_by_default?; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#268 + # source://rubocop/1.75.0/lib/rubocop/config.rb#297 def target_rails_version; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -7725,7 +7726,7 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def to_hash(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#72 + # source://rubocop/1.75.0/lib/rubocop/config.rb#101 def to_s; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -7734,37 +7735,37 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def validate(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#63 + # source://rubocop/1.75.0/lib/rubocop/config.rb#92 def validate_after_resolution; end private - # source://rubocop/1.74.0/lib/rubocop/config.rb#363 + # source://rubocop/1.75.0/lib/rubocop/config.rb#392 def department_of(qualified_cop_name); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#351 + # source://rubocop/1.75.0/lib/rubocop/config.rb#380 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#338 + # source://rubocop/1.75.0/lib/rubocop/config.rb#367 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop/1.74.0/lib/rubocop/config.rb#344 + # source://rubocop/1.75.0/lib/rubocop/config.rb#373 def read_gem_versions_from_target_lockfile; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#325 + # source://rubocop/1.75.0/lib/rubocop/config.rb#354 def read_rails_version_from_bundler_lock_file; end - # source://rubocop/1.74.0/lib/rubocop/config.rb#320 + # source://rubocop/1.75.0/lib/rubocop/config.rb#349 def target_rails_version_from_bundler_lock_file; end class << self - # source://rubocop/1.74.0/lib/rubocop/config.rb#23 + # source://rubocop/1.75.0/lib/rubocop/config.rb#23 def create(hash, path, check: T.unsafe(nil)); end end end class RuboCop::ConfigValidator - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#28 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#28 def initialize(config); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 @@ -7773,66 +7774,66 @@ class RuboCop::ConfigValidator # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#65 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#65 def target_ruby_version; end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#34 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#34 def validate; end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#61 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#61 def validate_after_resolution; end private - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#100 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#100 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#263 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#264 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#73 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#73 def check_obsoletions; end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#80 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#80 def check_target_ruby; end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#204 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#205 def each_invalid_parameter(cop_name); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#116 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#116 def list_unknown_cops(invalid_cop_names); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#283 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#284 def param_error_message(parent, key, value, supposed_values); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#251 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#252 def reject_conflicting_safe_settings; end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#242 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#243 def reject_mutually_exclusive_defaults; end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#138 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#139 def suggestion(name); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#71 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#71 def target_ruby; end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#216 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#217 def validate_enforced_styles(valid_cop_names); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#165 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#166 def validate_new_cops_parameter; end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#190 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#191 def validate_parameter_names(valid_cop_names); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#176 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#177 def validate_parameter_shape(valid_cop_names); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#236 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#237 def validate_support_and_has_list(name, formats, valid); end - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#154 + # source://rubocop/1.75.0/lib/rubocop/config_validator.rb#155 def validate_syntax_cop; end end diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.74.0.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.75.0.rbi similarity index 98% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.74.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.75.0.rbi index 3ce0484b27..db1cd5a023 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.74.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.75.0.rbi @@ -840,7 +840,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def config(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/comment_config.rb#51 @@ -864,7 +864,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def registry(*_arg0, **_arg1, &_arg2); end private @@ -1040,23 +1040,23 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#31 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def [](*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def []=(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#183 + # source://rubocop//lib/rubocop/config.rb#212 def active_support_extensions_enabled?; end - # source://rubocop//lib/rubocop/config.rb#98 + # source://rubocop//lib/rubocop/config.rb#127 def add_excludes_from_higher_level(highest_config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#210 + # source://rubocop//lib/rubocop/config.rb#239 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -1065,74 +1065,74 @@ 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#254 + # source://rubocop//lib/rubocop/config.rb#283 def base_dir_for_path_parameters; end # @return [String, nil] # - # source://rubocop//lib/rubocop/config.rb#284 + # source://rubocop//lib/rubocop/config.rb#313 def bundler_lock_file_path; end - # source://rubocop//lib/rubocop/config.rb#56 + # source://rubocop//lib/rubocop/config.rb#85 def check; end # @api private # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys # - # source://rubocop//lib/rubocop/config.rb#151 + # source://rubocop//lib/rubocop/config.rb#180 def clusivity_config_for_badge?(badge); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#171 + # source://rubocop//lib/rubocop/config.rb#200 def cop_enabled?(name); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def delete(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#110 + # source://rubocop//lib/rubocop/config.rb#139 def deprecation_check; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def dig(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#175 + # source://rubocop//lib/rubocop/config.rb#204 def disabled_new_cops?; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def each(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def each_key(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#179 + # source://rubocop//lib/rubocop/config.rb#208 def enabled_new_cops?; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def fetch(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#232 + # source://rubocop//lib/rubocop/config.rb#261 def file_to_exclude?(file); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#191 + # source://rubocop//lib/rubocop/config.rb#220 def file_to_include?(file); end - # source://rubocop//lib/rubocop/config.rb#167 + # source://rubocop//lib/rubocop/config.rb#196 def for_all_cops; end # Note: the 'Enabled' attribute is same as that returned by `for_cop` # # @return [Config] for the given cop merged with that of its department (if any) # - # source://rubocop//lib/rubocop/config.rb#137 + # source://rubocop//lib/rubocop/config.rb#166 def for_badge(badge); end # Note: the 'Enabled' attribute is calculated according to the department's @@ -1140,7 +1140,7 @@ class RuboCop::Config # # @return [Config] for the given cop / cop name. # - # source://rubocop//lib/rubocop/config.rb#124 + # source://rubocop//lib/rubocop/config.rb#153 def for_cop(cop); end # Note: the 'Enabled' attribute will be present only if specified @@ -1148,7 +1148,7 @@ class RuboCop::Config # # @return [Config] for the given department name. # - # source://rubocop//lib/rubocop/config.rb#162 + # source://rubocop//lib/rubocop/config.rb#191 def for_department(department_name); end # If the given cop is enabled, returns its configuration hash. @@ -1156,31 +1156,31 @@ class RuboCop::Config # # @return [Config, Hash] for the given cop / cop name. # - # source://rubocop//lib/rubocop/config.rb#131 + # source://rubocop//lib/rubocop/config.rb#160 def for_enabled_cop(cop); end # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) # - # source://rubocop//lib/rubocop/config.rb#309 + # source://rubocop//lib/rubocop/config.rb#338 def gem_versions_in_target; end - # source://rubocop//lib/rubocop/config.rb#313 + # source://rubocop//lib/rubocop/config.rb#342 def inspect; end # True if this is a config file that is shipped with RuboCop # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#81 + # source://rubocop//lib/rubocop/config.rb#110 def internal?; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def key?(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def keys(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#52 + # source://rubocop//lib/rubocop/config.rb#81 def loaded_features; end # Returns the value of attribute loaded_path. @@ -1188,31 +1188,31 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#21 def loaded_path; end - # source://rubocop//lib/rubocop/config.rb#48 + # source://rubocop//lib/rubocop/config.rb#77 def loaded_plugins; end - # source://rubocop//lib/rubocop/config.rb#86 + # source://rubocop//lib/rubocop/config.rb#115 def make_excludes_absolute; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def map(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#264 + # source://rubocop//lib/rubocop/config.rb#293 def parser_engine; end - # source://rubocop//lib/rubocop/config.rb#245 + # source://rubocop//lib/rubocop/config.rb#274 def path_relative_to_config(path); end - # source://rubocop//lib/rubocop/config.rb#241 + # source://rubocop//lib/rubocop/config.rb#270 def patterns_to_exclude; end - # source://rubocop//lib/rubocop/config.rb#237 + # source://rubocop//lib/rubocop/config.rb#266 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#295 + # source://rubocop//lib/rubocop/config.rb#324 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1220,74 +1220,74 @@ class RuboCop::Config # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#224 + # source://rubocop//lib/rubocop/config.rb#253 def possibly_include_hidden?; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def replace(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#76 + # source://rubocop//lib/rubocop/config.rb#105 def signature; end - # source://rubocop//lib/rubocop/config.rb#279 + # source://rubocop//lib/rubocop/config.rb#308 def smart_loaded_path; end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#187 + # source://rubocop//lib/rubocop/config.rb#216 def string_literals_frozen_by_default?; end - # source://rubocop//lib/rubocop/config.rb#268 + # source://rubocop//lib/rubocop/config.rb#297 def target_rails_version; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def target_ruby_version(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def to_h(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def to_hash(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#72 + # source://rubocop//lib/rubocop/config.rb#101 def to_s; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def transform_values(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def validate(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#63 + # source://rubocop//lib/rubocop/config.rb#92 def validate_after_resolution; end private - # source://rubocop//lib/rubocop/config.rb#363 + # source://rubocop//lib/rubocop/config.rb#392 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#351 + # source://rubocop//lib/rubocop/config.rb#380 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#338 + # source://rubocop//lib/rubocop/config.rb#367 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop//lib/rubocop/config.rb#344 + # source://rubocop//lib/rubocop/config.rb#373 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#325 + # source://rubocop//lib/rubocop/config.rb#354 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#320 + # source://rubocop//lib/rubocop/config.rb#349 def target_rails_version_from_bundler_lock_file; end class << self @@ -1427,7 +1427,7 @@ class RuboCop::ConfigLoader extend ::RuboCop::FileFinder class << self - # source://rubocop//lib/rubocop/config_loader.rb#148 + # source://rubocop//lib/rubocop/config_loader.rb#152 def add_excludes_from_files(config, config_file); end # Used to add features that were required inside a config or from @@ -1435,7 +1435,7 @@ class RuboCop::ConfigLoader # # @api private # - # source://rubocop//lib/rubocop/config_loader.rb#237 + # source://rubocop//lib/rubocop/config_loader.rb#241 def add_loaded_features(loaded_features); end # Used to add plugins that were required inside a config or from @@ -1443,7 +1443,7 @@ class RuboCop::ConfigLoader # # @api private # - # source://rubocop//lib/rubocop/config_loader.rb#230 + # source://rubocop//lib/rubocop/config_loader.rb#234 def add_loaded_plugins(loaded_plugins); end # source://rubocop//lib/rubocop/config_loader.rb#91 @@ -1458,10 +1458,10 @@ class RuboCop::ConfigLoader # user's home directory is checked. If there's no .rubocop.yml # there either, the path to the default file is returned. # - # source://rubocop//lib/rubocop/config_loader.rb#115 + # source://rubocop//lib/rubocop/config_loader.rb#119 def configuration_file_for(target_dir); end - # source://rubocop//lib/rubocop/config_loader.rb#119 + # source://rubocop//lib/rubocop/config_loader.rb#123 def configuration_from_file(config_file, check: T.unsafe(nil)); end # Returns the value of attribute debug. @@ -1481,7 +1481,7 @@ class RuboCop::ConfigLoader # source://rubocop//lib/rubocop/config_loader.rb#33 def debug?; end - # source://rubocop//lib/rubocop/config_loader.rb#158 + # source://rubocop//lib/rubocop/config_loader.rb#162 def default_configuration; end # Sets the attribute default_configuration @@ -1549,7 +1549,7 @@ class RuboCop::ConfigLoader # so this API is usually not needed. It is intended to be used only when implementing tests # that do not use `rubocop/rspec/support`. # - # source://rubocop//lib/rubocop/config_loader.rb#170 + # source://rubocop//lib/rubocop/config_loader.rb#174 def inject_defaults!(config_yml_path); end # source://rubocop//lib/rubocop/config_loader.rb#53 @@ -1574,20 +1574,20 @@ class RuboCop::ConfigLoader # with the addition that any value that is a hash, and occurs in both # arguments, will also be merged. And so on. # - # source://rubocop//lib/rubocop/config_loader.rb#106 + # source://rubocop//lib/rubocop/config_loader.rb#110 def merge(base_hash, derived_hash); end # Merges the given configuration with the default one. # - # source://rubocop//lib/rubocop/config_loader.rb#223 + # source://rubocop//lib/rubocop/config_loader.rb#227 def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_loader.rb#139 + # source://rubocop//lib/rubocop/config_loader.rb#143 def pending_cops_only_qualified(pending_cops); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader.rb#143 + # source://rubocop//lib/rubocop/config_loader.rb#147 def possible_new_cops?(config); end # Returns the path RuboCop inferred as the root of the project. No file @@ -1595,37 +1595,37 @@ class RuboCop::ConfigLoader # # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. # - # source://rubocop//lib/rubocop/config_loader.rb#198 + # source://rubocop//lib/rubocop/config_loader.rb#202 def project_root; end - # source://rubocop//lib/rubocop/config_loader.rb#207 + # source://rubocop//lib/rubocop/config_loader.rb#211 def warn_on_pending_cops(pending_cops); end - # source://rubocop//lib/rubocop/config_loader.rb#215 + # source://rubocop//lib/rubocop/config_loader.rb#219 def warn_pending_cop(cop); end private - # source://rubocop//lib/rubocop/config_loader.rb#251 + # source://rubocop//lib/rubocop/config_loader.rb#255 def check_duplication(yaml_code, absolute_path); end - # source://rubocop//lib/rubocop/config_loader.rb#243 + # source://rubocop//lib/rubocop/config_loader.rb#247 def file_path(file); end # Read the specified file, or exit with a friendly, concise message on # stderr. Care is taken to use the standard OS exit code for a "file not # found" error. # - # source://rubocop//lib/rubocop/config_loader.rb#271 + # source://rubocop//lib/rubocop/config_loader.rb#275 def read_file(absolute_path); end - # source://rubocop//lib/rubocop/config_loader.rb#247 + # source://rubocop//lib/rubocop/config_loader.rb#251 def resolver; end - # source://rubocop//lib/rubocop/config_loader.rb#277 + # source://rubocop//lib/rubocop/config_loader.rb#281 def yaml_tree_to_hash(yaml_tree); end - # source://rubocop//lib/rubocop/config_loader.rb#287 + # source://rubocop//lib/rubocop/config_loader.rb#291 def yaml_tree_to_hash!(yaml_tree); end end end @@ -1811,13 +1811,24 @@ class RuboCop::ConfigObsoletion # @api private # @return [ConfigObsoletion] a new instance of ConfigObsoletion # - # source://rubocop//lib/rubocop/config_obsoletion.rb#35 + # source://rubocop//lib/rubocop/config_obsoletion.rb#66 def initialize(config); end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#84 + def deprecated_cop_name?(name); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#79 + def legacy_cop_names; end + # @api private # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_obsoletion.rb#41 + # source://rubocop//lib/rubocop/config_obsoletion.rb#72 def reject_obsolete!; end # @api private @@ -1832,11 +1843,16 @@ class RuboCop::ConfigObsoletion private + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#151 + def cop_rules; end + # Cop rules are keyed by the name of the original cop # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#72 + # source://rubocop//lib/rubocop/config_obsoletion.rb#112 def load_cop_rules(rules); end # Parameter rules may apply to multiple cops and multiple parameters @@ -1845,7 +1861,7 @@ class RuboCop::ConfigObsoletion # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#85 + # source://rubocop//lib/rubocop/config_obsoletion.rb#125 def load_parameter_rules(rules); end # Default rules for obsoletions are in config/obsoletion.yml @@ -1853,15 +1869,26 @@ class RuboCop::ConfigObsoletion # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#52 + # source://rubocop//lib/rubocop/config_obsoletion.rb#92 def load_rules; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#98 + # source://rubocop//lib/rubocop/config_obsoletion.rb#138 def obsoletions; end class << self + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#45 + def deprecated_cop_name?(name); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#49 + def deprecated_names_for(cop); end + # @api private # # source://rubocop//lib/rubocop/config_obsoletion.rb#24 @@ -1875,7 +1902,22 @@ class RuboCop::ConfigObsoletion # @api private # # source://rubocop//lib/rubocop/config_obsoletion.rb#26 + def global; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#40 def legacy_cop_names; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#30 + def reset!; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#36 + def rules_cache_key; end end end @@ -2168,7 +2210,12 @@ class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRu # @return [RenamedCop] a new instance of RenamedCop # # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#11 - def initialize(config, old_name, new_name); end + def initialize(config, old_name, name_or_hash); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#9 + def metadata; end # @api private # @@ -2177,20 +2224,31 @@ class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRu # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#16 + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#23 def rule_message; end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#27 + def warning?; end + private # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#22 + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#33 def moved?; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#29 + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#44 + def severity; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#40 def verb; end end @@ -2377,10 +2435,10 @@ class RuboCop::ConfigValidator # source://rubocop//lib/rubocop/config_validator.rb#28 def initialize(config); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def for_all_cops(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def smart_loaded_path(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config_validator.rb#65 @@ -2405,7 +2463,7 @@ class RuboCop::ConfigValidator # source://rubocop//lib/rubocop/config_validator.rb#100 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#263 + # source://rubocop//lib/rubocop/config_validator.rb#264 def check_cop_config_value(hash, parent = T.unsafe(nil)); end # source://rubocop//lib/rubocop/config_validator.rb#73 @@ -2416,7 +2474,7 @@ class RuboCop::ConfigValidator # source://rubocop//lib/rubocop/config_validator.rb#80 def check_target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#204 + # source://rubocop//lib/rubocop/config_validator.rb#205 def each_invalid_parameter(cop_name); end # source://rubocop//lib/rubocop/config_validator.rb#116 @@ -2424,18 +2482,18 @@ class RuboCop::ConfigValidator # FIXME: Handling colors in exception messages like this is ugly. # - # source://rubocop//lib/rubocop/config_validator.rb#283 + # source://rubocop//lib/rubocop/config_validator.rb#284 def param_error_message(parent, key, value, supposed_values); end - # source://rubocop//lib/rubocop/config_validator.rb#251 + # source://rubocop//lib/rubocop/config_validator.rb#252 def reject_conflicting_safe_settings; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#242 + # source://rubocop//lib/rubocop/config_validator.rb#243 def reject_mutually_exclusive_defaults; end - # source://rubocop//lib/rubocop/config_validator.rb#138 + # source://rubocop//lib/rubocop/config_validator.rb#139 def suggestion(name); end # Returns the value of attribute target_ruby. @@ -2443,26 +2501,26 @@ class RuboCop::ConfigValidator # source://rubocop//lib/rubocop/config_validator.rb#71 def target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#216 + # source://rubocop//lib/rubocop/config_validator.rb#217 def validate_enforced_styles(valid_cop_names); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#165 + # source://rubocop//lib/rubocop/config_validator.rb#166 def validate_new_cops_parameter; end - # source://rubocop//lib/rubocop/config_validator.rb#190 + # source://rubocop//lib/rubocop/config_validator.rb#191 def validate_parameter_names(valid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#176 + # source://rubocop//lib/rubocop/config_validator.rb#177 def validate_parameter_shape(valid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#236 + # source://rubocop//lib/rubocop/config_validator.rb#237 def validate_support_and_has_list(name, formats, valid); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#154 + # source://rubocop//lib/rubocop/config_validator.rb#155 def validate_syntax_cop; end end @@ -4622,6 +4680,9 @@ class RuboCop::Cop::Commissioner # source://rubocop//lib/rubocop/cop/commissioner.rb#68 def on_irange(node); end + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 def on_ivar(node); end @@ -5278,7 +5339,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.7.1/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.7.3/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5769,6 +5830,37 @@ end # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#9 RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) +# This module encapsulates the ability to forbid certain identifiers in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/forbidden_identifiers.rb#6 +module RuboCop::Cop::ForbiddenIdentifiers + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/forbidden_identifiers.rb#9 + def forbidden_identifier?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/forbidden_identifiers.rb#15 + def forbidden_identifiers; end +end + +# if a variable starts with a sigil it will be removed +# +# source://rubocop//lib/rubocop/cop/mixin/forbidden_identifiers.rb#7 +RuboCop::Cop::ForbiddenIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to forbid certain patterns in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/forbidden_pattern.rb#6 +module RuboCop::Cop::ForbiddenPattern + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/forbidden_pattern.rb#7 + def forbidden_pattern?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/forbidden_pattern.rb#11 + def forbidden_patterns; end +end + # A scaffold for concrete forces. # # source://rubocop//lib/rubocop/cop/force.rb#6 @@ -8011,70 +8103,73 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#85 def on_block(node); end + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#85 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#85 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#91 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#92 def style_parameter_name; end private - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#247 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#248 def add_space_before(corrector, loc, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#224 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#225 def alt_start_msg(start_loc, source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#146 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#147 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#97 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#98 def block_end_align_target(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#116 def check_block_alignment(start_node, block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#198 def compute_do_source_line_column(node, end_loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#239 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#240 def compute_start_col(ancestor_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#111 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#112 def disqualified_parent?(parent, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#107 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#108 def end_align_target?(node, parent); end # In offense message, we want to show the assignment LHS rather than # the entire assignment. # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#192 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#193 def find_lhs_node(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#163 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#164 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#234 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#235 def format_source_line_column(source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#216 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#217 def loc_to_source_line_column(loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#128 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#129 def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#251 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#252 def remove_space_before(corrector, end_pos, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#173 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#174 def start_for_block_node(block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#180 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#181 def start_for_line_node(block_node); end end @@ -8111,21 +8206,24 @@ class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 def on_block(node); end + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#66 + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#67 def last_heredoc_argument(node); end - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#62 + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#63 def message(node); end - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#76 + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#77 def offense_range(node); end - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#49 + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#50 def register_offense(node, offense_range); end end @@ -9825,6 +9923,9 @@ class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Bas # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#62 def on_class(node); end + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#71 def on_module(node); end @@ -9834,87 +9935,87 @@ class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Bas # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#76 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#87 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#88 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#115 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#116 def allowed_only_before_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#166 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#167 def block_start?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#172 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#173 def body_end?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#160 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#161 def class_def?(line); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#124 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#125 def correct_next_line_if_denied_style(corrector, node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#156 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#157 def empty_lines_around?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#104 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#105 def expected_empty_lines?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#225 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#226 def inside_block?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#182 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#183 def message(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#191 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#192 def message_for_around_style(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#201 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#202 def message_for_only_before_style(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#178 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#179 def next_empty_line_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#150 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#151 def next_line_empty?(last_send_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#229 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#230 def no_empty_lines_around_block_body?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#143 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#144 def previous_line_empty?(send_line); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#139 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#140 def previous_line_ignoring_comments(processed_source, send_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#219 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#220 def should_insert_line_after?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#211 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#212 def should_insert_line_before?(node); end end @@ -10182,6 +10283,9 @@ class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 def on_block(node); end + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 def on_numblock(node); end end @@ -12563,22 +12667,22 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 def on_block(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#138 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#139 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#147 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#96 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#105 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#122 def on_def(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#122 def on_defs(node); end # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#69 @@ -12587,13 +12691,16 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#64 def on_for(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#157 def on_if(node, base = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#96 def on_module(node); end # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 @@ -12605,78 +12712,78 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # 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#96 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#105 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#129 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#129 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#228 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#166 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#235 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#236 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#256 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#269 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#170 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#194 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#200 def check_members_for_normal_style(base, members); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#340 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#341 def check_rescue?(rescue_node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#376 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#377 def configured_indentation_width; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#207 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#208 def each_member(members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#231 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#232 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#324 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#220 def indented_internal_methods_style?; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#380 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#381 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#303 def message(configured_indentation_width, indentation, name); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#359 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#360 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#279 def offense(body_node, indentation, style); end # Returns true if the given node is within another node that has @@ -12684,25 +12791,25 @@ 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#314 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#182 def select_check_member(member); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#344 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#345 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#224 def special_modifier?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#367 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#368 def starts_with_access_modifier?(body_node); end end @@ -13312,100 +13419,106 @@ class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 def on_array(node); end # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 def on_block(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 def on_def(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#83 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#84 def on_dstr(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#104 def on_investigation_end; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#96 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#98 def on_new_investigation; end # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 def on_potential_breakable_node(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#79 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 def on_str(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#307 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#309 def allow_heredoc?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#315 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#317 def allow_string_split?; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#311 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#313 def allowed_heredoc; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#264 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#266 def allowed_line?(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#179 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#181 def breakable_block_range(block_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#366 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#368 def breakable_dstr?(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#228 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#230 def breakable_dstr_begin_position(node); end # Returns the value of attribute breakable_range. # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#110 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#112 def breakable_range; end # Sets the attribute breakable_range # # @param value the value to set the attribute breakable_range to. # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#110 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#112 def breakable_range=(_arg0); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#187 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#189 def breakable_range_after_semicolon(semicolon_token); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#233 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#235 def breakable_range_by_line_index; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#170 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#172 def breakable_string?(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#237 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#239 def breakable_string_delimiters; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#200 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#202 def breakable_string_position(node); end # Locate where to break a string that is too long, ensuring that escape characters @@ -13413,72 +13526,72 @@ class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base # If the string contains spaces, use them to determine a place for a clean break; # otherwise, the string will be broken at the line length limit. # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#212 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#214 def breakable_string_range(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#342 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#344 def check_directive_line(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#133 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#135 def check_for_breakable_block(block_node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#155 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#157 def check_for_breakable_dstr(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#112 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#114 def check_for_breakable_node(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#125 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#127 def check_for_breakable_semicolons(processed_source); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#143 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#145 def check_for_breakable_str(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#252 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#254 def check_line(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#359 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#361 def check_uri_line(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#292 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#294 def excess_range(uri_range, line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#319 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#321 def extract_heredocs(ast); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#241 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#243 def heredocs; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#245 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#247 def highlight_start(line); end # Find the largest possible substring of a string node to retain before a break # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#380 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#384 def largest_possible_string(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#338 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#340 def line_in_heredoc?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#329 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#331 def line_in_permitted_heredoc?(line_number); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#303 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#305 def max; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#274 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#276 def register_offense(loc, line, line_index, length: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#270 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#272 def shebang?(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#371 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#373 def string_delimiter(node); end end @@ -13785,45 +13898,48 @@ class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 def on_block(node); end + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#98 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#99 def add_offense_for_expression(node, expr, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#75 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#76 def args_on_beginning_line?(node); end - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#105 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#106 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#120 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#121 def autocorrect_arguments(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#130 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#131 def autocorrect_body(corrector, node, block_body); end - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#142 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#143 def block_arg_string(node, args); end - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#90 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#91 def characters_needed_for_space_and_pipes(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#154 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#155 def include_trailing_comma?(args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#79 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#80 def line_break_necessary_in_args?(node); end - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#83 + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#84 def needed_length_for_args(node); end end @@ -14540,11 +14656,14 @@ class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop: # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#63 def on_def(node); end + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#63 + def on_defs(node); end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#71 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#72 def ignore_last_element?; end end @@ -14737,25 +14856,29 @@ RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil) # Checks whether certain expressions, e.g. method calls, that could fit # completely on a single line, are broken up into multiple lines unnecessarily. # -# @example any configuration +# @example # # bad # foo( # a, # b # ) # +# # good +# foo(a, b) +# +# # bad # puts 'string that fits on ' \ # 'a single line' # +# # good +# puts 'string that fits on a single line' +# +# # bad # things # .select { |thing| thing.cond? } # .join('-') # # # good -# foo(a, b) -# -# puts 'string that fits on a single line' -# # things.select { |thing| thing.cond? }.join('-') # @example InspectBlocks: false (default) # # good @@ -14771,71 +14894,71 @@ RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil) # # good # foo(a) { |x| puts x } # -# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#45 +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#49 class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::CheckAssignment include ::RuboCop::Cop::CheckSingleLineSuitability extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#56 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#60 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#52 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#56 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#56 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#60 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#74 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#78 def check_assignment(node, _rhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#104 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#108 def configured_to_not_be_inspected?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#121 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#125 def convertible_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#70 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#74 def end_with_percent_blank_string?(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#98 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#102 def index_access_call_chained?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#87 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#91 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#111 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#115 def other_cop_takes_precedence?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#80 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#84 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#94 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#98 def require_backslash?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#117 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#121 def single_line_block_chain_enabled?; end end -# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#50 +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#54 RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks whether the rescue and ensure keywords are aligned @@ -15707,7 +15830,7 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#276 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#279 def force_equal_sign_alignment?; end # @return [Boolean] @@ -15735,17 +15858,17 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#280 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#283 def should_not_have_surrounding_space?(operator, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#266 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#269 def space_around_exponent_operator?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#270 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#273 def space_around_slash_operator?(right_operand); end class << self @@ -15805,43 +15928,46 @@ class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 def on_block(node); end + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#133 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#134 def autocorrect(corrector, range); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#153 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#154 def block_delimiters_style; end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#83 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#84 def check_empty(left_brace, space_plus_brace, used_style); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#109 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#110 def check_non_empty(left_brace, space_plus_brace, used_style); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#149 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#150 def conflict_with_block_delimiters?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#157 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#158 def empty_braces?(loc); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#101 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#102 def handle_different_styles_for_empty_braces(used_style); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#124 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#125 def space_detected(left_brace, space_plus_brace); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#118 def space_missing(left_brace); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#140 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#141 def style_for_empty_braces; end class << self @@ -16334,63 +16460,66 @@ class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#89 def on_block(node); end + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#89 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#89 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#126 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#127 def adjacent_braces(left_brace, right_brace); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#165 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#166 def aligned_braces?(inner, right_brace, column); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#134 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#135 def braces_with_contents_inside(node, inner); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#109 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#110 def check_inside(node, left_brace, right_brace); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#141 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#142 def check_left_brace(inner, left_brace, args_delimiter); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#149 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#150 def check_right_brace(node, inner, left_brace, right_brace, single_line); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#169 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#170 def inner_last_space_count(inner); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#161 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#162 def multiline_block?(left_brace, right_brace); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#226 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#227 def no_space(begin_pos, end_pos, msg); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#173 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#174 def no_space_inside_left_brace(left_brace, args_delimiter); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#242 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#243 def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#205 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#206 def pipe?(args_delimiter); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#234 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#235 def space(begin_pos, end_pos, msg); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#190 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#191 def space_inside_left_brace(left_brace, args_delimiter); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#209 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#210 def space_inside_right_brace(inner, right_brace, column); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#257 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#258 def style_for_empty_braces; end class << self @@ -22657,61 +22786,80 @@ end # 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 -# raising `Exception` class. +# Checks for `raise` or `fail` statements which raise `Exception` or +# `Exception.new`. Use `StandardError` or a specific exception class instead. # -# You can specify a module name that will be an implicit namespace -# using `AllowedImplicitNamespaces` option. The cop cause a false positive -# for namespaced `Exception` when a namespace is omitted. This option can -# prevent the false positive by specifying a namespace to be omitted for -# `Exception`. Alternatively, make `Exception` a fully qualified class -# name with an explicit namespace. +# If you have defined your own namespaced `Exception` class, it is possible +# to configure the cop to allow it by setting `AllowedImplicitNamespaces` to +# an array with the names of the namespaces to allow. By default, this is set to +# `['Gem']`, which allows `Gem::Exception` to be raised without an explicit namespace. +# If not allowed, a false positive may be registered if `raise Exception` is called +# within the namespace. +# +# Alternatively, use a fully qualified name with `raise`/`fail` +# (eg. `raise Namespace::Exception`). # # @example # # bad # raise Exception, 'Error message here' +# raise Exception.new('Error message here') # # # good # raise StandardError, 'Error message here' -# @example AllowedImplicitNamespaces: ['Gem'] -# # good -# module Gem +# raise MyError.new, 'Error message here' +# @example AllowedImplicitNamespaces: ['Gem'] (default) +# # bad - `Foo` is not an allowed implicit namespace +# module Foo # def self.foo -# raise Exception # This exception means `Gem::Exception`. +# raise Exception # This is qualified to `Foo::Exception`. # end # end # -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#34 +# # good +# module Gem +# def self.foo +# raise Exception # This is qualified to `Gem::Exception`. +# end +# end +# +# # good +# module Foo +# def self.foo +# raise Foo::Exception +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#53 class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#41 + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#60 def exception?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#46 + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#65 def exception_new_with_message?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#51 + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#70 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#85 + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#104 def allow_implicit_namespaces; end - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#57 + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#76 def check(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#73 + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#92 def implicit_namespace?(node); end end -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#37 +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#56 RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#38 +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#57 RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for `rand(1)` calls. @@ -23689,18 +23837,21 @@ class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 def on_block(node); end + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#60 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#61 def redundant_with_index?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#70 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#73 def message(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#81 def with_index_range(send); end end @@ -23741,18 +23892,21 @@ class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 def on_block(node); end + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#56 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#57 def redundant_with_object?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#65 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#68 def message(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#73 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#76 def with_object_range(send); end end @@ -24726,25 +24880,32 @@ class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base # 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#89 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 + def ractor_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#96 def find_conditional_node_from_ascendant(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#96 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#103 def node_or_its_ascendant_conditional?(node); end - # 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#65 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#72 def same_conditions_node_different_branch?(variable, outer_local_variable); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#79 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#86 def variable_node(variable); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#68 + def variable_used_in_declaration_of_outer?(variable, outer_local_variable); end + class << self # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 def joining_forces; end @@ -25542,6 +25703,9 @@ class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 def on_block(node); end + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 def on_numblock(node); end @@ -25549,21 +25713,21 @@ class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#63 + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#64 def acceptable?(node); end - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#75 + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#76 def arg_count(node); end - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#71 + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#72 def expected_arity(method); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#67 + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#68 def included_method?(name); end - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#59 + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#60 def methods; end end @@ -25771,19 +25935,22 @@ class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#47 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#48 def after_block(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#70 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#71 def flow_command?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#51 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#52 def on_begin(node); end # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#41 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#51 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#41 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#52 def on_kwbegin(node); end # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#41 @@ -25791,33 +25958,33 @@ class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#104 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#105 def check_case(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#98 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#99 def check_if(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#80 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#81 def flow_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#119 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#120 def instance_eval_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#65 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#66 def redefinable_flow_method?(method); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#114 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#115 def register_redefinition(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#123 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#124 def report_on_flow_command?(node); end end @@ -25908,7 +26075,7 @@ RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#143 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#142 def break_command?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#100 @@ -25917,7 +26084,10 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 def on_for(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#104 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#100 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#100 def on_numblock(node); end # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 @@ -25936,16 +26106,16 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#153 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#152 def break_statement?(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#119 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#118 def check(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#176 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#175 def check_case(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#170 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#169 def check_if(node); end # @return [Boolean] @@ -25955,15 +26125,15 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#110 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#109 def loop_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#190 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#189 def preceded_by_continue_statement?(break_statement); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#130 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#129 def statements(node); end end @@ -26417,10 +26587,10 @@ class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#166 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#167 def class_or_instance_eval?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#161 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#162 def dynamic_method_definition?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 @@ -26429,6 +26599,9 @@ class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 def on_class(node); end + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 def on_module(node); end @@ -26438,62 +26611,62 @@ class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#156 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#157 def static_method_definition?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#182 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#183 def access_modifier?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#280 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#281 def any_context_creating_methods?(child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#257 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#258 def any_method_definition?(child); end - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#149 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#150 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#196 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#197 def check_child_nodes(node, unused, cur_vis); end - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#226 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#227 def check_new_visibility(node, unused, new_vis, cur_vis); end - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#170 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#171 def check_node(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#186 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#187 def check_scope(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#215 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#216 def check_send_node(node, cur_vis, unused); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#274 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#275 def eval_call?(child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#247 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#248 def included_block?(block_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#251 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#252 def method_definition?(child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#270 + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#271 def start_of_new_scope?(child); end end @@ -27227,16 +27400,19 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/void.rb#90 + # source://rubocop//lib/rubocop/cop/lint/void.rb#91 def on_begin(node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#95 + # source://rubocop//lib/rubocop/cop/lint/void.rb#96 def on_ensure(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#90 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#91 def on_kwbegin(node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#81 @@ -27246,58 +27422,58 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#261 + # source://rubocop//lib/rubocop/cop/lint/void.rb#262 def all_keys_entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#265 + # source://rubocop//lib/rubocop/cop/lint/void.rb#266 def all_values_entirely_literal?(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#239 + # source://rubocop//lib/rubocop/cop/lint/void.rb#240 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#233 + # source://rubocop//lib/rubocop/cop/lint/void.rb#234 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#220 + # source://rubocop//lib/rubocop/cop/lint/void.rb#221 def autocorrect_void_op(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#101 + # source://rubocop//lib/rubocop/cop/lint/void.rb#102 def check_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#205 + # source://rubocop//lib/rubocop/cop/lint/void.rb#206 def check_ensure(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#115 + # source://rubocop//lib/rubocop/cop/lint/void.rb#116 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#163 + # source://rubocop//lib/rubocop/cop/lint/void.rb#164 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#187 + # source://rubocop//lib/rubocop/cop/lint/void.rb#188 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#171 + # source://rubocop//lib/rubocop/cop/lint/void.rb#172 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#145 + # source://rubocop//lib/rubocop/cop/lint/void.rb#146 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#179 + # source://rubocop//lib/rubocop/cop/lint/void.rb#180 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#129 + # source://rubocop//lib/rubocop/cop/lint/void.rb#130 def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#248 + # source://rubocop//lib/rubocop/cop/lint/void.rb#249 def entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#213 + # source://rubocop//lib/rubocop/cop/lint/void.rb#214 def in_void_context?(node); end end @@ -27484,7 +27660,7 @@ module RuboCop::Cop::MethodComplexity extend ::RuboCop::AST::NodePattern::Macros extend ::RuboCop::ExcludeLimit - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#37 + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#38 def define_method?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 @@ -27505,6 +27681,11 @@ module RuboCop::Cop::MethodComplexity # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 def on_defs(node); end + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 + def on_itblock(node); end + # @api private # # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 @@ -27514,17 +27695,17 @@ module RuboCop::Cop::MethodComplexity # @api private # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#42 + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#43 def check_complexity(node, method_name); end # @api private # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#61 + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#62 def complexity(body); end # @api private # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#73 + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#74 def location(node); end end @@ -27644,17 +27825,20 @@ class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_block(node); end + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 + def on_itblock(node); end + # 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#81 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#82 def cop_label; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#63 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#64 def method_receiver_excluded?(node); end end @@ -27946,6 +28130,9 @@ class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_defs(node); end + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_numblock(node); end @@ -27953,10 +28140,10 @@ class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#73 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#74 def allowed?(method_name); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#69 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#70 def cop_label; end end @@ -30005,15 +30192,32 @@ RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let( # Makes sure that all methods use the configured style, # snake_case or camelCase, for their names. # -# This cop has `AllowedPatterns` configuration option. -# -# Naming/MethodName: -# AllowedPatterns: -# - '\AonSelectionBulkChange\z' -# - '\AonSelectionCleared\z' -# # Method names matching patterns are always allowed. # +# The cop can be configured with `AllowedPatterns` to allow certain regexp patterns: +# +# [source,yaml] +# ---- +# Naming/MethodName: +# AllowedPatterns: +# - '\AonSelectionBulkChange\z' +# - '\AonSelectionCleared\z' +# ---- +# +# As well, you can also forbid specific method names or regexp patterns +# using `ForbiddenIdentifiers` or `ForbiddenPatterns`: +# +# [source,yaml] +# ---- +# Naming/MethodName: +# ForbiddenIdentifiers: +# - 'def' +# - 'super' +# ForbiddenPatterns: +# - '_v1\z' +# - '_gen1\z' +# ---- +# # @example EnforcedStyle: snake_case (default) # # bad # def fooBar; end @@ -30026,45 +30230,66 @@ RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let( # # # good # def fooBar; end +# @example ForbiddenIdentifiers: ['def', 'super'] +# # bad +# def def; end +# def super; end +# @example ForbiddenPatterns: ['_v1\z', '_gen1\z'] +# # bad +# def release_v1; end +# def api_gen1; end # -# source://rubocop//lib/rubocop/cop/naming/method_name.rb#31 +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#59 class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::ConfigurableFormatting include ::RuboCop::Cop::ConfigurableNaming include ::RuboCop::Cop::AllowedPattern include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#90 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#90 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#44 + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#75 def on_send(node); end - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#42 + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#73 def str_name(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#39 + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#70 def sym_name(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#120 def attr_name(name_item); end - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#75 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#103 + def forbidden_name?(name); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#131 def message(style); end - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#68 + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#124 def range_position(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#107 + def register_forbidden_name(node); end end -# source://rubocop//lib/rubocop/cop/naming/method_name.rb#36 +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#66 RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#67 +RuboCop::Cop::Naming::MethodName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) + # Checks method parameter names for how descriptive they # are. It is highly configurable. # @@ -30412,79 +30637,70 @@ class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableFormatting include ::RuboCop::Cop::ConfigurableNaming include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_arg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_blockarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_cvasgn(node); end # Only forbidden names are checked for global variable assignment # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#86 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#88 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_kwarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_kwoptarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_kwrestarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_lvar(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_optarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 def on_restarg(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#60 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62 def valid_name?(node, name, given_style = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#99 - def forbidden_identifiers; end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#111 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#97 def forbidden_name?(name); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#103 - def forbidden_patterns; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#107 - def matches_forbidden_pattern?(name); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#95 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#101 def message(style); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#118 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#105 def register_forbidden_name(node); end end -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#57 +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#59 RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#58 +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#60 RuboCop::Cop::Naming::VariableName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) # Makes sure that all numbered variables use the @@ -31758,11 +31974,11 @@ class RuboCop::Cop::Registry # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/registry.rb#309 + # source://rubocop//lib/rubocop/cop/registry.rb#312 def registered?(badge); end # source://rubocop//lib/rubocop/cop/registry.rb#299 - def resolve_badge(given_badge, real_badge, source_path); end + def resolve_badge(given_badge, real_badge, source_path, warn: T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/registry.rb#295 def with(cops); end @@ -31782,7 +31998,7 @@ class RuboCop::Cop::Registry def qualified_cop?(name); end # source://rubocop//lib/rubocop/cop/registry.rb#26 - def qualified_cop_name(name, origin); end + def qualified_cop_name(name, origin, warn: T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/registry.rb#40 def reset!; end @@ -33550,7 +33766,8 @@ RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # In Ruby 3.1, `Array#intersect?` has been added. # # This cop identifies places where `(array1 & array2).any?` -# can be replaced by `array1.intersect?(array2)`. +# or `(array1.intersection(array2)).any?` can be replaced by +# `array1.intersect?(array2)`. # # The `array1.intersect?(array2)` method is faster than # `(array1 & array2).any?` and is more readable. @@ -33564,12 +33781,21 @@ RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # [1].intersect?([1,2]) { |x| false } # => true # ---- # +# NOTE: Although `Array#intersection` can take zero or multiple arguments, +# only cases where exactly one argument is provided can be replaced with +# `Array#intersect?` and are handled by this cop. +# # @example # # bad # (array1 & array2).any? # (array1 & array2).empty? # (array1 & array2).none? # +# # bad +# array1.intersection(array2).any? +# array1.intersection(array2).empty? +# array1.intersection(array2).none? +# # # good # array1.intersect?(array2) # !array1.intersect?(array2) @@ -33586,46 +33812,52 @@ RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # array1.intersect?(array2) # !array1.intersect?(array2) # -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#50 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#60 class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#66 - def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#70 + def bad_intersection_check?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#80 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#86 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#86 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#57 - def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end - private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#95 - def bad_intersection_check?(node); end + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#103 + def bad_intersection?(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#107 - def message(receiver, argument, method_name); end + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#117 + def message(receiver, argument, method_name, dot, existing); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#103 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#113 def straight?(method_name); end end -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#74 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#67 +RuboCop::Cop::Style::ArrayIntersect::ACTIVE_SUPPORT_PREDICATES = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#80 RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#83 RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#78 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#66 +RuboCop::Cop::Style::ArrayIntersect::PREDICATES = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#84 RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#82 RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) # Checks for uses of "*" as a substitute for _join_. @@ -34264,6 +34496,9 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#183 def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#200 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#200 def on_numblock(node); end @@ -34274,154 +34509,154 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#483 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#484 def array_or_range?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#214 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#215 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#487 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#488 def begin_required?(block_node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#242 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#243 def braces_for_chaining_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#429 def braces_for_chaining_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#254 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#255 def braces_required_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#405 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#406 def braces_required_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#409 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 def braces_required_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#438 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#439 def braces_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#442 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#443 def correction_would_break_code?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#330 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#331 def end_of_chain(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#452 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#453 def functional_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#449 def functional_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#348 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#349 def get_blocks(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#413 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 def line_count_based_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#224 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#225 def line_count_based_message(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#258 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#259 def message(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#306 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#307 def move_comment_before_block(corrector, comment, block_node, closing_brace); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#460 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#461 def procedural_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#456 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#457 def procedural_oneliners_may_have_braces?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#373 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#374 def proper_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#337 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#338 def remove_trailing_whitespace(corrector, range, comment); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#269 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#270 def replace_braces_with_do_end(corrector, loc); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#285 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#286 def replace_do_end_with_braces(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#386 def require_do_end?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#476 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#477 def return_value_of_scope?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#464 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#465 def return_value_used?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#417 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#418 def semantic_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#232 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#233 def semantic_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#493 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#494 def single_argument_operator_method?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#320 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#321 def source_range_before_comment(range, comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#392 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#393 def special_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#398 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#399 def special_method_proper_block_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#302 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#303 def whitespace_after?(range, length = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#298 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#299 def whitespace_before?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#343 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#344 def with_block?(node); end class << self @@ -35262,32 +35497,35 @@ class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#54 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55 def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#54 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#63 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#64 def check_method_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#72 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#73 def implicit_block?(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#80 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#81 def message(node); end # Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead # of a block. # - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#86 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#87 def methods_accepting_symbol; end end @@ -35473,9 +35711,12 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#84 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#85 def on_for(node); end + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 def on_numblock(node); end @@ -35483,23 +35724,23 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#96 def collection_looping_method?(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#113 def combine_with_left_sibling(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#119 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#120 def correct_end_of_block(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#100 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 def same_collection_looping_block?(node, sibling); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#108 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#109 def same_collection_looping_for?(node, sibling); end end @@ -39337,6 +39578,9 @@ class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/for.rb#53 def on_for(node); end + # source://rubocop//lib/rubocop/cop/style/for.rb#64 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/for.rb#64 def on_numblock(node); end @@ -39344,7 +39588,7 @@ class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/for.rb#83 + # source://rubocop//lib/rubocop/cop/style/for.rb#84 def suspect_enumerable?(node); end end @@ -39984,9 +40228,12 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#139 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#140 def on_if(node); end + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 def on_numblock(node); end @@ -39994,71 +40241,71 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#275 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#276 def accepted_form?(node, ending: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#285 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#286 def accepted_if?(node, ending); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#312 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#313 def allowed_consecutive_conditionals?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#266 def and_or_guard_clause?(guard_clause); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#296 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297 def assigned_lvar_used_in_if_branch?(node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#211 def autocorrect(corrector, node, condition, replacement, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#236 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#237 def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#159 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#160 def check_ending_body(body); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#170 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#171 def check_ending_if(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#180 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#181 def consecutive_conditionals?(parent, node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#258 def guard_clause_source(guard_clause); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#232 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#233 def heredoc?(argument); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#248 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#249 def range_of_branch_to_remove(node, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#189 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#308 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#309 def remove_whole_lines(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#270 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#271 def too_long_for_single_line?(node, example); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#279 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#280 def trivial?(node); end end @@ -40244,7 +40491,7 @@ 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#79 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#80 def check_unused_block_args(node, key, value); end # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#51 @@ -40262,65 +40509,68 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base # 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#100 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#101 def on_block_pass(node); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#65 + def on_itblock(node); end + # 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#183 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#184 def check_argument(variable); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#207 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#208 def correct_args(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#193 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#194 def correct_implicit(node, corrector, method_name); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#198 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#199 def correct_key_value_each(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#179 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#180 def format_message(method_name, current); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#108 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#109 def handleable?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#214 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#215 def kv_range(outer_node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#140 def message(prefer, method_name, unused_code); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#145 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#146 def register_each_args_offense(node, message, prefer, unused_range); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#116 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#117 def register_kv_offense(target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#152 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#153 def register_kv_with_block_pass_offense(node, target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#170 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#171 def root_receiver(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#127 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#128 def unused_block_arg_exist?(node, block_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#163 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#164 def use_array_converter_method_as_preceding?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#189 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#190 def used?(arg); end end @@ -40400,6 +40650,70 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base def semantically_subset_method?(node); end end +# Use `Hash#dig` instead of chaining potentially null `fetch` calls. +# +# When `fetch(identifier, nil)` calls are chained on a hash, the expectation +# is that each step in the chain returns either `nil` or another hash, +# and in both cases, these can be simplified with a single call to `dig` with +# multiple arguments. +# +# If the 2nd parameter is `{}` or `Hash.new`, an offense will also be registered, +# as long as the final call in the chain is a nil value. If a non-nil value is given, +# the chain will not be registered as an offense, as the default value cannot be safely +# given with `dig`. +# +# NOTE: See `Style/DigChain` for replacing chains of `dig` calls with +# a single method call. +# +# @example +# # bad +# hash.fetch('foo', nil)&.fetch('bar', nil) +# +# # bad +# # earlier members of the chain can return `{}` as long as the final `fetch` +# # has `nil` as a default value +# hash.fetch('foo', {}).fetch('bar', nil) +# +# # good +# hash.dig('foo', 'bar') +# +# # ok - not handled by the cop since the final `fetch` value is non-nil +# hash.fetch('foo', {}).fetch('bar', {}) +# +# source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#40 +class RuboCop::Cop::Style::HashFetchChain < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#51 + def diggable?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#55 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#55 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#85 + def inspect_chain(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#75 + def last_fetch_non_nil?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#98 + def replacement(arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#45 +RuboCop::Cop::Style::HashFetchChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#46 +RuboCop::Cop::Style::HashFetchChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for places where `case-when` represents a simple 1:1 # mapping and can be replaced with a hash lookup. # @@ -41050,32 +41364,32 @@ class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#149 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#146 def allow_if_modifier?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#145 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#142 def allow_if_modifier_in_else_branch?(else_branch); end # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#87 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#116 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#111 def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#108 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#102 def correct_to_elsif_from_modifier_form(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#134 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#131 def find_end_range(node); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#141 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#138 def if_condition_range(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#130 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#127 def then?(node); end end @@ -41691,6 +42005,9 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 def on_numblock(node); end @@ -41701,39 +42018,39 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#179 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#180 def camel_case_constant?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#121 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#122 def correct_inverse_block(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#112 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#113 def correct_inverse_method(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#128 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#129 def correct_inverse_selector(block, corrector); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#183 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#184 def dot_range(loc); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#162 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#163 def end_parentheses(node, method_call); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#150 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#151 def inverse_blocks; end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#145 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#146 def inverse_methods; end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#193 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#194 def message(method, inverse); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#154 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#155 def negated?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#159 def not_to_receiver(node, method_call); end # When comparing classes, `!(Integer < Numeric)` is not the same as @@ -41741,15 +42058,15 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#174 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#175 def possible_class_hierarchy_check?(lhs, rhs, method); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#187 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#188 def remove_end_parenthesis(corrector, node, method, method_call); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#166 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#167 def safe_navigation_incompatible?(node); end class << self @@ -41905,7 +42222,7 @@ class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#55 - def could_be_ip?(str); end + def potential_ip?(str); end # @return [Boolean] # @@ -41954,6 +42271,65 @@ end # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#25 RuboCop::Cop::Style::ItAssignment::MSG = T.let(T.unsafe(nil), String) +# Checks for blocks with one argument where `it` block parameter can be used. +# +# It provides three `EnforcedStyle` options: +# +# 1. `allow_named_parameter` (default) ... Detects only numbered block parameters. +# 2. `always` ... Always uses the `it` block parameter. +# 3. `disallow` ... Disallows the `it` block parameter. +# +# A single numbered parameter is detected when `allow_named_parameter` or `always`. +# +# @example EnforcedStyle: allow_named_parameter (default) +# # bad +# block { do_something(_1) } +# +# # good +# block { do_something(it) } +# block { |named_param| do_something(named_param) } +# @example EnforcedStyle: always +# # bad +# block { do_something(_1) } +# block { |named_param| do_something(named_param) } +# +# # good +# block { do_something(it) } +# @example EnforcedStyle: disallow +# # bad +# block { do_something(it) } +# +# # good +# block { do_something(_1) } +# block { |named_param| do_something(named_param) } +# +# source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#40 +class RuboCop::Cop::Style::ItBlockParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#50 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#80 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#67 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#92 + def find_block_variables(node, block_argument_name); end +end + +# source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#46 +RuboCop::Cop::Style::ItBlockParameter::MSG_AVOID_IT_BLOCK_PARAMETER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#45 +RuboCop::Cop::Style::ItBlockParameter::MSG_USE_IT_BLOCK_PARAMETER = T.let(T.unsafe(nil), String) + # When passing an existing hash as keyword arguments, provide additional arguments # directly rather than using `merge`. # @@ -42089,29 +42465,32 @@ class RuboCop::Cop::Style::Lambda < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 def on_block(node); end + # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/style/lambda.rb#115 + # source://rubocop//lib/rubocop/cop/style/lambda.rb#116 def arguments_with_whitespace(node); end - # source://rubocop//lib/rubocop/cop/style/lambda.rb#104 + # source://rubocop//lib/rubocop/cop/style/lambda.rb#105 def autocorrect_method_to_literal(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/lambda.rb#119 + # source://rubocop//lib/rubocop/cop/style/lambda.rb#120 def lambda_arg_string(args); end - # source://rubocop//lib/rubocop/cop/style/lambda.rb#89 + # source://rubocop//lib/rubocop/cop/style/lambda.rb#90 def message(node, selector); end - # source://rubocop//lib/rubocop/cop/style/lambda.rb#95 + # source://rubocop//lib/rubocop/cop/style/lambda.rb#96 def message_line_modifier(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda.rb#83 + # source://rubocop//lib/rubocop/cop/style/lambda.rb#84 def offending_selector?(node, selector); end end @@ -42454,10 +42833,10 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 def directives; end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def loc(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.38.1/lib/rubocop/ast/utilities/simple_forwardable.rb#19 + # source://rubocop-ast/1.43.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 def text(*_arg0, **_arg1, &_arg2); end # A magic comment can contain one value (normal style) or @@ -42648,6 +43027,9 @@ class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#113 def on_block(node); end + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#113 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#113 def on_numblock(node); end @@ -42656,43 +43038,43 @@ class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#213 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#214 def correct_push_node(corrector, push_node); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#221 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#222 def correct_return_value_handling(corrector, block, dest_var); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#156 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#157 def dest_used_only_for_mapping?(block, dest_var, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#150 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#151 def find_closest_assignment(block, dest_var); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#134 def find_dest_var(block); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#181 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#182 def new_method_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#141 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#142 def offending_empty_array_tap?(node, dest_var); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#164 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#165 def register_offense(block, dest_var, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#200 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#201 def remove_assignment(corrector, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#207 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#208 def remove_tap(corrector, node, block_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#187 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#188 def return_value_used?(node); end class << self @@ -43364,13 +43746,16 @@ class RuboCop::Cop::Style::MethodCalledOnDoEndBlock < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#41 def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#41 def on_send(node); end end @@ -44121,6 +44506,9 @@ class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 def on_block(node); end + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 def on_numblock(node); end end @@ -45270,117 +45658,159 @@ RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) # next unless a == 1 # puts a # end +# @example AllowConsecutiveConditionals: false (default) +# # bad +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# if a == 2 +# puts a +# end +# end # -# source://rubocop//lib/rubocop/cop/style/next.rb#49 +# # good +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# next unless a == 2 +# puts a +# end +# @example AllowConsecutiveConditionals: true +# # good +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# if a == 2 +# puts a +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/next.rb#81 class RuboCop::Cop::Style::Next < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::MinBodyLength include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/next.rb#68 + # source://rubocop//lib/rubocop/cop/style/next.rb#100 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#76 + # source://rubocop//lib/rubocop/cop/style/next.rb#109 def on_for(node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#62 + # source://rubocop//lib/rubocop/cop/style/next.rb#100 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#94 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/style/next.rb#68 + # source://rubocop//lib/rubocop/cop/style/next.rb#100 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#76 + # source://rubocop//lib/rubocop/cop/style/next.rb#109 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#76 + # source://rubocop//lib/rubocop/cop/style/next.rb#109 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/style/next.rb#213 + # source://rubocop//lib/rubocop/cop/style/next.rb#249 def actual_indent(lines, buffer); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/next.rb#112 + # source://rubocop//lib/rubocop/cop/style/next.rb#271 + def allowed_consecutive_conditionals?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#148 def allowed_modifier_if?(node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#155 + # source://rubocop//lib/rubocop/cop/style/next.rb#191 def autocorrect_block(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#145 + # source://rubocop//lib/rubocop/cop/style/next.rb#181 def autocorrect_modifier(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#84 + # source://rubocop//lib/rubocop/cop/style/next.rb#117 def check(node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#170 + # source://rubocop//lib/rubocop/cop/style/next.rb#206 def cond_range(node, cond); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/next.rb#189 + # source://rubocop//lib/rubocop/cop/style/next.rb#267 + def consecutive_conditionals?(if_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#225 def end_followed_by_whitespace_only?(source_buffer, end_pos); end - # source://rubocop//lib/rubocop/cop/style/next.rb#180 + # source://rubocop//lib/rubocop/cop/style/next.rb#216 def end_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/next.rb#98 + # source://rubocop//lib/rubocop/cop/style/next.rb#134 def ends_with_condition?(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/next.rb#128 + # source://rubocop//lib/rubocop/cop/style/next.rb#164 def exit_body_type?(node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#217 + # source://rubocop//lib/rubocop/cop/style/next.rb#253 def heredoc_lines(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/next.rb#120 + # source://rubocop//lib/rubocop/cop/style/next.rb#156 def if_else_children?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/next.rb#124 + # source://rubocop//lib/rubocop/cop/style/next.rb#160 def if_without_else?(node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#140 + # source://rubocop//lib/rubocop/cop/style/next.rb#176 def offense_location(offense_node); end - # source://rubocop//lib/rubocop/cop/style/next.rb#134 + # source://rubocop//lib/rubocop/cop/style/next.rb#170 def offense_node(body); end # Adjust indentation of `lines` to match `node` # - # source://rubocop//lib/rubocop/cop/style/next.rb#204 + # source://rubocop//lib/rubocop/cop/style/next.rb#240 def reindent(lines, node, corrector); end - # source://rubocop//lib/rubocop/cop/style/next.rb#224 + # source://rubocop//lib/rubocop/cop/style/next.rb#260 def reindent_line(corrector, lineno, delta, buffer); end - # source://rubocop//lib/rubocop/cop/style/next.rb#193 + # source://rubocop//lib/rubocop/cop/style/next.rb#229 def reindentable_lines(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/next.rb#104 + # source://rubocop//lib/rubocop/cop/style/next.rb#140 def simple_if_without_break?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/next.rb#58 + # source://rubocop//lib/rubocop/cop/style/next.rb#90 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/next.rb#56 +# source://rubocop//lib/rubocop/cop/style/next.rb#88 RuboCop::Cop::Style::Next::EXIT_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/next.rb#55 +# source://rubocop//lib/rubocop/cop/style/next.rb#87 RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) # Checks for comparison of something with nil using `==` and @@ -46067,26 +46497,29 @@ class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/object_then.rb#35 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/object_then.rb#42 + # source://rubocop//lib/rubocop/cop/style/object_then.rb#43 def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/object_then.rb#35 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/object_then.rb#35 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/object_then.rb#42 + # source://rubocop//lib/rubocop/cop/style/object_then.rb#43 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/object_then.rb#51 + # source://rubocop//lib/rubocop/cop/style/object_then.rb#52 def check_method_node(node); end - # source://rubocop//lib/rubocop/cop/style/object_then.rb#69 + # source://rubocop//lib/rubocop/cop/style/object_then.rb#70 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/object_then.rb#65 + # source://rubocop//lib/rubocop/cop/style/object_then.rb#66 def preferred_method?(node); end end @@ -47068,6 +47501,9 @@ class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/proc.rb#24 def on_block(node); end + # source://rubocop//lib/rubocop/cop/style/proc.rb#24 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/proc.rb#24 def on_numblock(node); end @@ -47594,7 +48030,10 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#80 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#99 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#100 def on_kwbegin(node); end # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 @@ -47604,58 +48043,58 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#107 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#108 def allowable_kwbegin?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#182 def begin_block_has_multiline_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#174 def condition_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#185 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#186 def contain_rescue_or_ensure?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#166 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#167 def correct_modifier_form_after_multiline_begin_block(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#178 def empty_begin?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#114 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#115 def register_offense(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#143 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#144 def remove_begin(corrector, offense_range, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#131 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#132 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#153 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#154 def restore_removed_comments(corrector, offense_range, node, first_child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#160 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#161 def use_modifier_form_after_multiline_begin_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#198 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#199 def valid_begin_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#191 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#192 def valid_context_using_only_begin?(node); end class << self @@ -48459,8 +48898,8 @@ RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil # Checks for calls to `Kernel#format` or `Kernel#sprintf` that are redundant. # -# Calling `format` with only a single string argument is redundant, as it can be -# replaced by the string itself. +# Calling `format` with only a single string or constant argument is redundant, +# as it can be replaced by the string or constant itself. # # Also looks for `format` calls where the arguments are literals that can be # inlined into a string easily. This applies to the `%s`, `%d`, `%i`, `%u`, and @@ -48476,105 +48915,112 @@ RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil # 'the quick brown fox jumps over the lazy dog.' # # # bad +# format(MESSAGE) +# sprintf(MESSAGE) +# +# # good +# MESSAGE +# +# # bad # format('%s %s', 'foo', 'bar') # sprintf('%s %s', 'foo', 'bar') # # # good # 'foo bar' # -# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#47 +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#54 class RuboCop::Cop::Style::RedundantFormat < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#66 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#73 def complex_number?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#71 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#78 def find_hash_value_node(param0, param1); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#56 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#63 def format_without_additional_args?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#83 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#90 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#61 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#68 def rational_number?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#76 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#83 def splatted_arguments?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#132 def all_fields_literal?(string, arguments); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#212 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#219 def argument_value(argument); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#208 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#215 def argument_values(arguments); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#244 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#251 def complex_value(complex_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#102 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#109 def detect_unnecessary_fields(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#230 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#237 def dsym_value(dsym_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#143 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#150 def find_argument(sequence, arguments, hash); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#184 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#191 def float?(argument); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#234 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#241 def hash_value(hash_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#180 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#187 def integer?(argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#156 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#163 def matching_argument?(sequence, argument); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#105 def message(node, prefer); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#174 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#181 def numeric?(argument); end # Add correct quotes to the formatted string, preferring retaining the existing # quotes if possible. # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#190 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#197 def quote(string, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#240 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#247 def rational_value(rational_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#114 + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#121 def register_all_fields_literal(node, string, arguments); end end -# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#53 +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#60 RuboCop::Cop::Style::RedundantFormat::ACCEPTABLE_LITERAL_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#50 +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#57 RuboCop::Cop::Style::RedundantFormat::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#52 +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#59 RuboCop::Cop::Style::RedundantFormat::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # Check for uses of `Object#freeze` on immutable objects. @@ -49101,16 +49547,16 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#34 def allowed_pin_operator?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#275 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#276 def first_send_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#280 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#281 def first_super_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#285 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#286 def first_yield_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#178 def interpolation?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#28 @@ -49129,7 +49575,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#179 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#180 def allow_in_multiline_conditions?; end # @return [Boolean] @@ -49154,26 +49600,26 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#289 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#290 def call_chain_starts_with_int?(begin_node, send_node); end # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#133 def check(begin_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#183 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#184 def check_send(begin_node, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#193 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#194 def check_unary(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#218 def disallowed_literal?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#295 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#296 def do_end_block_in_method_chain?(begin_node, node); end # @return [Boolean] @@ -49191,7 +49637,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#264 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#265 def first_argument?(node); end # @return [Boolean] @@ -49201,12 +49647,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#213 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#214 def keyword_ancestor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#238 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#239 def keyword_with_redundant_parentheses?(node); end # @return [Boolean] @@ -49216,7 +49662,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#251 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#252 def method_call_with_redundant_parentheses?(node); end # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#125 @@ -49227,12 +49673,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#104 def multiline_control_flow_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#204 def offense(node, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#260 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#261 def only_begin_arg?(args); end # @return [Boolean] @@ -49242,12 +49688,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#227 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#228 def raised_to_power_negative_numeric?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#209 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#210 def suspect_unary?(node); end # @return [Boolean] @@ -49804,12 +50250,15 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#79 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#123 def on_if(node); end # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#100 def on_in_pattern(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#116 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#96 def on_lvasgn(node); end @@ -49830,32 +50279,32 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#104 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#123 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#123 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#189 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#190 def add_lhs_to_local_variables_scopes(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#197 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#198 def add_masgn_lhs_variables(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#203 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#204 def add_match_var_scopes(in_pattern_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#139 def add_scope(node, local_variables = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#183 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#184 def allow_self(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#145 def allowed_send_node?(node); end # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: @@ -49866,15 +50315,15 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#159 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#160 def it_method_in_block?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#175 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#176 def on_argument(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#167 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#168 def regular_method_call?(node); end class << self @@ -50148,27 +50597,36 @@ class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#25 + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#26 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#35 + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#46 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#36 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#48 + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#59 def redundant_sort_by_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#53 + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#69 + def redundant_sort_by_itblock(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#64 def redundant_sort_by_numblock(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#57 + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#73 def sort_by_range(send, node); end end # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#22 RuboCop::Cop::Style::RedundantSortBy::MSG_BLOCK = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#24 +RuboCop::Cop::Style::RedundantSortBy::MSG_ITBLOCK = T.let(T.unsafe(nil), String) + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#23 RuboCop::Cop::Style::RedundantSortBy::MSG_NUMBLOCK = T.let(T.unsafe(nil), String) @@ -51263,21 +51721,21 @@ 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#81 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#82 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#67 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#68 def creates_hash?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#76 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#77 def env_const?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#90 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#91 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#90 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#91 def on_send(node); end # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#58 @@ -51285,31 +51743,31 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#136 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#137 def extract_send_node(block_node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#149 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#151 def find_regexp(node, block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#160 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#163 def match_predicate_without_receiver?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#147 def opposite?(regexp_method_send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#110 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#111 def receiver_allowed?(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#124 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#125 def register_offense(node, block_node, regexp, replacement); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#116 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#117 def replacement(regexp_method_send_node, node); end end @@ -51900,17 +52358,20 @@ class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#40 def on_block(node); end + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#40 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#40 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#62 + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#63 def do_line(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#70 + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#72 def single_line_blocks_preferred?; end end @@ -52140,7 +52601,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#254 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#187 + def add_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#168 + def add_parentheses_if_needed(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#199 def allow_modifier?; end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 @@ -52149,35 +52618,26 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#98 def autocorrect(corrector, node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#110 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#106 def autocorrect_outer_condition_basic(corrector, node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#125 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#142 def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end - # 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#160 + def chainable_condition(node); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#181 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#131 + def correct_for_basic_condition_style(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#151 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#122 + def correct_for_guard_condition_style(corrector, node, if_branch); end - # 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#190 - def correct_outer_condition(corrector, condition); end - - # 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#216 - def insert_bang_for_and(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#117 + def correct_node(corrector, node); end # @return [Boolean] # @@ -52186,33 +52646,17 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#258 - def outer_condition_modify_form?(node, if_branch); end + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#182 + def parenthesize_method?(node); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#247 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#192 def parenthesized_method_arguments(node); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#237 - def replace_condition(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#228 - def require_parentheses?(condition); end - # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#74 def use_variable_assignment_in_condition?(condition, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#155 - def wrap_condition(corrector, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 - def wrap_condition?(node); end - class << self # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#55 def autocorrect_incompatible_with; end @@ -53412,13 +53856,16 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#191 def destructuring_block_argument?(argument_node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#171 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#171 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#171 def on_numblock(node); end # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 @@ -53434,54 +53881,54 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#274 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#276 def allow_comments?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#270 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#272 def allow_if_method_has_argument?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#206 def allowed_method_name?(name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#219 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#247 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#249 def autocorrect_lambda_block(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#238 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 def autocorrect_with_args(corrector, node, args, method_name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#227 def autocorrect_without_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#260 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#262 def begin_pos_for_replacement(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#255 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#257 def block_range_with_space(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#210 def register_offense(node, method_name, block_method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#202 def unsafe_array_usage?(node); end # See: https://github.com/rubocop/rubocop/issues/10864 # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#196 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#198 def unsafe_hash_usage?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#165 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#166 def autocorrect_incompatible_with; end end end @@ -53749,7 +54196,7 @@ RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), S # # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#47 class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#79 + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#80 def define_method_block?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 @@ -53761,6 +54208,9 @@ class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 def on_defs(node); end + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 + def on_itblock(node); end + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 def on_numblock(node); end @@ -53771,7 +54221,7 @@ class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#70 + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#71 def top_level_method_definition?(node); end end @@ -57209,101 +57659,96 @@ RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symb # # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#8 class RuboCop::Cop::VariableForce::Variable - extend ::RuboCop::AST::NodePattern::Macros - # @return [Variable] a new instance of Variable # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#17 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#15 def initialize(name, declaration_node, scope); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#110 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#105 def argument?; end - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#33 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#31 def assign(node); end # Returns the value of attribute assignments. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 def assignments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#118 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#113 def block_argument?; end - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#49 - def candidate_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#90 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#85 def capture_with_block!; end # Returns the value of attribute captured_by_block. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 def captured_by_block; end # Returns the value of attribute captured_by_block. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 def captured_by_block?; end # Returns the value of attribute declaration_node. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 def declaration_node; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#126 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#121 def explicit_block_local_variable?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#82 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#77 def in_modifier_conditional?(assignment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#122 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#117 def keyword_argument?; end - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#41 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#39 def mark_last_as_reassigned!(assignment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#114 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#109 def method_argument?; end # Returns the value of attribute name. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 def name; end - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#56 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#51 def reference!(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#51 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#46 def referenced?; end # Returns the value of attribute references. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 def references; end # Returns the value of attribute scope. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 def scope; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#106 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#101 def should_be_unused?; end # This is a convenient way to check whether the variable is used @@ -57317,11 +57762,11 @@ class RuboCop::Cop::VariableForce::Variable # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#102 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#97 def used?; end end -# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 +# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#9 RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -61023,7 +61468,7 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#513 + # source://rubocop//lib/rubocop/runner.rb#517 def standby_team(config); end # @return [Boolean] @@ -61621,17 +62066,17 @@ module RuboCop::Version class << self # @api private # - # source://rubocop//lib/rubocop/version.rb#114 + # source://rubocop//lib/rubocop/version.rb#121 def config_for_pwd(env); end # @api private # - # source://rubocop//lib/rubocop/version.rb#144 + # source://rubocop//lib/rubocop/version.rb#151 def document_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#67 + # source://rubocop//lib/rubocop/version.rb#74 def extension_versions(env); end # Returns feature version in one of two ways: @@ -61641,44 +62086,47 @@ module RuboCop::Version # # @api private # - # source://rubocop//lib/rubocop/version.rb#128 + # source://rubocop//lib/rubocop/version.rb#135 def feature_version(feature); end # @api private # - # source://rubocop//lib/rubocop/version.rb#51 - def parser_version; end + # source://rubocop//lib/rubocop/version.rb#57 + def parser_version(target_ruby_version); end # @api private # - # source://rubocop//lib/rubocop/version.rb#149 + # source://rubocop//lib/rubocop/version.rb#156 def server_mode; end # @api private # - # source://rubocop//lib/rubocop/version.rb#105 + # source://rubocop//lib/rubocop/version.rb#112 def target_ruby_version(env); end # @api private # - # source://rubocop//lib/rubocop/version.rb#46 + # source://rubocop//lib/rubocop/version.rb#52 def verbose(env: T.unsafe(nil)); end # NOTE: Marked as private but used by gems like standard. # # @api private # - # source://rubocop//lib/rubocop/version.rb#23 + # source://rubocop//lib/rubocop/version.rb#26 def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end end end -# source://rubocop//lib/rubocop/version.rb#13 +# source://rubocop//lib/rubocop/version.rb#15 RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/version.rb#17 +# source://rubocop//lib/rubocop/version.rb#19 RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) +# source://rubocop//lib/rubocop/version.rb#13 +RuboCop::Version::MINIMUM_PARSABLE_PRISM_VERSION = T.let(T.unsafe(nil), Float) + # source://rubocop//lib/rubocop/version.rb#8 RuboCop::Version::MSG = T.let(T.unsafe(nil), String)