From bc94cf3fedd9503939c78cd5c0273fe2a4354a30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:23:37 +0000 Subject: [PATCH] build(deps-dev): bump rubocop from 1.68.0 to 1.69.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.68.0 to 1.69.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.68.0...v1.69.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 18 +- .../gems/{json@2.7.6.rbi => json@2.8.2.rbi} | 538 +++- ...{parser@3.3.5.1.rbi => parser@3.3.6.0.rbi} | 0 ...rser@2.9.2.rbi => regexp_parser@2.9.3.rbi} | 70 +- ...-ast@1.34.0.rbi => rubocop-ast@1.36.2.rbi} | 679 +++-- ...{rubocop@1.68.0.rbi => rubocop@1.69.0.rbi} | 2610 ++++++++++------- .../rbi/gems/unicode-display_width@2.6.0.rbi | 66 - .../rbi/gems/unicode-display_width@3.1.2.rbi | 130 + sorbet/rbi/gems/unicode-emoji@4.0.4.rbi | 251 ++ 9 files changed, 2778 insertions(+), 1584 deletions(-) rename sorbet/rbi/gems/{json@2.7.6.rbi => json@2.8.2.rbi} (77%) rename sorbet/rbi/gems/{parser@3.3.5.1.rbi => parser@3.3.6.0.rbi} (100%) rename sorbet/rbi/gems/{regexp_parser@2.9.2.rbi => regexp_parser@2.9.3.rbi} (98%) rename sorbet/rbi/gems/{rubocop-ast@1.34.0.rbi => rubocop-ast@1.36.2.rbi} (92%) rename sorbet/rbi/gems/{rubocop@1.68.0.rbi => rubocop@1.69.0.rbi} (97%) delete mode 100644 sorbet/rbi/gems/unicode-display_width@2.6.0.rbi create mode 100644 sorbet/rbi/gems/unicode-display_width@3.1.2.rbi create mode 100644 sorbet/rbi/gems/unicode-emoji@4.0.4.rbi diff --git a/Gemfile.lock b/Gemfile.lock index afc6b84e..eec88ca8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -75,7 +75,7 @@ GEM i18n (1.14.6) concurrent-ruby (~> 1.0) jmespath (1.6.2) - json (2.7.6) + json (2.8.2) jwt (2.8.1) base64 language_server-protocol (3.17.0.3) @@ -104,7 +104,7 @@ GEM sawyer (~> 0.9) openssl (3.2.0) parallel (1.26.3) - parser (3.3.5.1) + parser (3.3.6.0) ast (~> 2.4.1) racc prism (1.2.0) @@ -119,7 +119,7 @@ GEM sorbet-runtime (>= 0.5.9204) rdoc (6.7.0) psych (>= 4.0.0) - regexp_parser (2.9.2) + regexp_parser (2.9.3) rexml (3.3.9) rspec (3.13.0) rspec-core (~> 3.13.0) @@ -134,17 +134,17 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) - rubocop (1.68.0) + rubocop (1.69.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.2, < 2.0) + rubocop-ast (>= 1.36.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.34.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.36.2) parser (>= 3.3.1.0) ruby-progressbar (1.13.0) rubyntlm (0.6.5) @@ -182,7 +182,9 @@ GEM thor (1.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.6.0) + unicode-display_width (3.1.2) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) uri (0.13.1) winrm (2.3.9) builder (>= 2.1.2) diff --git a/sorbet/rbi/gems/json@2.7.6.rbi b/sorbet/rbi/gems/json@2.8.2.rbi similarity index 77% rename from sorbet/rbi/gems/json@2.7.6.rbi rename to sorbet/rbi/gems/json@2.8.2.rbi index d2f9dadc..c3ee2e47 100644 --- a/sorbet/rbi/gems/json@2.7.6.rbi +++ b/sorbet/rbi/gems/json@2.8.2.rbi @@ -7,7 +7,7 @@ # Extends any Class to include _json_creatable?_ method. # -# source://json//lib/json/common.rb#726 +# source://json//lib/json/common.rb#868 class Class < ::Module # Returns true if this class can be used to create an instance # from a serialised JSON string. The class has to implement a class @@ -16,7 +16,7 @@ class Class < ::Module # # @return [Boolean] # - # source://json//lib/json/common.rb#731 + # source://json//lib/json/common.rb#873 def json_creatable?; end end @@ -396,13 +396,13 @@ end # json1 = JSON.generate(ruby) # ruby1 = JSON.parse(json1, create_additions: true) # # Make a nice display. -# display = <parse(source, opts); see #parse. # # Source for following examples: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON # # Load a \String: # ruby = JSON.load(source) @@ -824,7 +825,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#549 + # source://json//lib/json/common.rb#691 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -835,7 +836,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#257 + # source://json//lib/json/common.rb#234 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -846,10 +847,10 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#268 + # source://json//lib/json/common.rb#245 def load_file!(filespec, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#674 + # source://json//lib/json/common.rb#816 def merge_dump_options(opts, strict: T.unsafe(nil)); end # :call-seq: @@ -880,17 +881,17 @@ module JSON # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. # # Parses nested JSON objects: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON # ruby = JSON.parse(source) # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} # @@ -900,7 +901,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#218 + # source://json//lib/json/common.rb#204 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -915,7 +916,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#242 + # source://json//lib/json/common.rb#219 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -948,30 +949,161 @@ module JSON # } # } # - # source://json//lib/json/common.rb#382 + # source://json//lib/json/common.rb#358 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#382 + # source://json//lib/json/common.rb#358 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//lib/json/common.rb#575 + # source://json//lib/json/common.rb#717 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#549 + # source://json//lib/json/common.rb#691 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//lib/json/common.rb#308 + # source://json//lib/json/common.rb#285 def unparse(obj, opts = T.unsafe(nil)); end + # :call-seq: + # JSON.unsafe_load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.unsafe_load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.unsafe_load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.unsafe_load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.unsafe_load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.unsafe_load + # ruby = JSON.unsafe_load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#537 + def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + class << self # :call-seq: # JSON[object] -> new_array or new_string @@ -985,26 +1117,26 @@ module JSON # ruby = [0, 1, nil] # JSON[ruby] # => '[0,1,null]' # - # source://json//lib/json/common.rb#22 + # source://json//lib/json/common.rb#23 def [](object, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#90 + # source://json//lib/json/common.rb#80 def create_fast_state; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//lib/json/common.rb#129 + # source://json//lib/json/common.rb#115 def create_id; end # Sets create identifier, which is used to decide if the _json_create_ # hook of a class should be called; initial value is +json_class+: # JSON.create_id # => 'json_class' # - # source://json//lib/json/common.rb#123 + # source://json//lib/json/common.rb#109 def create_id=(new_value); end - # source://json//lib/json/common.rb#100 + # source://json//lib/json/common.rb#90 def create_pretty_state; end # Return the constant located at _path_. The format of _path_ has to be @@ -1012,7 +1144,7 @@ module JSON # level (absolute namespace path?). If there doesn't exist a constant at # the given path, an ArgumentError is raised. # - # source://json//lib/json/common.rb#51 + # source://json//lib/json/common.rb#50 def deep_const_get(path); end # :call-seq: @@ -1043,7 +1175,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#630 + # source://json//lib/json/common.rb#772 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # Sets or returns the default options for the JSON.dump method. @@ -1051,7 +1183,7 @@ module JSON # opts = JSON.dump_default_options # opts # => {:max_nesting=>false, :allow_nan=>true} # - # source://json//lib/json/common.rb#596 + # source://json//lib/json/common.rb#738 def dump_default_options; end # Sets or returns the default options for the JSON.dump method. @@ -1059,7 +1191,7 @@ module JSON # opts = JSON.dump_default_options # opts # => {:max_nesting=>false, :allow_nan=>true} # - # source://json//lib/json/common.rb#596 + # source://json//lib/json/common.rb#738 def dump_default_options=(_arg0); end # :call-seq: @@ -1076,13 +1208,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#337 + # source://json//lib/json/common.rb#313 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#337 + # source://json//lib/json/common.rb#313 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -1121,24 +1253,22 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#308 + # source://json//lib/json/common.rb#285 def generate(obj, opts = T.unsafe(nil)); end - # Returns the JSON generator module that is used by JSON. This is - # either JSON::Ext::Generator or JSON::Pure::Generator: - # JSON.generator # => JSON::Ext::Generator + # Returns the JSON generator module that is used by JSON. # - # source://json//lib/json/common.rb#112 + # source://json//lib/json/common.rb#100 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//lib/json/common.rb#67 + # source://json//lib/json/common.rb#57 def generator=(generator); end # Encodes string using String.encode. # - # source://json//lib/json/common.rb#670 + # source://json//lib/json/common.rb#812 def iconv(to, from, string); end # :call-seq: @@ -1163,6 +1293,7 @@ module JSON # BEWARE: This method is meant to serialise data from trusted user input, # like from your own database server or clients under your control, it could # be dangerous to allow untrusted users to pass JSON sources into it. + # If you must use it, use JSON.unsafe_load instead to make it clear. # - Argument +opts+, if given, contains a \Hash of options for the parsing. # See {Parsing Options}[#module-JSON-label-Parsing+Options]. # The default options can be changed via method JSON.load_default_options=. @@ -1173,17 +1304,17 @@ module JSON # parse(source, opts); see #parse. # # Source for following examples: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON # # Load a \String: # ruby = JSON.load(source) @@ -1269,7 +1400,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#549 + # source://json//lib/json/common.rb#691 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or returns default options for the JSON.load method. @@ -1277,7 +1408,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#412 + # source://json//lib/json/common.rb#402 def load_default_options; end # Sets or returns default options for the JSON.load method. @@ -1285,7 +1416,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#412 + # source://json//lib/json/common.rb#402 def load_default_options=(_arg0); end # :call-seq: @@ -1296,7 +1427,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#257 + # source://json//lib/json/common.rb#234 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1307,7 +1438,7 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#268 + # source://json//lib/json/common.rb#245 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1338,17 +1469,17 @@ module JSON # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. # # Parses nested JSON objects: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON # ruby = JSON.parse(source) # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} # @@ -1358,7 +1489,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#218 + # source://json//lib/json/common.rb#204 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1373,19 +1504,17 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#242 + # source://json//lib/json/common.rb#219 def parse!(source, opts = T.unsafe(nil)); end - # Returns the JSON parser class that is used by JSON. This is either - # JSON::Ext::Parser or JSON::Pure::Parser: - # JSON.parser # => JSON::Ext::Parser + # Returns the JSON parser class that is used by JSON. # - # source://json//lib/json/common.rb#38 + # source://json//lib/json/common.rb#37 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//lib/json/common.rb#41 + # source://json//lib/json/common.rb#40 def parser=(parser); end # :call-seq: @@ -1418,47 +1547,190 @@ module JSON # } # } # - # source://json//lib/json/common.rb#382 + # source://json//lib/json/common.rb#358 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#382 + # source://json//lib/json/common.rb#358 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//lib/json/common.rb#575 + # source://json//lib/json/common.rb#717 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#549 + # source://json//lib/json/common.rb#691 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - # Sets or Returns the JSON generator state class that is used by JSON. This is - # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: - # JSON.state # => JSON::Ext::Generator::State + # Sets or Returns the JSON generator state class that is used by JSON. # - # source://json//lib/json/common.rb#117 + # source://json//lib/json/common.rb#103 def state; end - # Sets or Returns the JSON generator state class that is used by JSON. This is - # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: - # JSON.state # => JSON::Ext::Generator::State + # Sets or Returns the JSON generator state class that is used by JSON. # - # source://json//lib/json/common.rb#117 + # source://json//lib/json/common.rb#103 def state=(_arg0); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//lib/json/common.rb#308 + # source://json//lib/json/common.rb#285 def unparse(obj, opts = T.unsafe(nil)); end + # :call-seq: + # JSON.unsafe_load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.unsafe_load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.unsafe_load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.unsafe_load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.unsafe_load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.unsafe_load + # ruby = JSON.unsafe_load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#537 + def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or returns default options for the JSON.unsafe_load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#388 + def unsafe_load_default_options; end + + # Sets or returns default options for the JSON.unsafe_load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#388 + def unsafe_load_default_options=(_arg0); end + private - # source://json//lib/json/common.rb#674 + # source://json//lib/json/common.rb#816 def merge_dump_options(opts, strict: T.unsafe(nil)); end end end @@ -1493,14 +1765,14 @@ class JSON::Ext::Generator::State # # Returns the value returned by method +name+. # - # source://json//lib/json/ext/generator/state.rb#113 + # source://json//lib/json/ext/generator/state.rb#83 def [](name); end # call-seq: []=(name, value) # # Sets the attribute name to value. # - # source://json//lib/json/ext/generator/state.rb#125 + # source://json//lib/json/ext/generator/state.rb#95 def []=(name, value); end # call-seq: configure(opts) @@ -1524,7 +1796,7 @@ class JSON::Ext::Generator::State # Returns the configuration instance variables as a hash, that can be # passed to the configure method. # - # source://json//lib/json/ext/generator/state.rb#84 + # source://json//lib/json/ext/generator/state.rb#54 def to_h; end # call-seq: to_h @@ -1532,7 +1804,7 @@ class JSON::Ext::Generator::State # Returns the configuration instance variables as a hash, that can be # passed to the configure method. # - # source://json//lib/json/ext/generator/state.rb#84 + # source://json//lib/json/ext/generator/state.rb#54 def to_hash; end end @@ -1579,29 +1851,29 @@ end # The base exception for JSON errors. # -# source://json//lib/json/common.rb#140 +# source://json//lib/json/common.rb#126 class JSON::JSONError < ::StandardError class << self - # source://json//lib/json/common.rb#141 + # source://json//lib/json/common.rb#127 def wrap(exception); end end end -# source://json//lib/json/common.rb#7 +# source://json//lib/json/common.rb#8 JSON::NOT_SET = T.let(T.unsafe(nil), Object) -# source://json//lib/json/common.rb#44 +# source://json//lib/json/common.rb#43 JSON::Parser = JSON::Ext::Parser -# source://json//lib/json/common.rb#82 +# source://json//lib/json/common.rb#72 JSON::State = JSON::Ext::Generator::State # For backwards compatibility # -# source://json//lib/json/common.rb#162 +# source://json//lib/json/common.rb#148 JSON::UnparserError = JSON::GeneratorError -# source://json//lib/json/common.rb#684 +# source://json//lib/json/common.rb#826 module Kernel private @@ -1612,18 +1884,18 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # source://json//lib/json/common.rb#711 + # source://json//lib/json/common.rb#853 def JSON(object, *args); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # source://json//lib/json/common.rb#689 + # source://json//lib/json/common.rb#831 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # source://json//lib/json/common.rb#698 + # source://json//lib/json/common.rb#840 def jj(*objs); end end diff --git a/sorbet/rbi/gems/parser@3.3.5.1.rbi b/sorbet/rbi/gems/parser@3.3.6.0.rbi similarity index 100% rename from sorbet/rbi/gems/parser@3.3.5.1.rbi rename to sorbet/rbi/gems/parser@3.3.6.0.rbi diff --git a/sorbet/rbi/gems/regexp_parser@2.9.2.rbi b/sorbet/rbi/gems/regexp_parser@2.9.3.rbi similarity index 98% rename from sorbet/rbi/gems/regexp_parser@2.9.2.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.3.rbi index 584c4553..2cfd03e5 100644 --- a/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.9.3.rbi @@ -2607,17 +2607,17 @@ Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) class Regexp::Scanner # Emits an array with the details of the scanned pattern # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2406 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2363 def emit(type, token, text); end # only public for #||= to work on ruby <= 2.5 # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 def literal_run; end # only public for #||= to work on ruby <= 2.5 # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 def literal_run=(_arg0); end # @raise [PrematureEndError] @@ -2630,168 +2630,168 @@ class Regexp::Scanner # Appends one or more characters to the literal buffer, to be emitted later # by a call to emit_literal. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2468 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2425 def append_literal(data, ts, te); end # Returns the value of attribute block. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def block; end # Sets the attribute block # # @param value the value to set the attribute block to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def block=(_arg0); end # Returns the value of attribute char_pos. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def char_pos; end # Sets the attribute char_pos # # @param value the value to set the attribute char_pos to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def char_pos=(_arg0); end # Returns the value of attribute collect_tokens. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def collect_tokens; end # Sets the attribute collect_tokens # # @param value the value to set the attribute collect_tokens to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def collect_tokens=(_arg0); end # Returns the value of attribute conditional_stack. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def conditional_stack; end # Sets the attribute conditional_stack # # @param value the value to set the attribute conditional_stack to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def conditional_stack=(_arg0); end # Copy from ts to te from data as text # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2462 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2419 def copy(data, ts, te); end # Emits the literal run collected by calls to the append_literal method. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2473 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2430 def emit_literal; end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2508 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2465 def emit_meta_control_sequence(data, ts, te, token); end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2479 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2436 def emit_options(text); end # Returns the value of attribute free_spacing. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def free_spacing; end # Sets the attribute free_spacing # # @param value the value to set the attribute free_spacing to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def free_spacing=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2441 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2398 def free_spacing?(input_object, options); end # Returns the value of attribute group_depth. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def group_depth; end # Sets the attribute group_depth # # @param value the value to set the attribute group_depth to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def group_depth=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2453 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2410 def in_group?; end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2457 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2414 def in_set?; end # Returns the value of attribute prev_token. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def prev_token; end # Sets the attribute prev_token # # @param value the value to set the attribute prev_token to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def prev_token=(_arg0); end # Returns the value of attribute set_depth. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def set_depth; end # Sets the attribute set_depth # # @param value the value to set the attribute set_depth to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def set_depth=(_arg0); end # Returns the value of attribute spacing_stack. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def spacing_stack; end # Sets the attribute spacing_stack # # @param value the value to set the attribute spacing_stack to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def spacing_stack=(_arg0); end # Returns the value of attribute tokens. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def tokens; end # Sets the attribute tokens # # @param value the value to set the attribute tokens to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def tokens=(_arg0); end class << self - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2349 def long_prop_map; end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2396 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2353 def parse_prop_map(name); end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2400 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2357 def posix_classes; end # Scans the given regular expression text, or Regexp object and collects the @@ -2806,7 +2806,7 @@ class Regexp::Scanner # lazy-load property maps when first needed # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2345 def short_prop_map; end end end diff --git a/sorbet/rbi/gems/rubocop-ast@1.34.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.36.2.rbi similarity index 92% rename from sorbet/rbi/gems/rubocop-ast@1.34.0.rbi rename to sorbet/rbi/gems/rubocop-ast@1.36.2.rbi index 5f8fa4e4..b3edfb71 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.34.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.36.2.rbi @@ -457,18 +457,18 @@ class RuboCop::AST::Builder < ::Parser::Builders::Default # # @return [Node] the generated node # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#105 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#106 def n(type, children, source_map); end # TODO: Figure out what to do about literal encoding handling... # More details here https://github.com/whitequark/parser/issues/283 # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#111 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#112 def string_value(token); end private - # source://rubocop-ast//lib/rubocop/ast/builder.rb#117 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#118 def node_klass(type); end end @@ -1337,17 +1337,32 @@ end class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node # Returns the body of the `ensure` clause. # + # @deprecated Use `EnsureNode#branch` # @return [Node, nil] The body of the `ensure`. # - # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#12 + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#13 def body; end + # Returns an the ensure branch in the exception handling statement. + # + # @return [Node, nil] the body of the ensure branch. + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#20 + def branch; end + + # Returns the `rescue` node of the `ensure`, if present. + # + # @return [Node, nil] The `rescue` node. + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#27 + def rescue_node; end + # Checks whether this node body is a void context. # Always `true` for `ensure`. # # @return [true] whether the `ensure` node body is a void context # - # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#20 + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#35 def void_context?; end end @@ -1950,6 +1965,35 @@ class RuboCop::AST::IntNode < ::RuboCop::AST::Node include ::RuboCop::AST::NumericNode end +# A node extension for `kwbegin` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `kwbegin` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#8 +class RuboCop::AST::KeywordBeginNode < ::RuboCop::AST::Node + # Returns the body of the `kwbegin` block. Returns `self` if the `kwbegin` contains + # multiple nodes. + # + # @return [Node, nil] The body of the `kwbegin`. + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#13 + def body; end + + # Returns the `rescue` node of the `kwbegin` block, if one is present. + # + # @return [Node, nil] The `rescue` node within `kwbegin`. + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#30 + def ensure_node; end + + # Returns the `rescue` node of the `kwbegin` block, if one is present. + # + # @return [Node, nil] The `rescue` node within `kwbegin`. + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#37 + def rescue_node; end +end + # A node extension for `kwsplat` and `forwarded_kwrestarg` nodes. This will be used in # place of a plain node when the builder constructs the AST, making its methods available to # all `kwsplat` and `forwarded_kwrestarg` nodes within RuboCop. @@ -2577,11 +2621,12 @@ RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil) class RuboCop::AST::MlhsNode < ::RuboCop::AST::Node # Returns all the assignment nodes on the left hand side (LHS) of a multiple assignment. # These are generally assignment nodes (`lvasgn`, `ivasgn`, `cvasgn`, `gvasgn`, `casgn`) - # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`. + # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`, + # or a `splat` node for `*, ... =`. # # @return [Array] the assignment nodes of the multiple assignment LHS # - # source://rubocop-ast//lib/rubocop/ast/node/mlhs_node.rb#14 + # source://rubocop-ast//lib/rubocop/ast/node/mlhs_node.rb#15 def assignments; end end @@ -2655,19 +2700,19 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Node] a new instance of Node # @see https://www.rubydoc.info/gems/ast/AST/Node:initialize # - # source://rubocop-ast//lib/rubocop/ast/node.rb#113 + # source://rubocop-ast//lib/rubocop/ast/node.rb#141 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def __ENCODING___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def __FILE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def __LINE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def alias_type?; end # Returns an array of ancestor nodes. @@ -2675,173 +2720,173 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] an array of ancestor nodes # - # source://rubocop-ast//lib/rubocop/ast/node.rb#268 + # source://rubocop-ast//lib/rubocop/ast/node.rb#306 def ancestors; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def and_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def and_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def arg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def args_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#474 + # source://rubocop-ast//lib/rubocop/ast/node.rb#511 def argument?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#478 + # source://rubocop-ast//lib/rubocop/ast/node.rb#515 def argument_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def array_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def array_pattern_with_tail_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def array_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#426 + # source://rubocop-ast//lib/rubocop/ast/node.rb#463 def assignment?; end # Some cops treat the shovel operator as a kind of assignment. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#376 + # source://rubocop-ast//lib/rubocop/ast/node.rb#413 def assignment_or_similar?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def back_ref_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#430 + # source://rubocop-ast//lib/rubocop/ast/node.rb#467 def basic_conditional?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#384 + # source://rubocop-ast//lib/rubocop/ast/node.rb#421 def basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def begin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def block_pass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def block_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def blockarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def blockarg_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#482 + # source://rubocop-ast//lib/rubocop/ast/node.rb#519 def boolean_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def break_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#466 + # source://rubocop-ast//lib/rubocop/ast/node.rb#503 def call_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def case_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def case_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def casgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def cbase_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#470 + # source://rubocop-ast//lib/rubocop/ast/node.rb#507 def chained?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#522 + # source://rubocop-ast//lib/rubocop/ast/node.rb#559 def class_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#540 + # source://rubocop-ast//lib/rubocop/ast/node.rb#577 def class_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def class_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#165 + # source://rubocop-ast//lib/rubocop/ast/node.rb#203 def complete!; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#170 + # source://rubocop-ast//lib/rubocop/ast/node.rb#208 def complete?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def complex_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#434 + # source://rubocop-ast//lib/rubocop/ast/node.rb#471 def conditional?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#314 + # source://rubocop-ast//lib/rubocop/ast/node.rb#352 def const_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def const_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def const_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def csend_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def cvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def cvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def def_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#335 + # source://rubocop-ast//lib/rubocop/ast/node.rb#372 def defined_module; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#340 + # source://rubocop-ast//lib/rubocop/ast/node.rb#377 def defined_module_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def defined_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def defs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def dstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def dsym_type?; end # Calls the given block for each ancestor node from parent to root. @@ -2854,163 +2899,163 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Enumerator] if no block is given # @yieldparam node [Node] each ancestor node # - # source://rubocop-ast//lib/rubocop/ast/node.rb#256 + # source://rubocop-ast//lib/rubocop/ast/node.rb#294 def each_ancestor(*types, &block); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def eflipflop_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def empty_else_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#370 + # source://rubocop-ast//lib/rubocop/ast/node.rb#407 def empty_source?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def ensure_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#418 + # source://rubocop-ast//lib/rubocop/ast/node.rb#455 def equals_asgn?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def erange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def false_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#392 + # source://rubocop-ast//lib/rubocop/ast/node.rb#429 def falsey_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def find_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#282 + # source://rubocop-ast//lib/rubocop/ast/node.rb#320 def first_line; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def float_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def for_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def forward_arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def forward_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def forwarded_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def forwarded_kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def forwarded_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#519 + # source://rubocop-ast//lib/rubocop/ast/node.rb#556 def global_const?(param0 = T.unsafe(nil), param1); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#494 + # source://rubocop-ast//lib/rubocop/ast/node.rb#531 def guard_clause?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def gvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def gvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def hash_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def hash_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def ident_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def if_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def if_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def iflipflop_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#400 + # source://rubocop-ast//lib/rubocop/ast/node.rb#437 def immutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def in_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def in_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def index_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def indexasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def int_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def irange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def ivar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def ivasgn_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#447 + # source://rubocop-ast//lib/rubocop/ast/node.rb#484 def keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def kwargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def kwbegin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def kwnilarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def kwoptarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def kwsplat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#513 + # source://rubocop-ast//lib/rubocop/ast/node.rb#550 def lambda?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#516 + # source://rubocop-ast//lib/rubocop/ast/node.rb#553 def lambda_or_proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def lambda_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#286 + # source://rubocop-ast//lib/rubocop/ast/node.rb#324 def last_line; end # Use is discouraged, this is a potentially slow method and can lead @@ -3018,7 +3063,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Node, nil] the left (aka previous) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#208 + # source://rubocop-ast//lib/rubocop/ast/node.rb#246 def left_sibling; end # Use is discouraged, this is a potentially slow method and can lead @@ -3026,94 +3071,94 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] the left (aka previous) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#218 + # source://rubocop-ast//lib/rubocop/ast/node.rb#256 def left_siblings; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#290 + # source://rubocop-ast//lib/rubocop/ast/node.rb#328 def line_count; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#380 + # source://rubocop-ast//lib/rubocop/ast/node.rb#417 def literal?; end # NOTE: `loop { }` is a normal method call and thus not a loop keyword. # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#443 + # source://rubocop-ast//lib/rubocop/ast/node.rb#480 def loop_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def lvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def masgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_alt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_as_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_current_line_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#501 + # source://rubocop-ast//lib/rubocop/ast/node.rb#538 def match_guard_clause?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_nil_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_pattern_p_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_rest_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_var_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_with_lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_with_trailing_comma_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def mlhs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#547 + # source://rubocop-ast//lib/rubocop/ast/node.rb#584 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def module_type?; end # Predicates # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#362 + # source://rubocop-ast//lib/rubocop/ast/node.rb#399 def multiline?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#396 + # source://rubocop-ast//lib/rubocop/ast/node.rb#433 def mutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#679 + # source://rubocop-ast//lib/rubocop/ast/node.rb#716 def new_class_or_module_block?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def next_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def nil_type?; end # Common destructuring method. This can be used to normalize @@ -3126,95 +3171,95 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://ast/2.4.2/lib/ast/node.rb#56 def node_parts; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#296 + # source://rubocop-ast//lib/rubocop/ast/node.rb#334 def nonempty_line_count; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def not_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def nth_ref_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def numargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def numblock_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#486 + # source://rubocop-ast//lib/rubocop/ast/node.rb#523 def numeric_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def objc_kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def objc_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def objc_varargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def op_asgn_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#458 + # source://rubocop-ast//lib/rubocop/ast/node.rb#495 def operator_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def optarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def or_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def or_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def pair_type?; end # Returns the parent node, or `nil` if the receiver is a root node. # # @return [Node, nil] the parent node or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#147 + # source://rubocop-ast//lib/rubocop/ast/node.rb#185 def parent; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#156 + # source://rubocop-ast//lib/rubocop/ast/node.rb#194 def parent?; end # Searching the AST # - # source://rubocop-ast//lib/rubocop/ast/node.rb#346 + # source://rubocop-ast//lib/rubocop/ast/node.rb#383 def parent_module_name; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#462 + # source://rubocop-ast//lib/rubocop/ast/node.rb#499 def parenthesized_call?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def pin_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#438 + # source://rubocop-ast//lib/rubocop/ast/node.rb#475 def post_condition_loop?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def postexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def preexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#506 + # source://rubocop-ast//lib/rubocop/ast/node.rb#543 def proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def procarg0_type?; end # Some expressions are evaluated for their value, some for their side @@ -3227,60 +3272,60 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#590 + # source://rubocop-ast//lib/rubocop/ast/node.rb#627 def pure?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#490 + # source://rubocop-ast//lib/rubocop/ast/node.rb#527 def range_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def rational_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#307 + # source://rubocop-ast//lib/rubocop/ast/node.rb#345 def receiver(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#97 + # source://rubocop-ast//lib/rubocop/ast/node.rb#125 def recursive_basic_literal?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#97 + # source://rubocop-ast//lib/rubocop/ast/node.rb#125 def recursive_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def redo_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#414 + # source://rubocop-ast//lib/rubocop/ast/node.rb#451 def reference?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def regexp_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def regopt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def resbody_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def rescue_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def restarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def retry_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def return_type?; end # Use is discouraged, this is a potentially slow method and can lead @@ -3288,7 +3333,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Node, nil] the right (aka next) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#199 + # source://rubocop-ast//lib/rubocop/ast/node.rb#237 def right_sibling; end # Use is discouraged, this is a potentially slow method and can lead @@ -3296,18 +3341,18 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] the right (aka next) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#227 + # source://rubocop-ast//lib/rubocop/ast/node.rb#265 def right_siblings; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#161 + # source://rubocop-ast//lib/rubocop/ast/node.rb#199 def root?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def sclass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def self_type?; end # Most nodes are of 'send' type, so this method is defined @@ -3315,15 +3360,15 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#140 + # source://rubocop-ast//lib/rubocop/ast/node.rb#178 def send_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def shadowarg_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#422 + # source://rubocop-ast//lib/rubocop/ast/node.rb#459 def shorthand_asgn?; end # Returns the index of the receiver node in its siblings. (Sibling index @@ -3332,70 +3377,79 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Integer, nil] the index of the receiver node in its siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#192 + # source://rubocop-ast//lib/rubocop/ast/node.rb#230 def sibling_index; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#366 + # source://rubocop-ast//lib/rubocop/ast/node.rb#403 def single_line?; end # NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}` # # @return [String, nil] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#274 + # source://rubocop-ast//lib/rubocop/ast/node.rb#312 def source; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#300 + # source://rubocop-ast//lib/rubocop/ast/node.rb#338 def source_length; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#278 + # source://rubocop-ast//lib/rubocop/ast/node.rb#316 def source_range; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#454 + # source://rubocop-ast//lib/rubocop/ast/node.rb#491 def special_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def splat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#312 + # source://rubocop-ast//lib/rubocop/ast/node.rb#350 def str_content(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def str_type?; end # @deprecated Use `:class_constructor?` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#535 + # source://rubocop-ast//lib/rubocop/ast/node.rb#572 def struct_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def super_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def sym_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def true_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#388 + # source://rubocop-ast//lib/rubocop/ast/node.rb#425 def truthy_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # Determine if the node is one of several node types in a single query + # Allows specific single node types, as well as "grouped" types + # (e.g. `:boolean` for `:true` or `:false`) + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#160 + def type?(*types); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def undef_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def unless_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def until_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def until_type?; end # Override `AST::Node#updated` so that `AST::Processor` does not try to @@ -3404,7 +3458,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # identical subtrees. Rather, the entire AST must be copied any time any # part of it is changed. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#181 + # source://rubocop-ast//lib/rubocop/ast/node.rb#219 def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end # Some expressions are evaluated for their value, some for their side @@ -3417,78 +3471,78 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#560 + # source://rubocop-ast//lib/rubocop/ast/node.rb#597 def value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#410 + # source://rubocop-ast//lib/rubocop/ast/node.rb#447 def variable?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def when_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def while_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def while_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def xstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def yield_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def zsuper_type?; end protected - # source://rubocop-ast//lib/rubocop/ast/node.rb#151 + # source://rubocop-ast//lib/rubocop/ast/node.rb#189 def parent=(node); end private # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#618 + # source://rubocop-ast//lib/rubocop/ast/node.rb#655 def begin_value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#629 + # source://rubocop-ast//lib/rubocop/ast/node.rb#666 def case_if_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#326 + # source://rubocop-ast//lib/rubocop/ast/node.rb#363 def defined_module0(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#623 + # source://rubocop-ast//lib/rubocop/ast/node.rb#660 def for_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#665 + # source://rubocop-ast//lib/rubocop/ast/node.rb#702 def parent_module_name_for_block(ancestor); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#653 + # source://rubocop-ast//lib/rubocop/ast/node.rb#690 def parent_module_name_for_sclass(sclass_node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#640 + # source://rubocop-ast//lib/rubocop/ast/node.rb#677 def parent_module_name_part(node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#608 + # source://rubocop-ast//lib/rubocop/ast/node.rb#645 def visit_ancestors(types); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#635 + # source://rubocop-ast//lib/rubocop/ast/node.rb#672 def while_until_value_used?; end class << self private - # source://rubocop-ast//lib/rubocop/ast/node.rb#92 + # source://rubocop-ast//lib/rubocop/ast/node.rb#120 def def_recursive_literal_predicate(kind); end end end @@ -3546,6 +3600,11 @@ RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node.rb#35 RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#92 +RuboCop::AST::Node::GROUP_FOR_TYPE = T.let(T.unsafe(nil), Hash) + # @api private # # source://rubocop-ast//lib/rubocop/ast/node.rb#47 @@ -5255,7 +5314,7 @@ RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) +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) @@ -5384,7 +5443,7 @@ RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) 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_EMPTY = T.let(T.unsafe(nil), Set) +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) @@ -7177,28 +7236,28 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node end class RuboCop::CommentConfig - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#34 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#34 def initialize(processed_source); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#63 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def config(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#51 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#51 def cop_disabled_line_ranges; end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#39 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#39 def cop_enabled_at_line?(cop, line_number); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#47 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#47 def cop_opted_in?(cop); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#55 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#55 def extra_enabled_comments; end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#30 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#30 def processed_source; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7206,51 +7265,51 @@ class RuboCop::CommentConfig private - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#96 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#96 def analyze; end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#124 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#124 def analyze_cop(analysis, directive); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#144 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#144 def analyze_disabled(analysis, directive); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#155 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#155 def analyze_rest(analysis, directive); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#135 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#135 def analyze_single_line(analysis, directive); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#164 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#164 def cop_line_ranges(analysis); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#170 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#170 def each_directive; end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#69 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#69 def extra_enabled_comments_with_names(extras:, names:); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#190 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#190 def handle_enable_all(directive, names, extras); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#204 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#204 def handle_switch(directive, names, extras); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#115 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#115 def inject_disabled_cops_directives(analyses); end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#183 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#183 def non_comment_token_line_numbers; end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#83 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#83 def opt_in_cops; end - # source://rubocop/1.68.0/lib/rubocop/comment_config.rb#179 + # source://rubocop/1.69.0/lib/rubocop/comment_config.rb#179 def qualified_cop_name(cop_name); end end class RuboCop::Config - # source://rubocop/1.68.0/lib/rubocop/config.rb#30 + # source://rubocop/1.69.0/lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7259,37 +7318,37 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def []=(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#170 + # source://rubocop/1.69.0/lib/rubocop/config.rb#170 def active_support_extensions_enabled?; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#96 + # source://rubocop/1.69.0/lib/rubocop/config.rb#96 def add_excludes_from_higher_level(highest_config); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#197 + # source://rubocop/1.69.0/lib/rubocop/config.rb#197 def allowed_camel_case_file?(file); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#241 + # source://rubocop/1.69.0/lib/rubocop/config.rb#241 def base_dir_for_path_parameters; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#271 + # source://rubocop/1.69.0/lib/rubocop/config.rb#271 def bundler_lock_file_path; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#51 + # source://rubocop/1.69.0/lib/rubocop/config.rb#51 def check; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#142 + # source://rubocop/1.69.0/lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def delete(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#108 + # source://rubocop/1.69.0/lib/rubocop/config.rb#108 def deprecation_check; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def dig(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#162 + # source://rubocop/1.69.0/lib/rubocop/config.rb#162 def disabled_new_cops?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7298,37 +7357,37 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def each_key(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#166 + # source://rubocop/1.69.0/lib/rubocop/config.rb#166 def enabled_new_cops?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def fetch(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#219 + # source://rubocop/1.69.0/lib/rubocop/config.rb#219 def file_to_exclude?(file); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#178 + # source://rubocop/1.69.0/lib/rubocop/config.rb#178 def file_to_include?(file); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#158 + # source://rubocop/1.69.0/lib/rubocop/config.rb#158 def for_all_cops; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#128 + # source://rubocop/1.69.0/lib/rubocop/config.rb#128 def for_badge(badge); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#122 + # source://rubocop/1.69.0/lib/rubocop/config.rb#122 def for_cop(cop); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#153 + # source://rubocop/1.69.0/lib/rubocop/config.rb#153 def for_department(department_name); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#296 + # source://rubocop/1.69.0/lib/rubocop/config.rb#296 def gem_versions_in_target; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#300 + # source://rubocop/1.69.0/lib/rubocop/config.rb#300 def inspect; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#76 + # source://rubocop/1.69.0/lib/rubocop/config.rb#76 def internal?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7337,13 +7396,13 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def keys(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#47 + # source://rubocop/1.69.0/lib/rubocop/config.rb#47 def loaded_features; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#20 + # source://rubocop/1.69.0/lib/rubocop/config.rb#20 def loaded_path; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#81 + # source://rubocop/1.69.0/lib/rubocop/config.rb#81 def make_excludes_absolute; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7352,37 +7411,37 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#251 + # source://rubocop/1.69.0/lib/rubocop/config.rb#251 def parser_engine; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#232 + # source://rubocop/1.69.0/lib/rubocop/config.rb#232 def path_relative_to_config(path); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#228 + # source://rubocop/1.69.0/lib/rubocop/config.rb#228 def patterns_to_exclude; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#224 + # source://rubocop/1.69.0/lib/rubocop/config.rb#224 def patterns_to_include; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#282 + # source://rubocop/1.69.0/lib/rubocop/config.rb#282 def pending_cops; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#211 + # source://rubocop/1.69.0/lib/rubocop/config.rb#211 def possibly_include_hidden?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def replace(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#71 + # source://rubocop/1.69.0/lib/rubocop/config.rb#71 def signature; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#266 + # source://rubocop/1.69.0/lib/rubocop/config.rb#266 def smart_loaded_path; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#174 + # source://rubocop/1.69.0/lib/rubocop/config.rb#174 def string_literals_frozen_by_default?; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#255 + # source://rubocop/1.69.0/lib/rubocop/config.rb#255 def target_rails_version; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7394,7 +7453,7 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def to_hash(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#67 + # source://rubocop/1.69.0/lib/rubocop/config.rb#67 def to_s; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7403,37 +7462,37 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def validate(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#58 + # source://rubocop/1.69.0/lib/rubocop/config.rb#58 def validate_after_resolution; end private - # source://rubocop/1.68.0/lib/rubocop/config.rb#350 + # source://rubocop/1.69.0/lib/rubocop/config.rb#350 def department_of(qualified_cop_name); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#338 + # source://rubocop/1.69.0/lib/rubocop/config.rb#338 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#325 + # source://rubocop/1.69.0/lib/rubocop/config.rb#325 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop/1.68.0/lib/rubocop/config.rb#331 + # source://rubocop/1.69.0/lib/rubocop/config.rb#331 def read_gem_versions_from_target_lockfile; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#312 + # source://rubocop/1.69.0/lib/rubocop/config.rb#312 def read_rails_version_from_bundler_lock_file; end - # source://rubocop/1.68.0/lib/rubocop/config.rb#307 + # source://rubocop/1.69.0/lib/rubocop/config.rb#307 def target_rails_version_from_bundler_lock_file; end class << self - # source://rubocop/1.68.0/lib/rubocop/config.rb#22 + # source://rubocop/1.69.0/lib/rubocop/config.rb#22 def create(hash, path, check: T.unsafe(nil)); end end end class RuboCop::ConfigValidator - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#27 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#27 def initialize(config); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7442,66 +7501,66 @@ class RuboCop::ConfigValidator # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#63 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#63 def target_ruby_version; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#33 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#33 def validate; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#59 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#59 def validate_after_resolution; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#67 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#67 def validate_section_presence(name); end private - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#104 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#104 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#254 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#254 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#77 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#77 def check_obsoletions; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#84 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#84 def check_target_ruby; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#195 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#195 def each_invalid_parameter(cop_name); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#120 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#120 def list_unknown_cops(invalid_cop_names); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#274 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#274 def param_error_message(parent, key, value, supposed_values); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#242 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#242 def reject_conflicting_safe_settings; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#233 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#233 def reject_mutually_exclusive_defaults; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#142 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#142 def suggestion(name); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#75 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#75 def target_ruby; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#207 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#207 def validate_enforced_styles(valid_cop_names); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#169 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#169 def validate_new_cops_parameter; end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#180 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#180 def validate_parameter_names(valid_cop_names); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#227 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#227 def validate_support_and_has_list(name, formats, valid); end - # source://rubocop/1.68.0/lib/rubocop/config_validator.rb#158 + # source://rubocop/1.69.0/lib/rubocop/config_validator.rb#158 def validate_syntax_cop; end end diff --git a/sorbet/rbi/gems/rubocop@1.68.0.rbi b/sorbet/rbi/gems/rubocop@1.69.0.rbi similarity index 97% rename from sorbet/rbi/gems/rubocop@1.68.0.rbi rename to sorbet/rbi/gems/rubocop@1.69.0.rbi index b65eb8b6..9c888970 100644 --- a/sorbet/rbi/gems/rubocop@1.68.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.69.0.rbi @@ -780,7 +780,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def config(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/comment_config.rb#51 @@ -804,7 +804,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def registry(*_arg0, **_arg1, &_arg2); end private @@ -980,10 +980,10 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def [](*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def []=(*_arg0, **_arg1, &_arg2); end # @return [Boolean] @@ -1022,13 +1022,13 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def delete(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#108 def deprecation_check; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def dig(*_arg0, **_arg1, &_arg2); end # @return [Boolean] @@ -1036,10 +1036,10 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#162 def disabled_new_cops?; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def each(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def each_key(*_arg0, **_arg1, &_arg2); end # @return [Boolean] @@ -1047,7 +1047,7 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#166 def enabled_new_cops?; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def fetch(*_arg0, **_arg1, &_arg2); end # @return [Boolean] @@ -1101,10 +1101,10 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#76 def internal?; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def key?(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def keys(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#47 @@ -1118,10 +1118,10 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#81 def make_excludes_absolute; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def map(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def merge(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#251 @@ -1147,7 +1147,7 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#211 def possibly_include_hidden?; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def replace(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#71 @@ -1164,22 +1164,22 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#255 def target_rails_version; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def target_ruby_version(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def to_h(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def to_hash(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#67 def to_s; end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def transform_values(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def validate(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#58 @@ -2272,10 +2272,10 @@ class RuboCop::ConfigValidator # source://rubocop//lib/rubocop/config_validator.rb#27 def initialize(config); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def for_all_cops(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def smart_loaded_path(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config_validator.rb#63 @@ -3229,7 +3229,7 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#101 def department; end - # Returns an url to view this cops documentation online. + # Returns a url to view this cops documentation online. # Requires 'DocumentationBaseURL' to be set for your department. # Will follow the convention of RuboCops own documentation structure, # overwrite this method to accommodate your custom layout. @@ -3723,64 +3723,63 @@ RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(ni # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#28 class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#43 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#42 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#88 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#87 def expected_gemfile?(basename); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#80 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#79 def gemfile_offense?(basename); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#93 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#92 def gemfile_required?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#84 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#83 def gems_rb_offense?(basename); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#97 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#96 def gems_rb_required?; end - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#58 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#57 def register_gemfile_offense(file_path, basename); end - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#69 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#68 def register_gems_rb_offense(file_path, basename); end - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#53 + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#52 def register_offense(file_path, basename); end end -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#40 +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#39 RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#41 +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#40 RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#36 +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#35 RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#32 +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#31 RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#38 +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#37 RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#34 +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#33 RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) # Enforce that Gem version specifications or a commit reference (branch, @@ -3934,30 +3933,29 @@ RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe( # # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#41 class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#54 + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#53 def insecure_protocol_source?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#59 + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#58 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#80 + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#79 def allow_http_protocol?; end end -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#45 +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#44 RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#49 +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#48 RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#51 +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#50 RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Gems should be alphabetically sorted within groups. @@ -4044,11 +4042,11 @@ module RuboCop::Cop::CheckAssignment private - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#27 def extract_rhs(node); end class << self - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#27 def extract_rhs(node); end end end @@ -4183,6 +4181,40 @@ module RuboCop::Cop::CheckLineBreakable def within_column_limit?(element, max, line); end end +# Checks for code on multiple lines that could be rewritten on a single line +# without changing semantics or exceeding the `Max` parameter of `Layout/LineLength`. +# +# source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#7 +module RuboCop::Cop::CheckSingleLineSuitability + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#8 + def suitable_as_single_line?(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#34 + def comment_within?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#30 + def max_line_length; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#42 + def safe_to_split?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#21 + def to_single_line(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#16 + def too_long?(node); end +end + # Common functionality for checking length of code segments. # # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#6 @@ -5126,7 +5158,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.5.1/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.6.0/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5184,6 +5216,27 @@ module RuboCop::Cop::DefNode def preceding_non_public_modifier?(node); end end +# Help methods for working with `Enumerable#dig` in cops. +# Used by `Style::DigChain` and `Style::SingleArgumentDig` +# +# source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#7 +module RuboCop::Cop::DigHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#11 + def dig?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#16 + def single_argument_dig?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#22 + def dig_chain_enabled?; end +end + # Helpers for builtin documentation # # source://rubocop//lib/rubocop/cop/documentation.rb#6 @@ -5911,7 +5964,7 @@ class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Bas private - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#86 + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#85 def format_message_from; end # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#63 @@ -5919,7 +5972,7 @@ class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Bas # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#72 + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#71 def use_deprecated_attributes?(node, block_parameter); end end @@ -6302,41 +6355,39 @@ RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#55 class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#70 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#68 def defined_ruby_version(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#78 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#76 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#84 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#82 def on_send(node); end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#65 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#63 def required_ruby_version?(param0); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#96 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#94 def dynamic_version?(node); end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#102 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#100 def extract_ruby_version(required_ruby_version); end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#120 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#118 def not_equal_message(required_ruby_version, target_ruby_version); end end -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#62 +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#60 RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#59 +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#57 RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#58 +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#56 RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks that `RUBY_VERSION` constant is not used in gemspec. @@ -7390,8 +7441,7 @@ end # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#41 RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) -# Here we check if the arguments on a multi-line method -# definition are aligned. +# Check that the arguments on a multi-line method definition are aligned. # # @example EnforcedStyle: with_first_argument (default) # # good @@ -7430,76 +7480,76 @@ RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), Stri # :baz, # key: value # -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#46 +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#45 class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#55 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#54 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#55 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#54 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#92 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#91 def arguments_or_first_arg_pairs(node); end - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#80 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#79 def arguments_with_last_arg_pairs(node); end - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#108 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#107 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#68 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#67 def autocorrect_incompatible_with_other_cops?; end - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#124 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#123 def base_column(node, first_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#144 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#143 def enforce_hash_argument_with_separator?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#116 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#115 def fixed_indentation?; end - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#72 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#71 def flattened_arguments(node); end - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#152 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#151 def hash_argument_config; end - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#112 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#111 def message(_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#101 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#100 def multiple_arguments?(node); end - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#135 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#134 def target_method_lineno(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#120 + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#119 def with_first_argument_style?; end end -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#50 +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#49 RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#52 +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#51 RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) -# Here we check if the elements of a multi-line array literal are +# Check that the elements of a multi-line array literal are # aligned. # # @example EnforcedStyle: with_first_element (default) @@ -7644,22 +7694,22 @@ class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::EndKeywordAlignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#48 + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#47 def on_kwbegin(node); end private - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#63 + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#62 def alignment_node(node); end - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#59 + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#58 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#54 + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#53 def check_begin_alignment(node); end end -# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#46 +# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#45 RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) # Checks whether the end keywords are aligned properly for do @@ -7740,13 +7790,13 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#246 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#245 def add_space_before(corrector, loc, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#223 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#222 def alt_start_msg(start_loc, source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#145 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#144 def autocorrect(corrector, node); end # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 @@ -7755,10 +7805,10 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#113 def check_block_alignment(start_node, block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#196 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#195 def compute_do_source_line_column(node, end_loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#238 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#237 def compute_start_col(ancestor_node, node); end # @return [Boolean] @@ -7774,28 +7824,28 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base # In offense message, we want to show the assignment LHS rather than # the entire assignment. # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#191 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#190 def find_lhs_node(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#162 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#161 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#233 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#232 def format_source_line_column(source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#214 def loc_to_source_line_column(loc); end # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#126 def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#250 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#249 def remove_space_before(corrector, end_pos, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#172 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#171 def start_for_block_node(block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#179 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#178 def start_for_line_node(block_node); end end @@ -9565,60 +9615,60 @@ class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Bas # @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#114 def allowed_only_before_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#164 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#163 def block_start?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#170 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#169 def body_end?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#158 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#157 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#123 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#154 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#153 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#103 def expected_empty_lines?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#180 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#179 def message(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#189 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#188 def message_for_around_style(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#199 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#198 def message_for_only_before_style(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#176 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#175 def next_empty_line_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#148 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#147 def next_line_empty?(last_send_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#141 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#140 def previous_line_empty?(send_line); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#137 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#136 def previous_line_ignoring_comments(processed_source, send_line); end end @@ -10130,27 +10180,27 @@ class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCo private - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#80 def check_body(body, line_of_def_or_kwbegin); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#113 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#112 def keyword_locations(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#130 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#129 def keyword_locations_in_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#126 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 def keyword_locations_in_rescue(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#95 def last_body_and_end_on_same_line?(body); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#105 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 def message(location, keyword); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#109 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 def style; end end @@ -10190,7 +10240,7 @@ class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#36 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#38 def style; end end @@ -12259,87 +12309,87 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#56 def access_modifier?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#80 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 def on_block(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#137 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#138 def on_case(case_node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#145 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#146 def on_case_match(case_match); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#103 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#120 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 def on_def(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#120 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#69 def on_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#64 def on_for(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#155 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 def on_if(node, base = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#72 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 def on_module(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#80 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#64 def on_resbody(node); end # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#60 def on_rescue(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#103 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#127 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 def on_until(node, base = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#127 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 def on_while(node, base = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#226 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#227 def access_modifier_indentation_style; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#164 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#165 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#234 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#235 def check_assignment(node, rhs); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#254 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#255 def check_if(node, body, else_clause, base_loc); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#267 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#268 def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#168 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#169 def check_members(base, members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#192 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#193 def check_members_for_indented_internal_methods_style(members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#198 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#199 def check_members_for_normal_style(base, members); end # @return [Boolean] @@ -12350,32 +12400,32 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#376 def configured_indentation_width; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#206 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#207 def each_member(members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#230 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#231 def indentation_consistency_style; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#322 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#323 def indentation_to_check?(base_loc, body_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#218 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#219 def indented_internal_methods_style?; end # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#380 def leftmost_modifier_of(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#301 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#302 def message(configured_indentation_width, indentation, name); end # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#359 def offending_range(body_node, indentation); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#277 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#278 def offense(body_node, indentation, style); end # Returns true if the given node is within another node that has @@ -12383,10 +12433,10 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#312 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#313 def other_offense_in_same_range?(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#180 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#181 def select_check_member(member); end # @return [Boolean] @@ -12396,7 +12446,7 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#222 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#223 def special_modifier?(node); end # @return [Boolean] @@ -12531,75 +12581,80 @@ class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#134 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#149 def allow_doxygen_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#142 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#157 def allow_gemfile_ruby_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#158 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#173 def allow_rbs_inline_annotation?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#166 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#181 def allow_steep_annotation?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#118 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#119 def allowed_on_first_line?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#138 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#153 def doxygen_comment_style?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#146 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#161 def gemfile?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#154 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#169 def gemfile_ruby_comment?(comment); end - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#114 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#115 def hash_mark(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#130 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#145 def rackup_config_file?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#126 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#141 def rackup_options?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#162 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#177 def rbs_inline_annotation?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#150 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#165 def ruby_comment_in_gemfile?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#122 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#123 def shebang?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#170 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#127 + def shebang_continuation?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#185 def steep_annotation?(comment); end end @@ -12955,7 +13010,7 @@ RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_IN # * `Layout/MultilineHashKeyLineBreaks` # * `Layout/MultilineMethodArgumentLineBreaks` # * `Layout/MultilineMethodParameterLineBreaks` -# * `Layout//ParameterAlignment` +# * `Layout/ParameterAlignment` # * `Style/BlockDelimiters` # # Together, these cops will pretty print hashes, arrays, @@ -12990,119 +13045,171 @@ 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#80 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 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#80 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 def on_def(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#83 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#94 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#101 def on_investigation_end; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#95 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#80 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 def on_potential_breakable_node(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 def on_send(node); end + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#79 + def on_str(node); end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#219 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#306 def allow_heredoc?; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#223 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#314 + def allow_string_split?; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#310 def allowed_heredoc; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#183 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#263 def allowed_line?(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#135 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#178 def breakable_block_range(block_node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#365 + def breakable_dstr?(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#227 + def breakable_dstr_begin_position(node); end + # Returns the value of attribute breakable_range. # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#109 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#102 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#109 def breakable_range=(_arg0); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#143 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#186 def breakable_range_after_semicolon(semicolon_token); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#156 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#232 def breakable_range_by_line_index; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#250 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#169 + def breakable_string?(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#236 + def breakable_string_delimiters; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#199 + def breakable_string_position(node); end + + # Locate where to break a string that is too long, ensuring that escape characters + # are not bisected. + # 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#211 + def breakable_string_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#341 def check_directive_line(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#125 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#132 def check_for_breakable_block(block_node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#104 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#154 + def check_for_breakable_dstr(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#111 def check_for_breakable_node(node); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#117 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#124 def check_for_breakable_semicolons(processed_source); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#171 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#142 + def check_for_breakable_str(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#251 def check_line(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#267 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#358 def check_uri_line(line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#204 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#291 def excess_range(uri_range, line, line_index); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#227 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#318 def extract_heredocs(ast); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#160 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#240 def heredocs; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#164 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#244 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#379 + def largest_possible_string(node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#246 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#337 def line_in_heredoc?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#237 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#328 def line_in_permitted_heredoc?(line_number); end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#215 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#302 def max; end - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#193 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#273 def register_offense(loc, line, line_index, length: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#189 + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#269 def shebang?(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#370 + def string_delimiter(node); end end # source://rubocop//lib/rubocop/cop/layout/line_length.rb#72 @@ -13703,7 +13810,7 @@ RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(ni # argument of the call, then the closing brace should be on the same # line as the last argument of the call. # -# If an method call's opening brace is on the line above the first +# If a method call's opening brace is on the line above the first # argument of the call, then the closing brace should be on the line # below the last argument of the call. # @@ -13964,7 +14071,7 @@ end # first parameter of the definition, then the closing brace should be # on the same line as the last parameter of the definition. # -# If an method definition's opening brace is on the line above the first +# If a method definition's opening brace is on the line above the first # parameter of the definition, then the closing brace should be on the # line below the last parameter of the definition. # @@ -14206,10 +14313,10 @@ class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#78 def check_and_or(node); end - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#110 + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#109 def message(node, lhs, rhs); end - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#84 + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#83 def offending_range(node, lhs, rhs, given_style); end # @return [Boolean] @@ -14217,20 +14324,19 @@ class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#72 def relevant_node?(node); end - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#121 + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#120 def right_hand_side(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#97 + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#96 def should_align?(node, rhs, given_style); end end -# Here we check if the parameters on a multi-line method call or -# definition are aligned. +# Check that the parameters on a multi-line method call or definition are aligned. # -# To set the alignment of the first argument, use the cop -# FirstParameterIndentation. +# To set the alignment of the first argument, use the +# `Layout/FirstParameterIndentation` cop. # # @example EnforcedStyle: with_first_parameter (default) # # good @@ -14291,41 +14397,41 @@ end # 123 # end # -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#71 +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#70 class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#81 + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#80 def on_def(node); end - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#81 + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#80 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#90 + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#89 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#102 + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#101 def base_column(node, args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#98 + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#97 def fixed_indentation?; end - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#94 + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#93 def message(_node); end - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#113 + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#112 def target_method_lineno(node); end end -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#75 +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#74 RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#78 +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#77 RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) # Checks whether certain expressions, e.g. method calls, that could fit @@ -14368,88 +14474,68 @@ RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil) # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#45 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#55 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#56 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#51 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#52 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#56 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#73 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#74 def check_assignment(node, _rhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 - def comment_within?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#104 def configured_to_not_be_inspected?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#127 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#121 def convertible_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#69 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#70 def end_with_percent_blank_string?(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#98 def index_access_call_chained?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#155 - def max_line_length; end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#86 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#87 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#110 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#111 def other_cop_takes_precedence?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#79 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#80 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#93 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#94 def require_backslash?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#116 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#117 def single_line_block_chain_enabled?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 - def suitable_as_single_line?(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#146 - def to_single_line(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#141 - def too_long?(node); end end -# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#49 +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#50 RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks whether the rescue and ensure keywords are aligned @@ -14491,43 +14577,43 @@ class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#186 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#187 def access_modifier?(node); end - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#163 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#164 def access_modifier_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#149 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#150 def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#136 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#137 def aligned_with_line_break_method?(ancestor_node, node); end - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#195 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#196 def alignment_location(alignment_node); end # We will use ancestor or wrapper with access modifier. # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#116 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#117 def alignment_node(node); end - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#96 def alignment_source(node, starting_loc); end - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#132 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#133 def ancestor_node(node); end - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#155 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#156 def assignment_node(node); end # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#73 def autocorrect(corrector, node, alignment_location); end - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#203 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#204 def begin_end_alignment_style; end # Check alignment of node with rescue or ensure modifiers. @@ -14540,10 +14626,10 @@ class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#173 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#174 def modifier?(node); end - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#179 + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#180 def whitespace_range(node); end end @@ -15229,52 +15315,52 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base include ::RuboCop::Cop::RationalLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#132 def on_and(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_assignment(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#132 def on_binary(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#125 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#124 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_gvasgn(node); end # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#92 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#149 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#148 def on_match_pattern(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_op_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#132 def on_or(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 def on_or_asgn(node); end # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#84 @@ -15286,77 +15372,77 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#80 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#107 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#105 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 - def on_special_asgn(node); end + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#140 + def on_setter_method(node); end private - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#259 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#258 def align_hash_cop_config; end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#198 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#197 def autocorrect(corrector, range, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#178 def check_operator(type, operator, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#212 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#211 def enclose_operator_with_space(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#239 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#238 def excess_leading_space?(type, operator, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#253 def excess_trailing_space?(right_operand, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#277 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#276 def force_equal_sign_alignment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#263 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#262 def hash_table_style?; end # @yield [msg] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#193 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#192 def offense(type, operator, with_space, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#225 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#224 def offense_message(type, operator, with_space, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#175 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#174 def operator_with_regular_syntax?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#169 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#168 def regular_operator?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#281 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#280 def should_not_have_surrounding_space?(operator, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#267 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#266 def space_around_exponent_operator?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#271 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#270 def space_around_slash_operator?(right_operand); end class << self @@ -15695,24 +15781,29 @@ RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(n # # # bad # array = [ a, b, c, d ] +# array = [ a, [ b, c ]] # # # good # array = [a, b, c, d] +# array = [a, [b, c]] # @example EnforcedStyle: space # # The `space` style enforces that array literals have # # surrounding space. # # # bad # array = [a, b, c, d] +# array = [ a, [ b, c ]] # # # good # array = [ a, b, c, d ] +# array = [ a, [ b, c ] ] # @example EnforcedStyle: compact # # The `compact` style normally requires a space inside # # array brackets, with the exception that successive left # # or right brackets are collapsed together in nested arrays. # # # bad +# array = [a, b, c, d] # array = [ a, [ b, c ] ] # array = [ # [ a ], @@ -15720,6 +15811,7 @@ RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(n # ] # # # good +# array = [ a, b, c, d ] # array = [ a, [ b, c ]] # array = [[ a ], # [ b, c ]] @@ -15746,83 +15838,83 @@ RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(n # foo = [ ] # bar = [ ] # -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#70 +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#76 class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::SurroundingSpace include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#78 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#84 def on_array(node); end private - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#109 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#115 def array_brackets(node); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#95 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#101 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#217 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#223 def compact(corrector, bracket, side); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#203 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#209 def compact_corrections(corrector, node, left, right); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#195 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#201 def compact_offense(node, token, side: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#157 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#163 def compact_offenses(node, left, right, start_ok, end_ok); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#118 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#124 def empty_config; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#126 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#132 def end_has_own_line?(token); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#133 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#139 def index_for(node, token); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#141 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#147 def issue_offenses(node, left, right, start_ok, end_ok); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#137 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#143 def line_and_column_for(token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#178 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#184 def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#189 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#195 def next_to_bracket?(token, side: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#153 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#159 def next_to_comment?(node, token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#122 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#128 def next_to_newline?(node, token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#170 + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#176 def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#76 +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#82 RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#75 +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#81 RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) # Checks for unnecessary additional spaces inside array percent literals @@ -16013,18 +16105,22 @@ end # # # bad # h = {a: 1, b: 2} +# foo = {{ a: 1 } => { b: { c: 2 }}} # # # good # h = { a: 1, b: 2 } +# foo = { { a: 1 } => { b: { c: 2 } } } # @example EnforcedStyle: no_space # # The `no_space` style enforces that hash literals have # # no surrounding space. # # # bad # h = { a: 1, b: 2 } +# foo = {{ a: 1 } => { b: { c: 2 }}} # # # good # h = {a: 1, b: 2} +# foo = {{a: 1} => {b: {c: 2}}} # @example EnforcedStyle: compact # # The `compact` style normally requires a space inside # # hash braces, with the exception that successive left @@ -16064,65 +16160,65 @@ end # foo = { # } # -# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#70 +# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#74 class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::SurroundingSpace include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#78 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#82 def on_hash(node); end private - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#137 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#141 def ambiguous_or_unexpected_style_detected(style, is_match); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#129 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#133 def autocorrect(corrector, range); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#89 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#93 def check(token1, token2); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#184 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#188 def check_whitespace_only_hash(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#202 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#206 def enforce_no_space_style_for_empty_braces?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#104 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#108 def expect_space?(token1, token2); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#117 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#121 def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#150 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#154 def message(brace, is_empty_braces, expect_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#145 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#149 def offense?(token1, expect_space); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#196 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#200 def range_inside_hash(node); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#176 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#180 def range_of_space_to_the_left(range); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#168 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#172 def range_of_space_to_the_right(range); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#160 + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#164 def space_range(token_range); end end -# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#76 +# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#80 RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) # Checks for spaces inside ordinary round parentheses. @@ -16449,19 +16545,19 @@ class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Bas include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#30 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#29 def on_interpolation(begin_node); end private - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#46 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#45 def autocorrect(corrector, begin_node); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#56 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#55 def delimiters(begin_node); end end -# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#28 +# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#27 RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) # Looks for trailing blank lines and a final newline in the @@ -17242,21 +17338,19 @@ RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # Checks for places where binary operator has identical operands. # -# It covers arithmetic operators: `-`, `/`, `%`; -# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; +# It covers comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; # bitwise operators: `|`, `^`, `&`; # boolean operators: `&&`, `||` # and "spaceship" operator - ``<=>``. # # Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`. # Although these can be rewritten in a different way, it should not be necessary to -# do so. This does not include operations such as `-` or `/` where the result will -# always be the same (`x - x` will always be 0; `x / x` will always be 1), and -# thus are legitimate offenses. +# do so. Operations such as `-` or `/` where the result will always be the same +# (`x - x` will always be 0; `x / x` will always be 1) are offenses, but these +# are covered by Lint/NumericOperationWithConstantResult instead. # # @example # # bad -# x / x # x.top >= x.top # # if a.x != 0 && a.x != 0 @@ -17271,22 +17365,22 @@ RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # x + x # 1 << 1 # -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#48 +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#46 class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#61 + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#58 def on_and(node); end - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#61 + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#58 def on_or(node); end - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#52 + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#50 def on_send(node); end end -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#50 -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::ALLOWED_MATH_OPERATORS = T.let(T.unsafe(nil), Set) +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#48 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MATH_OPERATORS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#49 +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#47 RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) # Checks for `:true` and `:false` symbols. @@ -17330,6 +17424,8 @@ RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) # # This cop mirrors a warning produced by MRI since 2.2. # +# NOTE: This syntax is no longer valid on Ruby 2.7 or higher. +# # @example # # # bad @@ -17357,21 +17453,21 @@ RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) # dry_ingredients.combine # end # -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#37 +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#39 class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#40 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#42 def on_kwoptarg(node); end - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#44 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#46 def on_optarg(node); end private - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#52 def check_for_circular_argument_references(arg_name, arg_value); end end -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#38 +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#40 RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) # Do not define constants within a block, since the block's scope does not @@ -19098,30 +19194,28 @@ RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#23 class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#28 + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#26 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#42 + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#40 def contains_only_comments?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#38 + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#36 def empty_file?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#34 + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#32 def offending?; end end -# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#26 +# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#24 RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of `in` pattern branches without a body. @@ -19449,46 +19543,49 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # tolerance = 0.0001 # (x - 0.1).abs < tolerance # +# # good - comparing against nil +# Float(x, exception: false) == nil +# # # Or some other epsilon based type of comparison: # # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ # -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#47 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#97 def check_numeric_returning_method(node); end - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#82 def check_send(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#53 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#60 def float?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#68 - def literal_zero?(node); end + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#75 + def literal_safe?(node); end end -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#41 RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#43 RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39 RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#45 RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies Float literals which are, like, really really really @@ -19685,6 +19782,46 @@ RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#32 RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for the deprecated use of keyword arguments as a default in `Hash.new`. +# +# This usage raises a warning in Ruby 3.3 and results in an error in Ruby 3.4. +# In Ruby 3.4, keyword arguments will instead be used to change the behavior of a hash. +# For example, the capacity option can be passed to create a hash with a certain size +# if you know it in advance, for better performance. +# +# NOTE: The following corner case may result in a false negative when upgrading from Ruby 3.3 +# or earlier, but it is intentionally not detected to respect the expected usage in Ruby 3.4. +# +# [source,ruby] +# ---- +# Hash.new(capacity: 42) +# ---- +# +# @example +# +# # bad +# Hash.new(key: :value) +# +# # good +# Hash.new({key: :value}) +# +# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#29 +class RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#36 + def hash_new(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#40 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#32 +RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#33 +RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for the ordering of a method call where # the receiver of the call is a HEREDOC. # @@ -20095,18 +20232,23 @@ RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#27 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 def on_str(node); end private - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#38 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#41 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#49 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#52 def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#56 + def valid_syntax?(node); end end # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#24 @@ -20136,20 +20278,21 @@ RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#27 class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base include ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::Cop::TargetRubyVersion # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#41 + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#44 def deprecated_it_method?(node); end - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#34 + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#37 def on_send(node); end end -# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#30 +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#32 +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#35 RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks uses of lambda without a literal block. @@ -20722,7 +20865,7 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#58 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#55 def each_unsafe_regexp_range(node); end # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 @@ -20731,36 +20874,36 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 def on_irange(node); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#48 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#45 def on_regexp(node); end private - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#74 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#71 def build_source_range(range_start, range_end); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#78 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#75 def range_for(char); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#84 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#81 def range_pairs(expr); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#104 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#101 def regexp_range(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#94 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#91 def skip_expression?(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#98 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#95 def skip_range?(range_start, range_end); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#88 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#85 def unsafe_range?(range_start, range_end); end end @@ -21456,72 +21599,72 @@ class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#106 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#106 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#93 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#92 def to_method(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#98 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#97 def to_method_symbol(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#165 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#164 def allow_receiver?(receiver); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#177 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#176 def allowed_method_name?(name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#187 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#186 def conversion_method?(method_name); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#151 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#150 def correct_method(node, receiver); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#154 def correct_sym_method(to_method); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#134 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#133 def handle_as_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#115 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#114 def handle_conversion_method(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#195 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#194 def ignored_class?(name); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#191 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#190 def ignored_classes; end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#160 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#159 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#181 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#180 def top_receiver(node); end end -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#88 RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#79 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#78 RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#90 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#85 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#84 RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) # Checks for uses of numbered parameter assignment. @@ -21563,6 +21706,81 @@ RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.le # source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#31 RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) +# Certain numeric operations have a constant result, usually 0 or 1. +# Subtracting a number from itself or multiplying it by 0 will always return 0. +# Additionally, a variable modulo 0 or itself will always return 0. +# Dividing a number by itself or raising it to the power of 0 will always return 1. +# As such, they can be replaced with that result. +# These are probably leftover from debugging, or are mistakes. +# Other numeric operations that are similarly leftover from debugging or mistakes +# are handled by Lint/UselessNumericOperation. +# +# @example +# +# # bad +# x - x +# x * 0 +# x % 1 +# x % x +# +# # good +# 0 +# +# # bad +# x -= x +# x *= 0 +# x %= 1 +# x %= x +# +# # good +# x = 0 +# +# # bad +# x / x +# x ** 0 +# +# # good +# 1 +# +# # bad +# x /= x +# x **= 0 +# +# # good +# x = 1 +# +# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#49 +class RuboCop::Cop::Lint::NumericOperationWithConstantResult < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#59 + def abbreviated_assignment_with_constant_result?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#74 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#62 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#55 + def operation_with_constant_result?(param0 = T.unsafe(nil)); end + + private + + # rubocop :disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#89 + def constant_result?(variable, operation, number); end +end + +# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#51 +RuboCop::Cop::Lint::NumericOperationWithConstantResult::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#52 +RuboCop::Cop::Lint::NumericOperationWithConstantResult::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for unintended or-assignment to a constant. # # Constants should always be assigned in the same location. And its value @@ -22186,7 +22404,7 @@ class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#86 def range_with_comma(comment, name); end - # If the list of cops is comma-separated, but without a empty space after the comma, + # If the list of cops is comma-separated, but without an empty space after the comma, # we should **not** remove the prepending empty space, thus begin_pos += 1 # # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#116 @@ -22390,7 +22608,7 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # Checks for redundant safe navigation calls. # Use cases where a constant, named in camel case for classes and modules is `nil` are rare, # and an offense is not detected when the receiver is a constant. The detection also applies -# to literal receivers, except for `nil`. +# to `self`, and to literal receivers, except for `nil`. # # For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, # and `equal?` methods are checked by default. @@ -22408,6 +22626,9 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # # bad # CamelCaseConst&.do_something # +# # good +# CamelCaseConst.do_something +# # # bad # do_something if attrs&.respond_to?(:[]) # @@ -22420,9 +22641,6 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # end # # # good -# CamelCaseConst.do_something -# -# # good # while node.is_a?(BeginNode) # node = node.parent # end @@ -22445,6 +22663,12 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # foo.to_i # foo.to_f # foo.to_s +# +# # bad +# self&.foo +# +# # good +# self.foo # @example AllowedMethods: [nil_safe_method] # # bad # do_something if attrs&.nil_safe_method(:[]) @@ -22453,51 +22677,51 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # do_something if attrs.nil_safe_method(:[]) # do_something if attrs&.not_nil_safe_method(:[]) # -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#78 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#84 class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#95 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#101 def conversion_with_default?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#107 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#113 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#117 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#123 def on_or(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#90 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#96 def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#133 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#139 def assume_receiver_instance_exists?(receiver); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#139 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#145 def check?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#149 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#154 def condition?(parent, node); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#82 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#88 RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#83 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#89 RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#91 RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#93 RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) # Checks for unneeded usages of splat expansion. @@ -22580,7 +22804,7 @@ class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#203 + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#204 def allow_percent_literal_array_argument?; end # @return [Boolean] @@ -22590,7 +22814,7 @@ class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#155 + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#156 def array_splat?(node); end # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#112 @@ -22598,31 +22822,31 @@ class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#159 + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#160 def method_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#163 + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#164 def part_of_an_array?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#170 + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#171 def redundant_brackets?(node); end # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#118 def redundant_splat_expansion(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#178 + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#179 def remove_brackets(array); end - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#138 + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#139 def replacement_range_and_content(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#196 + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#197 def use_percent_literal_array_argument?(node); end end @@ -22851,11 +23075,11 @@ RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(n class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#26 + # source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#25 def on_match_current_line(node); end end -# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#23 +# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#22 RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) # Checks for expressions where there is a call to a predicate @@ -23055,7 +23279,7 @@ RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#60 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#56 def autocorrect(corrector, node); end # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#44 @@ -23063,13 +23287,13 @@ class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#69 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#65 def correction(*exceptions); end - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#80 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#76 def invalid_exceptions(exceptions); end - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#76 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#72 def valid_exceptions(exceptions); end end @@ -23239,7 +23463,7 @@ class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#96 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#98 def already_appropriate_call?(operand, dot_op); end # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#67 @@ -23248,31 +23472,31 @@ class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#83 def find_consistent_parts(grouped_operands); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#122 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#124 def most_left_indices(grouped_operands); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#152 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#154 def nilable?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#136 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#138 def operand_in_and?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#144 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#146 def operand_in_or?(node); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#113 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#115 def operand_nodes(operand, operand_nodes); end # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#74 def receiver_name_as_key(method, fully_receivers); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#102 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#104 def register_offense(operand, dot_operator); end end @@ -23388,10 +23612,10 @@ RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#26 class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#67 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#57 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#56 def on_casgn(node); end # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 @@ -23409,10 +23633,10 @@ class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#65 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#63 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#67 def on_or_asgn(node); end # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 @@ -23420,20 +23644,20 @@ class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#103 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#101 def handle_attribute_assignment(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#92 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#90 def handle_key_assignment(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#77 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#74 def multiple_self_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#87 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#85 def rhs_matches_lhs?(rhs, lhs); end end @@ -25018,6 +25242,8 @@ end # def do_something(unused) # end # @example IgnoreNotImplementedMethods: true (default) +# # with default value of `NotImplementedExceptions: ['NotImplementedError']` +# # # good # def do_something(unused) # raise NotImplementedError @@ -25026,6 +25252,13 @@ end # def do_something_else(unused) # fail "TODO" # end +# @example IgnoreNotImplementedMethods: true +# # with `NotImplementedExceptions: ['AbstractMethodError']` +# +# # good +# def do_something(unused) +# raise AbstractMethodError +# end # @example IgnoreNotImplementedMethods: false # # bad # def do_something(unused) @@ -25036,35 +25269,40 @@ end # fail "TODO" # end # -# source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#61 +# source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#70 class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base include ::RuboCop::Cop::Lint::UnusedArgument extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#66 + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 def not_implemented?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#81 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#128 + def allowed_exception_class?(node); end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#90 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#85 + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#94 def check_argument(variable); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#93 + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#102 def ignored_method?(body); end - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#98 + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#107 def message(variable); end class << self - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#71 + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#80 def autocorrect_incompatible_with; end - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#84 def joining_forces; end end end @@ -25482,6 +25720,57 @@ end # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) +# Checks for calls to `defined?` with strings or symbols as the argument. +# Such calls will always return `'expression'`, you probably meant to +# check for the existence of a constant, method, or variable instead. +# +# `defined?` is part of the Ruby syntax and doesn't behave like normal methods. +# You can safely pass in what you are checking for directly, without encountering +# a `NameError`. +# +# When interpolation is used, oftentimes it is not possible to write the +# code with `defined?`. In these cases, switch to one of the more specific methods: +# +# * `class_variable_defined?` +# * `const_defined?` +# * `method_defined?` +# * `instance_variable_defined?` +# * `binding.local_variable_defined?` +# +# @example +# +# # bad +# defined?('FooBar') +# defined?(:FooBar) +# defined?(:foo_bar) +# defined?('foo_bar') +# +# # good +# defined?(FooBar) +# defined?(foo_bar) +# +# # bad - interpolation +# bar = 'Bar' +# defined?("Foo::#{bar}::Baz") +# +# # good +# bar = 'Bar' +# defined?(Foo) && Foo.const_defined?(bar) && Foo.const_get(bar).const_defined?(:Baz) +# +# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#42 +class RuboCop::Cop::Lint::UselessDefined < ::RuboCop::Cop::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#46 + def on_defined?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#43 +RuboCop::Cop::Lint::UselessDefined::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#44 +RuboCop::Cop::Lint::UselessDefined::TYPES = T.let(T.unsafe(nil), Hash) + # Checks for useless `else` in `begin..end` without `rescue`. # # NOTE: This syntax is no longer valid on Ruby 2.6 or higher. @@ -25844,7 +26133,7 @@ class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#159 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148 def constructor?(node); end # @return [Boolean] @@ -25852,19 +26141,19 @@ class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#78 def contain_local_object?(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#140 def process_assignment(asgn_node, rhs_node); end # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#96 def process_assignment_node(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#138 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#131 def process_binary_operator_assignment(op_asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#129 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#123 def process_logical_operator_assignment(asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#110 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#109 def process_multiple_assignment(masgn_node); end # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#88 @@ -26008,18 +26297,18 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#258 + # source://rubocop//lib/rubocop/cop/lint/void.rb#259 def all_keys_entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#262 + # source://rubocop//lib/rubocop/cop/lint/void.rb#263 def all_values_entirely_literal?(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#236 + # source://rubocop//lib/rubocop/cop/lint/void.rb#237 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#230 + # source://rubocop//lib/rubocop/cop/lint/void.rb#231 def autocorrect_void_expression(corrector, node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#218 @@ -26054,7 +26343,7 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#245 + # source://rubocop//lib/rubocop/cop/lint/void.rb#246 def entirely_literal?(node); end # @return [Boolean] @@ -27030,7 +27319,7 @@ class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#182 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#181 def another_args?(node); end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#42 @@ -27049,7 +27338,7 @@ class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#163 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#162 def count_comments?; end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#126 @@ -27075,7 +27364,7 @@ class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#159 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#158 def irrelevant_line?(source_line); end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#110 @@ -27088,21 +27377,21 @@ class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#186 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#185 def node_with_heredoc?(node); end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#60 def normalize_foldable_types(types); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#167 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#166 def omit_length(descendant); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#178 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#177 def parenthesized?(node); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#190 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#189 def source_from_node_with_heredoc(node); end end @@ -27409,10 +27698,10 @@ module RuboCop::Cop::MultilineExpressionIndentation private - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#132 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#130 def argument_in_method_call(node, kind); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#188 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#186 def assignment_rhs(node); end # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#65 @@ -27440,12 +27729,12 @@ module RuboCop::Cop::MultilineExpressionIndentation # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#160 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#158 def disqualified_rhs?(candidate, ancestor); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#204 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#200 def grouped_expression?(node); end # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#73 @@ -27459,7 +27748,7 @@ module RuboCop::Cop::MultilineExpressionIndentation # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#208 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#204 def inside_arg_list_parentheses?(node, ancestor); end # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#99 @@ -27479,18 +27768,18 @@ module RuboCop::Cop::MultilineExpressionIndentation # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#198 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#194 def not_for_this_cop?(node); end # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#89 def operation_description(node, rhs); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#146 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#144 def part_of_assignment_rhs(node, candidate); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#184 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#182 def part_of_block_body?(candidate, block_node); end # Returns true if `node` is a conditional whose `body` and `condition` @@ -27498,29 +27787,29 @@ module RuboCop::Cop::MultilineExpressionIndentation # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#213 def postfix_conditional?(node); end # The []= operator and setters (a.b = c) are parsed as :send nodes. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#176 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#174 def valid_method_rhs_candidate?(candidate, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#165 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#163 def valid_rhs?(candidate, ancestor); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#180 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#178 def valid_rhs_candidate?(candidate, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#221 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217 def within_node?(inner, outer); end end @@ -28096,7 +28385,7 @@ class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#27 def class_or_struct_return_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#68 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#67 def literal_receiver?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#33 @@ -28106,22 +28395,22 @@ class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#56 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#55 def allowed_assignment?(value); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#73 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#72 def allowed_conditional_expression_on_rhs?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#63 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#62 def allowed_method_call_on_rhs?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#77 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#76 def contains_constant?(node); end end @@ -28168,114 +28457,112 @@ RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) # # source://rubocop//lib/rubocop/cop/naming/file_name.rb#39 class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#56 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#54 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#49 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#47 def struct_definition(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#134 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#132 def allowed_acronyms; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#96 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#94 def bad_filename_allowed?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#122 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#120 def check_definition_path_hierarchy?; end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#169 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#167 def defined_struct(node); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#126 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#124 def definition_path_hierarchy_roots; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#118 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#116 def expect_matching_definition?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#138 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#136 def filename_good?(basename); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#147 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#145 def find_class_or_module(node, namespace); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#165 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#163 def find_definition(node); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#65 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#63 def for_bad_filename(file_path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#114 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#112 def ignore_executable_scripts?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#202 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#200 def match?(expected); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#206 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#204 def match_acronym?(expected, name); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#174 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#172 def match_namespace(node, namespace, expected); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#92 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#90 def matching_class?(file_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#88 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#86 def matching_definition?(file_path); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#100 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#98 def no_definition_message(basename, file_path); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#106 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#104 def other_message(basename); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#188 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#186 def partial_matcher!(expected); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#77 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#75 def perform_class_and_module_naming_checks(file_path, basename); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#130 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#128 def regex; end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#240 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#238 def to_module_name(basename); end - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#213 + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#211 def to_namespace(path); end end -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#43 +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#41 RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#44 +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#42 RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#42 +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#40 RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#46 +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#44 RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) # Checks that your heredocs are using the configured case. @@ -28701,18 +28988,18 @@ class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#197 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#198 def defined_memoized?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#160 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#161 def method_definition?(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#205 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#206 def on_defined?(node); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#170 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#171 def on_or_asgn(node); end private @@ -28725,22 +29012,25 @@ class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#253 def matches?(method_name, ivar_assign); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#263 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#262 def message(variable); end # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#238 def style_parameter_name; end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#271 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#270 def suggested_var(method_name); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#277 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#276 def variable_name_candidates(method_name); end end # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#157 RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#158 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::INITIALIZE_METHODS = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#153 RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) @@ -29044,21 +29334,21 @@ class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 def correct_reassignment(corrector, node, offending_name, preferred_name); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#168 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#160 def message(node); end # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91 def offense_range(resbody); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#147 def preferred_name(variable_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#174 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#166 def shadowed_variable_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#161 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#156 def variable_name(node); end # @return [Boolean] @@ -29140,7 +29430,7 @@ class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#61 def message(style); end end @@ -29250,10 +29540,10 @@ class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#126 + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#125 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#126 + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#125 def on_defs(node); end # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 @@ -29265,7 +29555,7 @@ class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#134 + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#133 def on_sym(node); end # @return [Boolean] @@ -29275,7 +29565,7 @@ class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#143 + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#142 def message(style); end end @@ -30059,10 +30349,10 @@ end module RuboCop::Cop::RangeHelp private - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#141 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#140 def add_range(range1, range2); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#82 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#81 def column_offset_between(base_range, range); end # A range containing only the contents of a literal with delimiters (e.g. in @@ -30071,7 +30361,7 @@ module RuboCop::Cop::RangeHelp # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#32 def contents_range(node); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#100 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#99 def directions(side); end # Returns the column attribute of the range, except if the range is on @@ -30079,28 +30369,28 @@ module RuboCop::Cop::RangeHelp # line, in which case 1 is subtracted from the column value. This gives # the column as it appears when viewing the file in an editor. # - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#92 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#91 def effective_column(range); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#109 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#108 def final_pos(src, pos, increment, continuations, newlines, whitespace); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#117 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#116 def move_pos(src, pos, step, condition, regexp); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#123 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#122 def move_pos_str(src, pos, step, condition, needle); end # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#36 def range_between(start_pos, end_pos); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#73 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#72 def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#134 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#133 def range_with_comments(node); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#130 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#129 def range_with_comments_and_lines(node); end # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#40 @@ -31056,6 +31346,7 @@ module RuboCop::Cop::Style; end # private :bar, :baz # private *%i[qux quux] # private *METHOD_NAMES +# private *private_methods # # end # @example AllowModifiersOnSymbols: false @@ -31065,6 +31356,7 @@ module RuboCop::Cop::Style; end # private :bar, :baz # private *%i[qux quux] # private *METHOD_NAMES +# private *private_methods # # end # @example AllowModifiersOnAttrs: true (default) @@ -31094,106 +31386,116 @@ module RuboCop::Cop::Style; end # # end # -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#113 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#143 def access_modifier_with_attr?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#134 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#136 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#146 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#148 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#205 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#218 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#222 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#193 def allow_modifiers_on_attrs?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#183 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#189 def allow_modifiers_on_symbols?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#164 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#163 + def allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#170 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#279 - def def_source(node, def_node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 + def correctable_group_offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#305 + def def_source(node, def_nodes); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#240 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 def find_argument_less_modifier_node(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#229 - def find_corresponding_def_node(node); end + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#246 + def find_corresponding_def_nodes(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#197 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#210 def group_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#201 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#214 def inline_style?; end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#271 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#295 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#236 def message(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#197 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#179 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#185 def percent_symbol_array?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#275 - def remove_node(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#299 + def remove_nodes(corrector, *nodes); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#254 - def replace_def(corrector, node, def_node); end + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#279 + def replace_defs(corrector, node, def_nodes); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#213 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#226 def right_siblings_same_inline_method?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#248 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#273 def select_grouped_def_nodes(node); end end -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#133 RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#119 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#121 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#124 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#126 RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#129 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for grouping of accessors in `class` and `module` bodies. @@ -32014,6 +32316,7 @@ RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # bad # (array1 & array2).any? # (array1 & array2).empty? +# (array1 & array2).none? # # # good # array1.intersect?(array2) @@ -32031,46 +32334,46 @@ 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#49 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#50 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#65 + # 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#79 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#80 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 + # 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#94 + # 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#106 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#107 def message(receiver, argument, method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#103 def straight?(method_name); end end -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#74 RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#78 RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) # Checks for uses of "*" as a substitute for _join_. @@ -32885,27 +33188,27 @@ RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(n # Corrector to correct conditional assignment in `case` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#604 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#602 class RuboCop::Cop::Style::CaseCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#609 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#607 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#619 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#617 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#639 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#637 def extract_branches(case_node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#633 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#631 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#649 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#647 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -33026,27 +33329,27 @@ class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#81 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#231 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#228 def branch_conditions(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#249 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#246 def class_reference?(node); end # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#166 def collect_conditions(node, target, conditions); end - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#220 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#217 def condition_from_binary_op(lhs, rhs, target); end - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#202 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#201 def condition_from_equality_node(node, target); end - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#213 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#210 def condition_from_include_or_cover_node(node, target); end - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#208 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#206 def condition_from_match_node(node, target); end # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#185 @@ -33054,13 +33357,13 @@ class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#240 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#237 def const_reference?(node); end - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#258 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#255 def correction_range(node); end - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#253 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#250 def deparenthesize(node); end # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#102 @@ -33080,14 +33383,14 @@ class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#274 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#271 def regexp_with_named_captures?(node); end # Named captures work with `=~` (if regexp is on lhs) and with `match` (both sides) # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#263 + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#260 def regexp_with_working_captures?(node); end # @return [Boolean] @@ -34212,25 +34515,25 @@ class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#60 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#63 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#83 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#86 def offensive?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#95 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#98 def rbs_inline_annotation?(line, comment); end - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#70 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#73 def register_offense(comment, matched_keyword); end - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#91 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#94 def source_line(comment); end end @@ -34246,12 +34549,18 @@ RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#61 +RuboCop::Cop::Style::CommentedKeyword::METHOD_DEFINITION = T.let(T.unsafe(nil), Regexp) + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#49 RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#58 RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#60 +RuboCop::Cop::Style::CommentedKeyword::SUBCLASS_DEFINITION = T.let(T.unsafe(nil), Regexp) + # Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum. # # This cop supports autocorrection for `if/elsif/else` bad style only. @@ -34460,7 +34769,7 @@ RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # bar = 2 # end # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#210 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#207 class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::Style::ConditionalAssignmentHelper include ::RuboCop::Cop::ConfigurableEnforcedStyle @@ -34469,88 +34778,88 @@ class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base # The shovel operator `<<` does not have its own type. It is a `send` # type. # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#228 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#224 def assignment_type?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#309 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#305 def candidate_condition?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#264 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#260 def on_case(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#274 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#270 def on_case_match(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#250 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#246 def on_if(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_op_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 def on_or_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#244 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#240 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#315 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#311 def allowed_single_line?(branches); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#386 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#384 def allowed_statements?(branches); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#311 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#307 def allowed_ternary?(assignment); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#319 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#315 def assignment_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#363 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#361 def assignment_types_match?(*nodes); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#378 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#376 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#304 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#300 def candidate_node?(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#286 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#282 def check_assignment_to_condition(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#369 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#367 def check_node(node, branches); end # If `Layout/LineLength` is enabled, we do not want to introduce an @@ -34563,74 +34872,74 @@ class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#402 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#400 def correction_exceeds_line_limit?(node, branches); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#433 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#431 def include_ternary?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#356 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#354 def lhs_all_match?(branches); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#421 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#419 def line_length_cop_enabled?; end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#414 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#412 def longest_line(node, assignment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#410 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#408 def longest_line_exceeds_line_limit?(node, assignment); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#425 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#423 def max_line_length; end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#340 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#338 def move_assignment_inside_condition(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#330 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#328 def move_assignment_outside_condition(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#429 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#427 def single_line_conditions_only?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#352 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#350 def ternary_condition?(node); end end -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#219 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#215 RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#217 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#213 RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#221 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#217 RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#220 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#216 RuboCop::Cop::Style::ConditionalAssignment::LINE_LENGTH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#222 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#218 RuboCop::Cop::Style::ConditionalAssignment::MAX = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#216 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#212 RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#223 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#219 RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#218 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#214 RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # Helper module to provide common methods to classes needed for the @@ -34642,7 +34951,7 @@ module RuboCop::Cop::Style::ConditionalAssignmentHelper # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#64 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#60 def end_with_eq?(sym); end # `elsif` branches show up in the `node` as an `else`. We need @@ -34659,10 +34968,10 @@ module RuboCop::Cop::Style::ConditionalAssignmentHelper # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#28 def expand_when_branches(when_branches); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#55 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#51 def indent(cop, source); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#37 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#36 def lhs(node); end # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#32 @@ -34672,21 +34981,21 @@ module RuboCop::Cop::Style::ConditionalAssignmentHelper # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#109 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#106 def assignment_rhs_exist?(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#70 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#66 def expand_elsif(node, elsif_branches = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#96 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#92 def lhs_for_casgn(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#83 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#79 def lhs_for_send(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#105 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#102 def setter_method?(method_name); end end @@ -34705,24 +35014,24 @@ RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), # Helper module to provide common methods to ConditionalAssignment # correctors # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#440 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#438 module RuboCop::Cop::Style::ConditionalCorrectorHelper - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#459 def assignment(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#490 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#488 def correct_branches(corrector, branches); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#467 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#465 def correct_if_branches(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#441 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#439 def remove_whitespace_in_branches(corrector, branch, condition, column); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#477 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#475 def replace_branch_assignment(corrector, branch); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#452 def white_space_range(node, column); end end @@ -34770,37 +35079,34 @@ class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#51 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#96 + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#87 def visibility_declaration_for?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#76 + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#69 def class_or_module_scope?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#62 + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#61 def ignore_modules?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#100 + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#91 def match_name?(name, constant_name); end - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#70 - def message(node); end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#66 + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#65 def module?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#87 + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#80 def visibility_declaration?(node); end end @@ -35019,6 +35325,55 @@ end # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#43 RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) +# Check for chained `dig` calls that can be collapsed into a single `dig`. +# +# @example +# # bad +# x.dig(:foo).dig(:bar).dig(:baz) +# x.dig(:foo, :bar).dig(:baz) +# x.dig(:foo, :bar)&.dig(:baz) +# +# # good +# x.dig(:foo, :bar, :baz) +# +# # good - `dig`s cannot be combined +# x.dig(:foo).bar.dig(:baz) +# +# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#25 +class RuboCop::Cop::Style::DigChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::DigHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#34 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#34 + def on_send(node); end + + private + + # Walk up the method chain while the receiver is `dig` with arguments. + # + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#50 + def inspect_chain(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#65 + def invalid_arguments?(arguments); end + + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#75 + def register_offense(node, range, arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#31 +RuboCop::Cop::Style::DigChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#32 +RuboCop::Cop::Style::DigChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for places where the `#\_\_dir\_\_` method can replace more # complex constructs to retrieve a canonicalized absolute path to the # current file. @@ -37145,6 +37500,54 @@ RuboCop::Cop::Style::FileEmpty::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/file_empty.rb#32 RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Use `File::NULL` instead of hardcoding the null device (`/dev/null` on Unix-like +# OSes, `NUL` or `NUL:` on Windows), so that code is platform independent. +# Only looks for full string matches, substrings within a longer string are not +# considered. +# +# NOTE: Uses inside arrays and hashes are ignored. +# +# @example +# # bad +# '/dev/null' +# 'NUL' +# 'NUL:' +# +# # good +# File::NULL +# +# # ok - inside an array +# null_devices = %w[/dev/null nul] +# +# # ok - inside a hash +# { unix: "/dev/null", windows: "nul" } +# +# source://rubocop//lib/rubocop/cop/style/file_null.rb#39 +class RuboCop::Cop::Style::FileNull < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/file_null.rb#45 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_null.rb#63 + def acceptable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_null.rb#59 + def invalid_string?(value); end +end + +# source://rubocop//lib/rubocop/cop/style/file_null.rb#43 +RuboCop::Cop::Style::FileNull::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_null.rb#42 +RuboCop::Cop::Style::FileNull::REGEXP = T.let(T.unsafe(nil), Regexp) + # Favor `File.(bin)read` convenience methods. # # @example @@ -37219,6 +37622,59 @@ RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe( # source://rubocop//lib/rubocop/cop/style/file_read.rb#41 RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for usage of `File.open` in append mode with empty block. +# +# Such a usage only creates a new file, but it doesn't update +# timestamps for an existing file, which might have been the intention. +# +# For example, for an existing file `foo.txt`: +# +# ruby -e "puts File.mtime('foo.txt')" +# # 2024-11-26 12:17:23 +0100 +# +# ruby -e "File.open('foo.txt', 'a') {}" +# +# ruby -e "puts File.mtime('foo.txt')" +# # 2024-11-26 12:17:23 +0100 -> unchanged +# +# If the intention was to update timestamps, `FileUtils.touch('foo.txt')` +# should be used instead. +# +# @example +# # bad +# File.open(filename, 'a') {} +# File.open(filename, 'a+') {} +# +# # good +# FileUtils.touch(filename) +# +# source://rubocop//lib/rubocop/cop/style/file_touch.rb#36 +class RuboCop::Cop::Style::FileTouch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/file_touch.rb#47 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_touch.rb#54 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_touch.rb#69 + def empty_block?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/file_touch.rb#44 +RuboCop::Cop::Style::FileTouch::APPEND_FILE_MODES = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/file_touch.rb#39 +RuboCop::Cop::Style::FileTouch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_touch.rb#42 +RuboCop::Cop::Style::FileTouch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Favor `File.(bin)write` convenience methods. # # NOTE: There are different method signatures between `File.write` (class method) @@ -37423,33 +37879,32 @@ RuboCop::Cop::Style::FloatDivision::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # source://rubocop//lib/rubocop/cop/style/for.rb#45 class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/for.rb#65 + # source://rubocop//lib/rubocop/cop/style/for.rb#64 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/for.rb#54 + # source://rubocop//lib/rubocop/cop/style/for.rb#53 def on_for(node); end - # source://rubocop//lib/rubocop/cop/style/for.rb#65 + # source://rubocop//lib/rubocop/cop/style/for.rb#64 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/for.rb#84 + # source://rubocop//lib/rubocop/cop/style/for.rb#83 def suspect_enumerable?(node); end end -# source://rubocop//lib/rubocop/cop/style/for.rb#50 +# source://rubocop//lib/rubocop/cop/style/for.rb#49 RuboCop::Cop::Style::For::EACH_LENGTH = T.let(T.unsafe(nil), Integer) -# source://rubocop//lib/rubocop/cop/style/for.rb#51 +# source://rubocop//lib/rubocop/cop/style/for.rb#50 RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/for.rb#52 +# source://rubocop//lib/rubocop/cop/style/for.rb#51 RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # Enforces the use of a single string formatting utility. @@ -38238,13 +38693,13 @@ class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#138 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#137 def allowed_splat_argument?; end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#131 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#130 def args_to_hash(args); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#118 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#117 def multi_argument(node); end # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#94 @@ -38979,24 +39434,24 @@ RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), St # Corrector to correct conditional assignment in `if` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#559 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#557 class RuboCop::Cop::Style::IfCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#564 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#562 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#568 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#566 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#582 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#580 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#589 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#587 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -39059,43 +39514,43 @@ class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#69 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#68 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#150 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#149 def allow_if_modifier?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#146 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#145 def allow_if_modifier_in_else_branch?(else_branch); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#88 + # 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#117 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#116 def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#109 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#108 def correct_to_elsif_from_modifier_form(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#135 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#134 def find_end_range(node); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#142 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#141 def if_condition_range(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#131 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#130 def then?(node); end end -# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#66 +# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#65 RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) # Checks for `if` and `unless` statements that would fit on one line if @@ -39443,33 +39898,43 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#54 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#55 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#93 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#102 def build_else_branch(second_condition); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#84 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#93 def build_expression(expr); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#75 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#84 def correct_elsif(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#40 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#42 def message(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#66 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#75 def replacement(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#113 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#122 def require_argument_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#62 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#63 + def require_newline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#67 def use_block_in_branches?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#71 + def use_return_with_argument?(node); end end # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 @@ -39685,61 +40150,61 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#70 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#69 def inverse_block?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#61 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#60 def inverse_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#77 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#77 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#177 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#176 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#120 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#111 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#127 def correct_inverse_selector(block, corrector); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#181 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#180 def dot_range(loc); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#166 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#165 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#149 def inverse_blocks; end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#145 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#144 def inverse_methods; end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#191 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#190 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#153 def negated?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#162 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#161 def not_to_receiver(node, method_call); end # When comparing classes, `!(Integer < Numeric)` is not the same as @@ -39747,39 +40212,39 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#172 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#171 def possible_class_hierarchy_check?(lhs, rhs, method); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#157 def relational_comparison_with_safe_navigation?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#185 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#184 def remove_end_parenthesis(corrector, node, method, method_call); end class << self - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#56 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#55 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#52 +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#51 RuboCop::Cop::Style::InverseMethods::CAMEL_CASE = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#49 +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#48 RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#50 +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#49 RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#48 +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#47 RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#51 +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#50 RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#54 +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#53 RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for usages of `unless` which can be replaced by `if` with inverted condition. @@ -39932,8 +40397,8 @@ RuboCop::Cop::Style::IpAddresses::MSG = T.let(T.unsafe(nil), String) # When passing an existing hash as keyword arguments, provide additional arguments # directly rather than using `merge`. # -# Providing arguments directly is more performant, than using `merge`, and -# also leads to a shorter and simpler code. +# Providing arguments directly is more performant than using `merge`, and +# also leads to shorter and simpler code. # # @example # # bad @@ -40116,34 +40581,34 @@ class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#29 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#28 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#67 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#66 def explicit_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#63 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#62 def implicit_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#50 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#55 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#54 def prefer(node); end end -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#25 RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#27 +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for string literal concatenation at @@ -40420,10 +40885,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.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def loc(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.34.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.36.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def text(*_arg0, **_arg1, &_arg2); end # A magic comment can contain one value (normal style) or @@ -41247,7 +41712,7 @@ class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Ba # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#94 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#96 def any_assignment?(node); end # @return [Boolean] @@ -41260,7 +41725,7 @@ class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Ba # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#58 def ineligible_node?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#117 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#113 def offense_range(node); end # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: @@ -41271,7 +41736,7 @@ class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Ba # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#86 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#88 def parenthesized_it_method_in_block?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#51 @@ -41284,7 +41749,7 @@ class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Ba # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#110 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#109 def variable_in_mass_assignment?(variable_name, node); end end @@ -41721,38 +42186,68 @@ RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) # Checks for the presence of `method_missing` without also # defining `respond_to_missing?`. # +# Not defining `respond_to_missing?` will cause metaprogramming +# methods like `respond_to?` to behave unexpectedly: +# +# [source,ruby] +# ---- +# class StringDelegator +# def initialize(string) +# @string = string +# end +# +# def method_missing(name, *args) +# @string.send(name, *args) +# end +# end +# +# delegator = StringDelegator.new("foo") +# # Claims to not respond to `upcase`. +# delegator.respond_to?(:upcase) # => false +# # But you can call it. +# delegator.upcase # => FOO +# ---- +# # @example # # bad # def method_missing(name, *args) -# # ... +# if @delegate.respond_to?(name) +# @delegate.send(name, *args) +# else +# super +# end # end # # # good # def respond_to_missing?(name, include_private) -# # ... +# @delegate.respond_to?(name) || super # end # # def method_missing(name, *args) -# # ... +# if @delegate.respond_to?(name) +# @delegate.send(name, *args) +# else +# super +# end # end # -# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#24 +# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#54 class RuboCop::Cop::Style::MissingRespondToMissing < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#27 + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#57 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#27 + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#57 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#37 + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#67 def implements_respond_to_missing?(node); end end -# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#25 +# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#55 RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) # Checks for grouping of mixins in `class` and `module` bodies. @@ -42589,55 +43084,55 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # Some of these patterns may not actually return an immutable object, # but we want to consider them immutable for this cop. # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#224 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#223 def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#241 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#240 def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#216 def splat_value(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#169 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#168 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#158 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#157 def check(value); end - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#208 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#207 def correct_splat_expansion(corrector, expr, splat_value); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#200 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#199 def frozen_regexp_or_range_literals?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#190 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#189 def immutable_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#184 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#183 def mutable_literal?(value); end - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#141 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#140 def on_assignment(value); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#204 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#203 def requires_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#194 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#193 def shareable_constant_value?(node); end - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#149 + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#148 def strict_check(value); end end @@ -42798,7 +43293,7 @@ class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#39 def double_negation?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#49 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#50 def on_if(node); end # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#45 @@ -42806,41 +43301,41 @@ class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#94 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#97 def correct_negated_condition(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#90 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#93 def corrected_ancestor?(node); end # Collect the entire else branch, including whitespace and comments # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#125 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#127 def else_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#68 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#71 def if_else?(node); end # Collect the entire if branch, including whitespace and comments # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#116 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#118 def if_range(node); end - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#84 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#87 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#79 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#82 def negated_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#107 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#109 def swap_branches(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#73 + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#76 def unwrap_begin_nodes(node); end class << self @@ -43132,22 +43627,22 @@ class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#25 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#24 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#40 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#39 def autocorrect(corrector, if_node); end - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#47 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#46 def remove_parentheses(source); end - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#53 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#54 def replace_loc_and_whitespace(corrector, range, replacement); end end -# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#23 +# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#22 RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) # Use `next` to skip iteration instead of a condition at the end. @@ -44013,8 +44508,8 @@ end RuboCop::Cop::Style::ObjectThen::MSG = T.let(T.unsafe(nil), String) # Checks for uses of if/then/else/end constructs on a single line. -# AlwaysCorrectToMultiline config option can be set to true to auto-convert all offenses to -# multi-line constructs. When AlwaysCorrectToMultiline is false (default case) the +# `AlwaysCorrectToMultiline` config option can be set to true to autocorrect all offenses to +# multi-line constructs. When `AlwaysCorrectToMultiline` is false (default case) the # autocorrect will first try converting them to ternary operators. # # @example @@ -44039,61 +44534,77 @@ RuboCop::Cop::Style::ObjectThen::MSG = T.let(T.unsafe(nil), String) # else # baz # end +# @example AlwaysCorrectToMultiline: false (default) +# # bad +# if cond then run else dont end # -# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#33 +# # good +# cond ? run : dont +# @example AlwaysCorrectToMultiline: true +# # bad +# if cond then run else dont end +# +# # good +# if cond +# run +# else +# dont +# end +# +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#52 class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::OnNormalIfUnless extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#42 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#61 def on_normal_if_unless(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#100 def always_multiline?; end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#63 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#82 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#104 def cannot_replace_to_ternary?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#97 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#118 def expr_replacement(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#118 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#139 def keyword_with_changed_precedence?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#78 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#111 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#132 def method_call_with_changed_precedence?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#103 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#124 def requires_parentheses?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#71 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#90 def ternary_correction(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#89 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#110 def ternary_replacement(node); end end -# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#39 +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#58 RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) # Flags uses of OpenStruct, as it is now officially discouraged @@ -44162,22 +44673,22 @@ class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#75 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#74 def insert_space_after?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#58 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#57 def invalid_syntax_argument?(argument); end # Checks for an acceptable case of `foo.+(bar).baz`. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#52 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#51 def method_call_with_parenthesized_arg?(argument); end - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#64 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#63 def wrap_in_parentheses_if_chained(corrector, node); end end @@ -44367,7 +44878,7 @@ class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#80 def take_variable_and_default_from_ternary(node); end - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#85 + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#84 def take_variable_and_default_from_unless(node); end end @@ -44397,7 +44908,7 @@ class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RescueNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#124 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#119 def implicit_self_getter?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#31 @@ -44409,55 +44920,55 @@ class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base # This makes the sorting algorithm work for expressions such as # `self.a, self.b = b, a`. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#117 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#112 def add_self_to_getters(right_elements); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#64 - def allowed_lhs?(node); end + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#61 + def allowed_lhs?(elements); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#58 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#55 def allowed_masign?(lhs_elements, rhs_elements); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#72 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#67 def allowed_rhs?(node); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#84 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#79 def assignment_corrector(node, rhs, order); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#49 - def autocorrect(corrector, node, lhs, rhs); end + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#48 + def autocorrect(corrector, node, rhs); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#100 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#95 def find_valid_order(left_elements, right_elements); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#183 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#178 def modifier_statement?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#80 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#75 def return_of_method_call?(node); end end # Helper class necessitated by silly design of TSort prior to Ruby 2.1 # Newer versions have a better API, but that doesn't help us # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#128 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#123 class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter include ::TSort extend ::RuboCop::AST::NodePattern::Macros # @return [AssignmentSorter] a new instance of AssignmentSorter # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#141 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 def initialize(assignments); end # `lhs` is an assignment method call like `obj.attr=` or `ary[idx]=`. @@ -44465,81 +44976,81 @@ class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#170 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#165 def accesses?(rhs, lhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#163 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#158 def dependency?(lhs, rhs); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#139 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#134 def matching_calls(param0, param1, param2); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#149 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#144 def tsort_each_child(assignment); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#145 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#140 def tsort_each_node(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#131 def uses_var?(param0, param1); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#133 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#128 def var_name(param0 = T.unsafe(nil)); end end # An internal class for correcting parallel assignment # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#190 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#185 class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector include ::RuboCop::Cop::Alignment # @return [GenericCorrector] a new instance of GenericCorrector # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#195 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#190 def initialize(node, rhs, modifier, config, new_elements); end # Returns the value of attribute config. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#188 def config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#203 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#198 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#207 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#202 def correction_range; end # Returns the value of attribute node. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#188 def node; end # Returns the value of attribute rescue_result. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#188 def rescue_result; end # Returns the value of attribute rhs. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#188 def rhs; end protected - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#213 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#208 def assignment; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#234 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 def cop_config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#230 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#225 def extract_sources(node); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#214 def source(node, loc); end end @@ -44549,37 +45060,37 @@ RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) # An internal class for correcting parallel assignment # guarded by if, unless, while, or until # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#271 class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#272 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#286 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#281 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#292 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#287 def modifier_range(node); end end # An internal class for correcting parallel assignment # protected by rescue # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#236 class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#242 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#237 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#253 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#248 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#264 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#259 def begin_correction(rescue_result); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#259 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#254 def def_correction(rescue_result); end end @@ -45606,6 +46117,19 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # Checks for unnecessary conditional expressions. # +# NOTE: Since the intention of the comment cannot be automatically determined, +# autocorrection is not applied when a comment is used, as shown below: +# +# [source,ruby] +# ----- +# if b +# # Important note. +# b +# else +# c +# end +# ----- +# # @example # # bad # a = b ? b : c @@ -45630,12 +46154,13 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # c # end # -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#32 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#45 class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#43 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#56 def on_if(node); end private @@ -45645,116 +46170,119 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#167 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#182 def argument_with_operator?(argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#142 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#159 def asgn_type?(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#76 + def autocorrect(corrector, node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#132 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#149 def branches_have_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#146 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#163 def branches_have_method?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#240 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#255 def correct_ternary(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#187 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#202 def else_source(else_branch, arithmetic_operation); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#213 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#228 def else_source_if_has_assignment(else_branch); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#203 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#218 def else_source_if_has_method(else_branch); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#175 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#190 def if_source(if_branch, arithmetic_operation); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#223 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#238 def make_ternary_form(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#68 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#79 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#97 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#72 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#90 def range_of_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#88 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#105 def redundant_condition?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#255 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#270 def require_braces?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#248 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263 def require_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#161 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#176 def same_method?(if_branch, else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#155 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#170 def single_argument_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#104 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#121 def synonymous_condition_and_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#259 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#274 def use_arithmetic_operation?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#100 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#117 def use_hash_key_access?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#96 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#113 def use_hash_key_assignment?(else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#92 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#109 def use_if_branch?(else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#278 def without_argument_parentheses_method?(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#52 RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#36 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#50 RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#51 RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) # Checks for redundant returning of true/false in conditionals. @@ -46709,12 +47237,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#201 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#202 def argument_is_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#166 def argument_newline?(node); end # @return [Boolean] @@ -46722,12 +47250,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#106 def ends_with_backslash_without_comment?(source_line); end - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#181 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#182 def find_node_for_line(last_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#150 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#151 def inside_string_literal?(range, token); end # @return [Boolean] @@ -46736,7 +47264,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base def inside_string_literal_or_method_with_argument?(range); end # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#139 - def inspect_eof_line_continuation; end + def inspect_end_of_ruby_code_line_continuation; end # @return [Boolean] # @@ -46745,7 +47273,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#208 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#209 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -46755,7 +47283,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#158 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#159 def method_with_argument?(current_token, next_token); end # @return [Boolean] @@ -46770,12 +47298,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#187 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#188 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#212 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#213 def start_with_arithmetic_operator?(source_line); end # @return [Boolean] @@ -47119,7 +47647,7 @@ class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#69 def preferred_argument(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#84 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#85 def replacement(regexp_node); end end @@ -47499,41 +48027,41 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#86 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#84 def on_args(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#116 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#90 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#88 def on_blockarg(node); end # Using self.x to distinguish from local variable x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#79 def on_def(node); end # Using self.x to distinguish from local variable x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#79 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 def on_if(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#104 + # 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#99 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#96 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#94 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#92 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#116 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#74 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#73 def on_op_asgn(node); end # Assignment of self.x @@ -47541,35 +48069,35 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 def on_or_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#108 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#104 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#196 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#189 def add_lhs_to_local_variables_scopes(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#204 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#197 def add_masgn_lhs_variables(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#210 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#203 def add_match_var_scopes(in_pattern_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#138 def add_scope(node, local_variables = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#190 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#183 def allow_self(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#150 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 def allowed_send_node?(node); end # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: @@ -47580,15 +48108,15 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#159 def it_method_in_block?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#175 def on_argument(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#167 def regular_method_call?(node); end class << self @@ -47631,40 +48159,40 @@ class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#53 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#53 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#53 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#53 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#69 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#71 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#96 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#98 def redundant_nonself_assignment?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#86 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#88 def redundant_self_assignment?(param0 = T.unsafe(nil), param1); end private - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#112 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#114 def correction_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#83 def method_returning_self?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#107 def redundant_assignment?(node); end end @@ -47698,13 +48226,12 @@ RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#25 class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#32 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#31 def bad_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#36 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#35 def on_lvasgn(node); end private @@ -47733,7 +48260,7 @@ class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base def use_if_and_else_branch?(expression); end end -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#29 +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#28 RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String) # Identifies instances of sorting and then @@ -48337,10 +48864,10 @@ class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70 def correct_rescue_block(corrector, node, parenthesized); end - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#96 + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#95 def heredoc_end(node); end - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86 + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#85 def indentation_and_offset(node, parenthesized); end # @return [Boolean] @@ -48946,7 +49473,7 @@ RuboCop::Cop::Style::Sample::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/sample.rb#34 RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Looks for places where an subset of an Enumerable (array, +# Looks for places where a subset of an Enumerable (array, # range, set, etc.; see note below) is calculated based on a `Regexp` # match, and suggests `grep` or `grep_v` instead. # @@ -49072,25 +49599,25 @@ class RuboCop::Cop::Style::SelfAssignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#94 + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#88 def apply_autocorrect(corrector, node, rhs, operator, new_rhs); end - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#74 + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#70 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#89 + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#84 def autocorrect_boolean_node(corrector, node, rhs); end - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#84 + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#80 def autocorrect_send_node(corrector, node, rhs); end # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#39 def check(node, var_type); end - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#62 + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#60 def check_boolean_node(node, rhs, var_name, var_type); end - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#50 + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#49 def check_send_node(node, rhs, var_name, var_type); end class << self @@ -49418,37 +49945,37 @@ class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#122 def on_rescue(node); end - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#134 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#133 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#206 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#205 def allow(method_name, node); end - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#188 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#187 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#167 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#166 def check_scope(method_name, node); end - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#180 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#179 def check_send(method_name, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#200 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#199 def command_or_kernel_call?(name, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#149 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#148 def custom_fail_defined?; end - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#210 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#209 def each_command_or_kernel_call(method_name, node); end - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#156 + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#155 def message(method_name); end end @@ -49486,22 +50013,27 @@ RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DigHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#46 + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 - def single_argument_dig?(param0 = T.unsafe(nil)); end + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#66 + def ignore_dig_chain?(node); end end -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#40 RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#37 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks whether the block parameters of a single-line @@ -49579,8 +50111,13 @@ RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) # Checks for single-line `do`...`end` block. # # In practice a single line `do`...`end` is autocorrected when `EnforcedStyle: semantic` -# in `Style/BlockDelimiters`. The autocorrection maintains the `do` ... `end` syntax to -# preserve semantics and does not change it to `{`...`}` block. +# is configured for `Style/BlockDelimiters`. The autocorrection maintains the +# `do` ... `end` syntax to preserve semantics and does not change it to `{`...`}` block. +# +# NOTE: If `InspectBlocks` is set to `true` for `Layout/RedundantLineBreak`, blocks will +# be autocorrected to be on a single line if possible. This cop respects that configuration +# by not registering an offense if it would subsequently cause a +# `Layout/RedundantLineBreak` offense. # # @example # @@ -49598,26 +50135,29 @@ RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) # # good # ->(arg) { bar(arg) } # -# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#28 +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#33 class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckSingleLineSuitability extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 + # 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#34 + # 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#55 + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#62 def do_line(node); end - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#63 - def x(corrector, node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#70 + def single_line_blocks_preferred?; end end -# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#31 +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#37 RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String) # Checks for single-line method definitions that contain a body. @@ -49826,7 +50366,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#261 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#260 def allow_modifier?; end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 @@ -49875,13 +50415,13 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#265 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#264 def outer_condition_modify_form?(node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#254 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#253 def parenthesized_method_arguments(node); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#243 def replace_condition(condition); end # @return [Boolean] @@ -50328,70 +50868,70 @@ class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#69 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#68 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#73 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#72 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#62 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#61 def string_concatenation?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#116 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#115 def collect_parts(node, parts = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#141 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#140 def corrected_ancestor?(node); end - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#108 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#107 def find_topmost_plus_node(node); end - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#162 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#161 def handle_quotes(parts); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#135 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#134 def heredoc?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#98 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#97 def line_end_concatenation?(node); end - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#172 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#171 def mode; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#127 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#126 def plus_node?(node); end - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#86 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#85 def register_offense(topmost_plus_node, parts); end - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#145 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#144 def replacement(parts); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#168 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#167 def single_quoted?(str_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#131 + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#130 def uncorrectable?(part); end end -# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#58 +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#57 RuboCop::Cop::Style::StringConcatenation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#59 +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#58 RuboCop::Cop::Style::StringConcatenation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for the use of strings as keys in hashes. The use of @@ -50844,7 +51384,7 @@ class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/swap_values.rb#47 def allowed_assignment?(node); end - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#104 + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#93 def correction_range(tmp_assign, y_assign); end # source://rubocop//lib/rubocop/cop/style/swap_values.rb#81 @@ -50856,7 +51396,7 @@ class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/swap_values.rb#75 def replacement(x_assign); end - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#95 + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#89 def rhs(node); end # @return [Boolean] @@ -51153,38 +51693,38 @@ RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#499 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#497 class RuboCop::Cop::Style::TernaryCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#504 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#502 def correct(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#508 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#506 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#522 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#520 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#535 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#533 def element_assignment?(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#539 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#537 def extract_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#552 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#550 def move_branch_inside_condition(corrector, branch, assignment); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#547 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#545 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#526 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#524 def ternary(node); end end end @@ -52385,15 +52925,15 @@ class RuboCop::Cop::Style::VariableInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#25 + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#24 def on_node_with_interpolations(node); end private - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#35 + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#34 def message(range); end - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#39 + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#38 def var_nodes(nodes); end end @@ -53062,15 +53602,21 @@ end # # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#6 module RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#11 + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#19 + def maximum_target_ruby_version(version); end + + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#15 def minimum_target_ruby_version(version); end + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#11 + def required_maximum_ruby_version; end + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#7 def required_minimum_ruby_version; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#15 + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#23 def support_target_ruby_version?(version); end end @@ -53875,37 +54421,37 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force private - # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + # source://rubocop//lib/rubocop/cop/variable_force.rb#374 def after_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + # source://rubocop//lib/rubocop/cop/variable_force.rb#374 def after_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + # source://rubocop//lib/rubocop/cop/variable_force.rb#374 def after_leaving_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + # source://rubocop//lib/rubocop/cop/variable_force.rb#374 def before_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + # source://rubocop//lib/rubocop/cop/variable_force.rb#374 def before_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + # source://rubocop//lib/rubocop/cop/variable_force.rb#374 def before_leaving_scope(arg); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#351 + # source://rubocop//lib/rubocop/cop/variable_force.rb#346 def descendant_reference(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#341 + # source://rubocop//lib/rubocop/cop/variable_force.rb#336 def each_descendant_reference(loop_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#326 + # source://rubocop//lib/rubocop/cop/variable_force.rb#321 def find_variables_in_loop(loop_node); end # This is called for each scope recursively. @@ -53921,7 +54467,7 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#307 + # source://rubocop//lib/rubocop/cop/variable_force.rb#302 def mark_assignments_as_referenced_in_loop(node); end # @api private @@ -53936,7 +54482,7 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#243 + # source://rubocop//lib/rubocop/cop/variable_force.rb#238 def process_loop(node); end # @api private @@ -53951,17 +54497,17 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#258 + # source://rubocop//lib/rubocop/cop/variable_force.rb#253 def process_rescue(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#277 + # source://rubocop//lib/rubocop/cop/variable_force.rb#272 def process_scope(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#296 + # source://rubocop//lib/rubocop/cop/variable_force.rb#291 def process_send(node); end # @api private @@ -53976,7 +54522,7 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#231 + # source://rubocop//lib/rubocop/cop/variable_force.rb#226 def process_variable_multiple_assignment(node); end # @api private @@ -53986,12 +54532,12 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#238 + # source://rubocop//lib/rubocop/cop/variable_force.rb#233 def process_variable_referencing(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#269 + # source://rubocop//lib/rubocop/cop/variable_force.rb#264 def process_zero_arity_super(node); end # @api private @@ -54002,12 +54548,12 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#363 + # source://rubocop//lib/rubocop/cop/variable_force.rb#357 def scanned_node?(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#367 + # source://rubocop//lib/rubocop/cop/variable_force.rb#361 def scanned_nodes; end # @api private @@ -54017,7 +54563,7 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#290 + # source://rubocop//lib/rubocop/cop/variable_force.rb#285 def twisted_nodes(node); end end diff --git a/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi b/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi deleted file mode 100644 index 2aaad232..00000000 --- a/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +++ /dev/null @@ -1,66 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `unicode-display_width` gem. -# Please instead update this file by running `bin/tapioca gem unicode-display_width`. - - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#3 -module Unicode; end - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#4 -class Unicode::DisplayWidth - # @return [DisplayWidth] a new instance of DisplayWidth - # - # source://unicode-display_width//lib/unicode/display_width.rb#104 - def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end - - # source://unicode-display_width//lib/unicode/display_width.rb#110 - def get_config(**kwargs); end - - # source://unicode-display_width//lib/unicode/display_width.rb#118 - def of(string, **kwargs); end - - class << self - # source://unicode-display_width//lib/unicode/display_width/index.rb#14 - def decompress_index(index, level); end - - # source://unicode-display_width//lib/unicode/display_width.rb#86 - def emoji_extra_width_of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), _ = T.unsafe(nil)); end - - # source://unicode-display_width//lib/unicode/display_width.rb#12 - def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), options = T.unsafe(nil)); end - - # Same as .width_no_overwrite - but with applying overwrites for each char - # - # source://unicode-display_width//lib/unicode/display_width.rb#57 - def width_all_features(string, ambiguous, overwrite, options); end - - # source://unicode-display_width//lib/unicode/display_width.rb#30 - def width_no_overwrite(string, ambiguous, options = T.unsafe(nil)); end - end -end - -# source://unicode-display_width//lib/unicode/display_width.rb#9 -Unicode::DisplayWidth::ASCII_NON_ZERO_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#7 -Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String) - -# source://unicode-display_width//lib/unicode/display_width.rb#10 -Unicode::DisplayWidth::FIRST_4096 = T.let(T.unsafe(nil), Array) - -# source://unicode-display_width//lib/unicode/display_width/index.rb#11 -Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Array) - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#8 -Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String) - -# source://unicode-display_width//lib/unicode/display_width.rb#8 -Unicode::DisplayWidth::INITIAL_DEPTH = T.let(T.unsafe(nil), Integer) - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#6 -Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String) - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#5 -Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unicode-display_width@3.1.2.rbi b/sorbet/rbi/gems/unicode-display_width@3.1.2.rbi new file mode 100644 index 00000000..7a9786ed --- /dev/null +++ b/sorbet/rbi/gems/unicode-display_width@3.1.2.rbi @@ -0,0 +1,130 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unicode-display_width` gem. +# Please instead update this file by running `bin/tapioca gem unicode-display_width`. + + +# require "rbconfig" +# RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ # windows +# +# source://unicode-display_width//lib/unicode/display_width/constants.rb#3 +module Unicode; end + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#4 +class Unicode::DisplayWidth + # @return [DisplayWidth] a new instance of DisplayWidth + # + # source://unicode-display_width//lib/unicode/display_width.rb#220 + def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end + + # source://unicode-display_width//lib/unicode/display_width.rb#226 + def get_config(**kwargs); end + + # source://unicode-display_width//lib/unicode/display_width.rb#234 + def of(string, **kwargs); end + + class << self + # source://unicode-display_width//lib/unicode/display_width/index.rb#14 + def decompress_index(index, level); end + + # Returns width of all considered Emoji and remaining string + # + # source://unicode-display_width//lib/unicode/display_width.rb#134 + def emoji_width(string, mode = T.unsafe(nil), ambiguous = T.unsafe(nil)); end + + # Match possible Emoji first, then refine + # + # source://unicode-display_width//lib/unicode/display_width.rb#164 + def emoji_width_via_possible(string, emoji_set_regex, strict_eaw = T.unsafe(nil), ambiguous = T.unsafe(nil)); end + + # source://unicode-display_width//lib/unicode/display_width.rb#192 + def normalize_options(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), old_options = T.unsafe(nil), **options); end + + # Returns monospace display width of string + # + # source://unicode-display_width//lib/unicode/display_width.rb#49 + def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), old_options = T.unsafe(nil), **options); end + + # Returns width for ASCII-only strings. Will consider zero-width control symbols. + # + # source://unicode-display_width//lib/unicode/display_width.rb#124 + def width_ascii(string); end + + # Returns width of custom overwrites and remaining string + # + # source://unicode-display_width//lib/unicode/display_width.rb#108 + def width_custom(string, overwrite); end + end +end + +# source://unicode-display_width//lib/unicode/display_width.rb#16 +Unicode::DisplayWidth::AMBIGUOUS_MAP = T.let(T.unsafe(nil), Hash) + +# source://unicode-display_width//lib/unicode/display_width.rb#15 +Unicode::DisplayWidth::ASCII_BACKSPACE = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#13 +Unicode::DisplayWidth::ASCII_NON_ZERO_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://unicode-display_width//lib/unicode/display_width.rb#14 +Unicode::DisplayWidth::ASCII_NON_ZERO_STRING = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#7 +Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#11 +Unicode::DisplayWidth::DEFAULT_AMBIGUOUS = T.let(T.unsafe(nil), Integer) + +# source://unicode-display_width//lib/unicode/display_width.rb#32 +Unicode::DisplayWidth::EMOJI_SEQUENCES_REGEX_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://unicode-display_width//lib/unicode/display_width/emoji_support.rb#6 +module Unicode::DisplayWidth::EmojiSupport + class << self + # Tries to find out which terminal emulator is used to + # set emoji: config to best suiting value + # + # Please also see section in README.md and + # misc/terminal-emoji-width.rb + # + # Please note: Many terminals do not set any ENV vars, + # maybe CSI queries can help? + # + # source://unicode-display_width//lib/unicode/display_width/emoji_support.rb#15 + def recommended; end + end +end + +# source://unicode-display_width//lib/unicode/display_width.rb#28 +Unicode::DisplayWidth::FIRST_4096 = T.let(T.unsafe(nil), Hash) + +# source://unicode-display_width//lib/unicode/display_width.rb#20 +Unicode::DisplayWidth::FIRST_AMBIGUOUS = T.let(T.unsafe(nil), Hash) + +# source://unicode-display_width//lib/unicode/display_width/index.rb#11 +Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Hash) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#8 +Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#12 +Unicode::DisplayWidth::INITIAL_DEPTH = T.let(T.unsafe(nil), Integer) + +# source://unicode-display_width//lib/unicode/display_width.rb#24 +Unicode::DisplayWidth::NOT_COMMON_NARROW_REGEX = T.let(T.unsafe(nil), Hash) + +# source://unicode-display_width//lib/unicode/display_width.rb#45 +Unicode::DisplayWidth::REGEX_EMOJI_ALL_SEQUENCES = T.let(T.unsafe(nil), Regexp) + +# source://unicode-display_width//lib/unicode/display_width.rb#46 +Unicode::DisplayWidth::REGEX_EMOJI_ALL_SEQUENCES_AND_VS16 = T.let(T.unsafe(nil), Regexp) + +# source://unicode-display_width//lib/unicode/display_width.rb#37 +Unicode::DisplayWidth::REGEX_EMOJI_VS16 = T.let(T.unsafe(nil), Regexp) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#6 +Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#5 +Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi b/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi new file mode 100644 index 00000000..fcf0c221 --- /dev/null +++ b/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi @@ -0,0 +1,251 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unicode-emoji` gem. +# Please instead update this file by running `bin/tapioca gem unicode-emoji`. + + +# This file was generated by a script, please do not edit it by hand. +# See `$ rake generate_constants` and data/generate_constants.rb for more info. +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#3 +module Unicode; end + +# source://unicode-emoji//lib/unicode/emoji/constants.rb#4 +module Unicode::Emoji + class << self + # Returns ordered list of Emoji, categorized in a three-level deep Hash structure + # + # source://unicode-emoji//lib/unicode/emoji.rb#80 + def list(key = T.unsafe(nil), sub_key = T.unsafe(nil)); end + + # Return Emoji properties of character as an Array or nil + # See PROPERTY_NAMES constant for possible properties + # + # Source: see https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt + # + # source://unicode-emoji//lib/unicode/emoji.rb#68 + def properties(char); end + + private + + # source://unicode-emoji//lib/unicode/emoji.rb#88 + def get_codepoint_value(char); end + end +end + +# Last codepoint of tag-based subdivision flags +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#31 +Unicode::Emoji::CANCEL_TAG = T.let(T.unsafe(nil), Integer) + +# source://unicode-emoji//lib/unicode/emoji/constants.rb#7 +Unicode::Emoji::CLDR_VERSION = T.let(T.unsafe(nil), String) + +# source://unicode-emoji//lib/unicode/emoji/constants.rb#8 +Unicode::Emoji::DATA_DIRECTORY = T.let(T.unsafe(nil), String) + +# The current list of codepoints with the "Emoji" property +# Same characters as \p{Emoji} +# (Emoji version of this gem might be more recent than Ruby's Emoji version) +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#8 +Unicode::Emoji::EMOJI_CHAR = T.let(T.unsafe(nil), Array) + +# The current list of codepoints with the "Emoji_Component" property +# Same characters as \p{Emoji Component} or \p{EComp} +# (Emoji version of this gem might be more recent than Ruby's Emoji version) +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#21 +Unicode::Emoji::EMOJI_COMPONENT = T.let(T.unsafe(nil), Array) + +# The list of characters that can be used as base for keycap sequences +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#42 +Unicode::Emoji::EMOJI_KEYCAPS = T.let(T.unsafe(nil), Array) + +# Combining Enclosing Keycap character +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#37 +Unicode::Emoji::EMOJI_KEYCAP_SUFFIX = T.let(T.unsafe(nil), Integer) + +# The current list of codepoints with the "Emoji_Modifier" property +# Same characters as \p{Emoji Modifier} or \p{EMod} +# (Emoji version of this gem might be more recent than Ruby's Emoji version) +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#31 +Unicode::Emoji::EMOJI_MODIFIERS = T.let(T.unsafe(nil), Array) + +# The current list of codepoints with the "Emoji_Modifier_Base" property +# Same characters as \p{Emoji Modifier Base} or \p{EBase} +# (Emoji version of this gem might be more recent than Ruby's Emoji version) +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#26 +Unicode::Emoji::EMOJI_MODIFIER_BASES = T.let(T.unsafe(nil), Array) + +# The current list of codepoints with the "Emoji_Presentation" property +# Same characters as \p{Emoji Presentation} or \p{EPres} +# (Emoji version of this gem might be more recent than Ruby's Emoji version) +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#13 +Unicode::Emoji::EMOJI_PRESENTATION = T.let(T.unsafe(nil), Array) + +# First codepoint of tag-based subdivision flags +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#28 +Unicode::Emoji::EMOJI_TAG_BASE_FLAG = T.let(T.unsafe(nil), Integer) + +# Variation Selector 16 (VS16), enables emoji presentation mode for preceding codepoint +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#22 +Unicode::Emoji::EMOJI_VARIATION_SELECTOR = T.let(T.unsafe(nil), Integer) + +# source://unicode-emoji//lib/unicode/emoji/constants.rb#6 +Unicode::Emoji::EMOJI_VERSION = T.let(T.unsafe(nil), String) + +# The current list of codepoints with the "Extended_Pictographic" property +# Same characters as \p{Extended Pictographic} or \p{ExtPict} +# (Emoji version of this gem might be more recent than Ruby's Emoji version) +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#36 +Unicode::Emoji::EXTENDED_PICTOGRAPHIC = T.let(T.unsafe(nil), Array) + +# The current list of codepoints with the "Extended_Pictographic" property that don't have the "Emoji" property +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#39 +Unicode::Emoji::EXTENDED_PICTOGRAPHIC_NO_EMOJI = T.let(T.unsafe(nil), Array) + +# source://unicode-emoji//lib/unicode/emoji/index.rb#11 +Unicode::Emoji::INDEX = T.let(T.unsafe(nil), Hash) + +# source://unicode-emoji//lib/unicode/emoji/constants.rb#9 +Unicode::Emoji::INDEX_FILENAME = T.let(T.unsafe(nil), String) + +# Contains an ordered and group list of all currently recommended Emoji (RGI/FQE) +# +# source://unicode-emoji//lib/unicode/emoji/list.rb#6 +Unicode::Emoji::LIST = T.let(T.unsafe(nil), Hash) + +# Sometimes, categories change, we issue a warning in these cases +# +# source://unicode-emoji//lib/unicode/emoji/list.rb#9 +Unicode::Emoji::LIST_REMOVED_KEYS = T.let(T.unsafe(nil), Array) + +# Unicode properties, see https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#12 +Unicode::Emoji::PROPERTY_NAMES = T.let(T.unsafe(nil), Hash) + +# The list RGI tag sequence flags +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#51 +Unicode::Emoji::RECOMMENDED_SUBDIVISION_FLAGS = T.let(T.unsafe(nil), Array) + +# The list of fully-qualified RGI Emoji ZWJ sequences +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#54 +Unicode::Emoji::RECOMMENDED_ZWJ_SEQUENCES = T.let(T.unsafe(nil), Array) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex.rb#6 +Unicode::Emoji::REGEX = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_basic.rb#6 +Unicode::Emoji::REGEX_BASIC = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_emoji_keycap.rb#6 +Unicode::Emoji::REGEX_EMOJI_KEYCAP = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_include_mqe.rb#6 +Unicode::Emoji::REGEX_INCLUDE_MQE = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_include_mqe_uqe.rb#6 +Unicode::Emoji::REGEX_INCLUDE_MQE_UQE = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_include_text.rb#6 +Unicode::Emoji::REGEX_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_picto.rb#6 +Unicode::Emoji::REGEX_PICTO = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_picto_no_emoji.rb#6 +Unicode::Emoji::REGEX_PICTO_NO_EMOJI = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_possible.rb#6 +Unicode::Emoji::REGEX_POSSIBLE = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_component.rb#6 +Unicode::Emoji::REGEX_PROP_COMPONENT = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_emoji.rb#6 +Unicode::Emoji::REGEX_PROP_EMOJI = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_modifier.rb#6 +Unicode::Emoji::REGEX_PROP_MODIFIER = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_modifier_base.rb#6 +Unicode::Emoji::REGEX_PROP_MODIFIER_BASE = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_presentation.rb#6 +Unicode::Emoji::REGEX_PROP_PRESENTATION = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_text.rb#6 +Unicode::Emoji::REGEX_TEXT = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_text_presentation.rb#6 +Unicode::Emoji::REGEX_TEXT_PRESENTATION = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_valid.rb#6 +Unicode::Emoji::REGEX_VALID = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_valid_include_text.rb#6 +Unicode::Emoji::REGEX_VALID_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_well_formed.rb#6 +Unicode::Emoji::REGEX_WELL_FORMED = T.let(T.unsafe(nil), Regexp) + +# source://unicode-emoji//lib/unicode/emoji/generated/regex_well_formed_include_text.rb#6 +Unicode::Emoji::REGEX_WELL_FORMED_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp) + +# Two regional indicators make up a region +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#43 +Unicode::Emoji::REGIONAL_INDICATORS = T.let(T.unsafe(nil), Array) + +# Tags characters allowed in tag-based subdivision flags +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#34 +Unicode::Emoji::SPEC_TAGS = T.let(T.unsafe(nil), Array) + +# The current list of codepoints with the "Emoji" property that lack the "Emoji Presentation" property +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#16 +Unicode::Emoji::TEXT_PRESENTATION = T.let(T.unsafe(nil), Array) + +# Variation Selector 15 (VS15), enables text presentation mode for preceding codepoint +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#25 +Unicode::Emoji::TEXT_VARIATION_SELECTOR = T.let(T.unsafe(nil), Integer) + +# The list of valid regions +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#45 +Unicode::Emoji::VALID_REGION_FLAGS = T.let(T.unsafe(nil), Array) + +# The list of valid subdivisions in regex character class syntax +# +# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#48 +Unicode::Emoji::VALID_SUBDIVISIONS = T.let(T.unsafe(nil), Array) + +# source://unicode-emoji//lib/unicode/emoji/constants.rb#5 +Unicode::Emoji::VERSION = T.let(T.unsafe(nil), String) + +# The current list of Emoji components that should have a visual representation +# Currently skin tone modifiers + hair components +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#47 +Unicode::Emoji::VISUAL_COMPONENT = T.let(T.unsafe(nil), Array) + +# Zero-width-joiner to enable combination of multiple Emoji in a sequence +# +# source://unicode-emoji//lib/unicode/emoji/constants.rb#40 +Unicode::Emoji::ZWJ = T.let(T.unsafe(nil), Integer)