diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 0c810a3466403..05f29c759b3f0 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -406,6 +406,11 @@ Style/RescueStandardError: Style/ReturnNil: Enabled: true +# Broken with rubocop-1.64.0, tries to autocorrect calls to e.g. :"1?" +# TODO: report to rubocop +Style/SendWithLiteralMethodName: + Enabled: false + # We have no use for using `warn` because we # are calling Ruby with warnings disabled. Style/StderrPuts: diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index b3c836d042728..0259423baaef0 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -82,7 +82,7 @@ GEM rspec-support (3.13.1) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.63.5) + rubocop (1.64.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 4ed93fe16a8ba..a898556c77922 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -38,7 +38,7 @@ def self.from_args(cask, **directives) def initialize(cask, **directives) directives.assert_valid_keys(*ORDERED_DIRECTIVES) - super(cask, **directives) + super directives[:signal] = Array(directives[:signal]).flatten.each_slice(2).to_a @directives = directives diff --git a/Library/Homebrew/cask/artifact/binary.rb b/Library/Homebrew/cask/artifact/binary.rb index c28355025db98..cb349c8f3c9bc 100644 --- a/Library/Homebrew/cask/artifact/binary.rb +++ b/Library/Homebrew/cask/artifact/binary.rb @@ -8,7 +8,7 @@ module Artifact # Artifact corresponding to the `binary` stanza. class Binary < Symlinked def link(command: nil, **options) - super(command:, **options) + super return if source.executable? if source.writable? diff --git a/Library/Homebrew/cask/artifact/installer.rb b/Library/Homebrew/cask/artifact/installer.rb index 3a746b17cc859..b8ff7e405a295 100644 --- a/Library/Homebrew/cask/artifact/installer.rb +++ b/Library/Homebrew/cask/artifact/installer.rb @@ -69,7 +69,7 @@ def self.from_args(cask, **args) attr_reader :path, :args def initialize(cask, **args) - super(cask, **args) + super if args.key?(:manual) @path = Pathname(args[:manual]) diff --git a/Library/Homebrew/cask/artifact/keyboard_layout.rb b/Library/Homebrew/cask/artifact/keyboard_layout.rb index 6b5364af14b9e..37160ee3570d9 100644 --- a/Library/Homebrew/cask/artifact/keyboard_layout.rb +++ b/Library/Homebrew/cask/artifact/keyboard_layout.rb @@ -8,12 +8,12 @@ module Artifact # Artifact corresponding to the `keyboard_layout` stanza. class KeyboardLayout < Moved def install_phase(**options) - super(**options) + super delete_keyboard_layout_cache(**options) end def uninstall_phase(**options) - super(**options) + super delete_keyboard_layout_cache(**options) end diff --git a/Library/Homebrew/cask/artifact/mdimporter.rb b/Library/Homebrew/cask/artifact/mdimporter.rb index ae0327f40f4ec..204699acd4acf 100644 --- a/Library/Homebrew/cask/artifact/mdimporter.rb +++ b/Library/Homebrew/cask/artifact/mdimporter.rb @@ -13,7 +13,7 @@ def self.english_name end def install_phase(**options) - super(**options) + super reload_spotlight(**options) end diff --git a/Library/Homebrew/cask/artifact/pkg.rb b/Library/Homebrew/cask/artifact/pkg.rb index 313832b61f0f5..8c6e400086cb7 100644 --- a/Library/Homebrew/cask/artifact/pkg.rb +++ b/Library/Homebrew/cask/artifact/pkg.rb @@ -19,7 +19,7 @@ def self.from_args(cask, path, **stanza_options) end def initialize(cask, path, **stanza_options) - super(cask, path, **stanza_options) + super @path = cask.staged_path.join(path) @stanza_options = stanza_options end diff --git a/Library/Homebrew/cask/artifact/qlplugin.rb b/Library/Homebrew/cask/artifact/qlplugin.rb index f38164ff1c5d2..ad7643def908a 100644 --- a/Library/Homebrew/cask/artifact/qlplugin.rb +++ b/Library/Homebrew/cask/artifact/qlplugin.rb @@ -13,12 +13,12 @@ def self.english_name end def install_phase(**options) - super(**options) + super reload_quicklook(**options) end def uninstall_phase(**options) - super(**options) + super reload_quicklook(**options) end diff --git a/Library/Homebrew/cask/artifact/relocated.rb b/Library/Homebrew/cask/artifact/relocated.rb index 5a66fd5cc80d7..4bfaf185aa546 100644 --- a/Library/Homebrew/cask/artifact/relocated.rb +++ b/Library/Homebrew/cask/artifact/relocated.rb @@ -38,7 +38,7 @@ def resolve_target(target, base_dir: config.public_send(self.class.dirmethod)) .void } def initialize(cask, source, **target_hash) - super(cask, source, **target_hash) + super target = target_hash[:target] @source_string = source.to_s diff --git a/Library/Homebrew/cask/dsl/caveats.rb b/Library/Homebrew/cask/dsl/caveats.rb index 865b9ada10272..77c9f49d011ee 100644 --- a/Library/Homebrew/cask/dsl/caveats.rb +++ b/Library/Homebrew/cask/dsl/caveats.rb @@ -20,7 +20,7 @@ class Caveats < Base attr_predicate :discontinued? def initialize(*args) - super(*args) + super @built_in_caveats = {} @custom_caveats = [] @discontinued = false diff --git a/Library/Homebrew/cli/args.rb b/Library/Homebrew/cli/args.rb index 0926546cdbbf6..0e5ecd7263b2b 100644 --- a/Library/Homebrew/cli/args.rb +++ b/Library/Homebrew/cli/args.rb @@ -15,7 +15,7 @@ class Args < OpenStruct def initialize require "cli/named_args" - super() + super @processed_options = [] @options_only = [] diff --git a/Library/Homebrew/dependency.rb b/Library/Homebrew/dependency.rb index aff96c18406a1..bd245d4d4f8c5 100644 --- a/Library/Homebrew/dependency.rb +++ b/Library/Homebrew/dependency.rb @@ -256,7 +256,7 @@ def hash sig { params(minimum_version: T.nilable(Version), minimum_revision: T.nilable(Integer)).returns(T::Boolean) } def installed?(minimum_version: nil, minimum_revision: nil) - use_macos_install? || super(minimum_version:, minimum_revision:) + use_macos_install? || super end sig { returns(T::Boolean) } diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 93d407d833ae0..656a61823acec 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -146,11 +146,11 @@ def basename private def puts(*args) - super(*args) unless quiet? + super unless quiet? end def ohai(*args) - super(*args) unless quiet? + super unless quiet? end def silent_command(*args, **options) @@ -605,7 +605,7 @@ def curl_output(*args, **options) raise HomebrewCurlDownloadStrategyError, url unless Formula["curl"].any_version_installed? options[:use_homebrew_curl] = true - super(*args, **options) + super end end @@ -620,7 +620,7 @@ def initialize(url, name, version, **meta) # GitHub Packages authorization header. # HOMEBREW_GITHUB_PACKAGES_AUTH set in brew.sh meta[:headers] << "Authorization: #{HOMEBREW_GITHUB_PACKAGES_AUTH}" - super(url, name, version, **meta) + super end private diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index 7793727c1c769..f03e56c86eecd 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -128,7 +128,7 @@ def determine_cxx sig { void } def clang - super() + super replace_in_cflags(/-Xarch_#{Hardware::CPU.arch_32_bit} (-march=\S*)/, '\1') map = Hardware::CPU.optimization_flags.dup if DevelopmentTools.clang_build_version < 700 diff --git a/Library/Homebrew/install_renamed.rb b/Library/Homebrew/install_renamed.rb index b16d82893b71a..9651ec2cc703a 100644 --- a/Library/Homebrew/install_renamed.rb +++ b/Library/Homebrew/install_renamed.rb @@ -21,11 +21,11 @@ def cp_path_sub(pattern, replacement) end def +(other) - super(other).extend(InstallRenamed) + super.extend(InstallRenamed) end def /(other) - super(other).extend(InstallRenamed) + super.extend(InstallRenamed) end private diff --git a/Library/Homebrew/manpages/converter/kramdown.rb b/Library/Homebrew/manpages/converter/kramdown.rb index 9e5ba73d31add..413308edbbed1 100644 --- a/Library/Homebrew/manpages/converter/kramdown.rb +++ b/Library/Homebrew/manpages/converter/kramdown.rb @@ -22,7 +22,7 @@ def convert_a(element, options) # Don't duplicate the URL if the link text is the same as the URL. "<#{text}>" else - super(element, options) + super end end end diff --git a/Library/Homebrew/requirements/arch_requirement.rb b/Library/Homebrew/requirements/arch_requirement.rb index 9db2d151ca152..1b501f11fb478 100644 --- a/Library/Homebrew/requirements/arch_requirement.rb +++ b/Library/Homebrew/requirements/arch_requirement.rb @@ -11,7 +11,7 @@ class ArchRequirement < Requirement def initialize(tags) @arch = tags.shift - super(tags) + super end satisfy(build_env: false) do diff --git a/Library/Homebrew/requirements/codesign_requirement.rb b/Library/Homebrew/requirements/codesign_requirement.rb index 74e73905f7d27..119ea2f79cde3 100644 --- a/Library/Homebrew/requirements/codesign_requirement.rb +++ b/Library/Homebrew/requirements/codesign_requirement.rb @@ -13,7 +13,7 @@ def initialize(tags) @identity = options.fetch(:identity) @with = options.fetch(:with, "code signing") @url = options.fetch(:url, nil) - super(tags) + super end satisfy(build_env: false) do diff --git a/Library/Homebrew/requirements/macos_requirement.rb b/Library/Homebrew/requirements/macos_requirement.rb index 0e7e0cd06e2cc..db0538aff76cb 100644 --- a/Library/Homebrew/requirements/macos_requirement.rb +++ b/Library/Homebrew/requirements/macos_requirement.rb @@ -88,7 +88,7 @@ def message(type: :formula) end def ==(other) - super(other) && comparator == other.comparator && version == other.version + super && comparator == other.comparator && version == other.version end alias eql? == diff --git a/Library/Homebrew/requirements/xcode_requirement.rb b/Library/Homebrew/requirements/xcode_requirement.rb index 0494fd5fae110..687119d8b9a67 100644 --- a/Library/Homebrew/requirements/xcode_requirement.rb +++ b/Library/Homebrew/requirements/xcode_requirement.rb @@ -16,7 +16,7 @@ class XcodeRequirement < Requirement def initialize(tags = []) @version = tags.shift if tags.first.to_s.match?(/(\d\.)+\d/) - super(tags) + super end sig { returns(T::Boolean) } diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb index ad0cca0136d72..4fb883edbb064 100644 --- a/Library/Homebrew/resource.rb +++ b/Library/Homebrew/resource.rb @@ -143,7 +143,7 @@ def files(*files) def fetch(verify_download_integrity: true) fetch_patches - super(verify_download_integrity:) + super end # {Livecheck} can be used to check for newer versions of the software. diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.63.5.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.64.0.rbi similarity index 98% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.63.5.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.64.0.rbi index ce08e397a0d69..996d8598097c9 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.63.5.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.64.0.rbi @@ -542,7 +542,7 @@ end # # @api private # -# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#12 +# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#11 class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base # @api private # @@ -777,7 +777,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def config(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/comment_config.rb#51 @@ -801,7 +801,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def registry(*args, **_arg1, &block); end private @@ -977,10 +977,10 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def [](*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def []=(*args, **_arg1, &block); end # @return [Boolean] @@ -1019,13 +1019,13 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def delete(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/config.rb#108 def deprecation_check; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def dig(*args, **_arg1, &block); end # @return [Boolean] @@ -1033,10 +1033,10 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#162 def disabled_new_cops?; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def each(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def each_key(*args, **_arg1, &block); end # @return [Boolean] @@ -1044,7 +1044,7 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#166 def enabled_new_cops?; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fetch(*args, **_arg1, &block); end # @return [Boolean] @@ -1098,10 +1098,10 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#76 def internal?; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def key?(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def keys(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/config.rb#47 @@ -1115,10 +1115,10 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#81 def make_excludes_absolute; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def map(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def merge(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/config.rb#247 @@ -1144,7 +1144,7 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#207 def possibly_include_hidden?; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def replace(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/config.rb#71 @@ -1156,22 +1156,22 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#251 def target_rails_version; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def target_ruby_version(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def to_h(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def to_hash(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/config.rb#67 def to_s; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def transform_values(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def validate(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/config.rb#58 @@ -1179,12 +1179,12 @@ class RuboCop::Config private - # source://rubocop//lib/rubocop/config.rb#347 + # source://rubocop//lib/rubocop/config.rb#346 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#335 + # source://rubocop//lib/rubocop/config.rb#334 def enable_cop?(qualified_cop_name, cop_options); end # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` @@ -1193,7 +1193,7 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#321 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop//lib/rubocop/config.rb#328 + # source://rubocop//lib/rubocop/config.rb#327 def read_gem_versions_from_target_lockfile; end # @return [Float, nil] The Rails version as a `major.minor` Float. @@ -2264,10 +2264,10 @@ class RuboCop::ConfigValidator # source://rubocop//lib/rubocop/config_validator.rb#26 def initialize(config); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def for_all_cops(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def smart_loaded_path(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/config_validator.rb#62 @@ -2939,18 +2939,18 @@ class RuboCop::Cop::Base # @return [Base] a new instance of Base # - # source://rubocop//lib/rubocop/cop/base.rb#153 + # source://rubocop//lib/rubocop/cop/base.rb#156 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#269 + # source://rubocop//lib/rubocop/cop/base.rb#272 def active_support_extensions_enabled?; end # Adds an offense that has no particular location. # No correction can be applied to global offenses # - # source://rubocop//lib/rubocop/cop/base.rb#186 + # source://rubocop//lib/rubocop/cop/base.rb#189 def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end # Adds an offense on the specified range (or node with an expression) @@ -2958,25 +2958,25 @@ class RuboCop::Cop::Base # to provide the cop the opportunity to autocorrect the offense. # If message is not specified, the method `message` will be called. # - # source://rubocop//lib/rubocop/cop/base.rb#198 + # source://rubocop//lib/rubocop/cop/base.rb#201 def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#340 + # source://rubocop//lib/rubocop/cop/base.rb#343 def always_autocorrect?; end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#326 + # source://rubocop//lib/rubocop/cop/base.rb#329 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#311 + # source://rubocop//lib/rubocop/cop/base.rb#314 def callbacks_needed; end # Returns the value of attribute config. @@ -2984,29 +2984,29 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#43 def config; end - # source://rubocop//lib/rubocop/cop/base.rb#249 + # source://rubocop//lib/rubocop/cop/base.rb#252 def config_to_allow_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#253 + # source://rubocop//lib/rubocop/cop/base.rb#256 def config_to_allow_offenses=(hash); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#346 + # source://rubocop//lib/rubocop/cop/base.rb#349 def contextual_autocorrect?; end # Configuration Helpers # - # source://rubocop//lib/rubocop/cop/base.rb#243 + # source://rubocop//lib/rubocop/cop/base.rb#246 def cop_config; end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # source://rubocop//lib/rubocop/cop/base.rb#238 def cop_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#282 + # source://rubocop//lib/rubocop/cop/base.rb#285 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -3025,51 +3025,51 @@ class RuboCop::Cop::Base # ResultCache system when those external dependencies change, # ie when the ResultCache should be invalidated. # - # source://rubocop//lib/rubocop/cop/base.rb#231 + # source://rubocop//lib/rubocop/cop/base.rb#234 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#350 + # source://rubocop//lib/rubocop/cop/base.rb#353 def inspect; end # Gets called if no message is specified when calling `add_offense` or # `add_global_offense` # Cops are discouraged to override this; instead pass your message directly # - # source://rubocop//lib/rubocop/cop/base.rb#180 + # source://rubocop//lib/rubocop/cop/base.rb#183 def message(_range = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # source://rubocop//lib/rubocop/cop/base.rb#238 def name; end # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#302 + # source://rubocop//lib/rubocop/cop/base.rb#305 def offenses; end # Called after all on_... have been called # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#167 + # source://rubocop//lib/rubocop/cop/base.rb#170 def on_investigation_end; end # Called before all on_... have been called # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#161 + # source://rubocop//lib/rubocop/cop/base.rb#164 def on_new_investigation; end # Called instead of all on_... callbacks for unrecognized files / syntax errors # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#173 + # source://rubocop//lib/rubocop/cop/base.rb#176 def on_other_file; end # There should be very limited reasons for a Cop to do it's own parsing # - # source://rubocop//lib/rubocop/cop/base.rb#287 + # source://rubocop//lib/rubocop/cop/base.rb#290 def parse(source, path = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#261 + # source://rubocop//lib/rubocop/cop/base.rb#264 def parser_engine; end # Returns the value of attribute processed_source. @@ -3081,104 +3081,106 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#293 + # source://rubocop//lib/rubocop/cop/base.rb#296 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#273 + # source://rubocop//lib/rubocop/cop/base.rb#276 def relevant_file?(file); end - # source://rubocop//lib/rubocop/cop/base.rb#265 + # source://rubocop//lib/rubocop/cop/base.rb#268 def target_rails_version; end - # source://rubocop//lib/rubocop/cop/base.rb#257 + # source://rubocop//lib/rubocop/cop/base.rb#260 def target_ruby_version; end private - # source://rubocop//lib/rubocop/cop/base.rb#478 + # source://rubocop//lib/rubocop/cop/base.rb#471 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#362 + # source://rubocop//lib/rubocop/cop/base.rb#365 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#442 + # source://rubocop//lib/rubocop/cop/base.rb#435 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#358 + # source://rubocop//lib/rubocop/cop/base.rb#361 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#391 + # source://rubocop//lib/rubocop/cop/base.rb#394 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#416 + # source://rubocop//lib/rubocop/cop/base.rb#409 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#376 + # source://rubocop//lib/rubocop/cop/base.rb#379 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#368 + # source://rubocop//lib/rubocop/cop/base.rb#371 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#380 + # source://rubocop//lib/rubocop/cop/base.rb#383 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#372 + # source://rubocop//lib/rubocop/cop/base.rb#375 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#506 + # source://rubocop//lib/rubocop/cop/base.rb#499 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#502 + # source://rubocop//lib/rubocop/cop/base.rb#495 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#449 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#492 + # source://rubocop//lib/rubocop/cop/base.rb#485 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#484 + # source://rubocop//lib/rubocop/cop/base.rb#477 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#474 + # source://rubocop//lib/rubocop/cop/base.rb#467 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#498 + # source://rubocop//lib/rubocop/cop/base.rb#491 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#519 + # source://rubocop//lib/rubocop/cop/base.rb#512 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#463 + # source://rubocop//lib/rubocop/cop/base.rb#456 def range_from_node_or_range(node_or_range); end - # source://rubocop//lib/rubocop/cop/base.rb#411 + # Actually private methods + # + # source://rubocop//lib/rubocop/cop/base.rb#404 def reset_investigation; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#527 + # source://rubocop//lib/rubocop/cop/base.rb#520 def target_satisfies_all_gem_version_requirements?; end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#431 + # source://rubocop//lib/rubocop/cop/base.rb#424 def use_corrector(range, corrector); end class << self @@ -3193,51 +3195,54 @@ class RuboCop::Cop::Base # Naming # - # source://rubocop//lib/rubocop/cop/base.rb#90 + # source://rubocop//lib/rubocop/cop/base.rb#93 def badge; end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#316 + # source://rubocop//lib/rubocop/cop/base.rb#319 def callbacks_needed; end - # source://rubocop//lib/rubocop/cop/base.rb#94 + # source://rubocop//lib/rubocop/cop/base.rb#97 def cop_name; end - # source://rubocop//lib/rubocop/cop/base.rb#98 + # source://rubocop//lib/rubocop/cop/base.rb#101 def department; end - # Cops (other than builtin) are encouraged to implement this + # Returns an 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. # # @api public # @return [String, nil] # - # source://rubocop//lib/rubocop/cop/base.rb#67 - def documentation_url; end + # source://rubocop//lib/rubocop/cop/base.rb#70 + def documentation_url(config = T.unsafe(nil)); end # Call for abstract Cop classes # - # source://rubocop//lib/rubocop/cop/base.rb#78 + # source://rubocop//lib/rubocop/cop/base.rb#81 def exclude_from_registry; end # Returns the value of attribute gem_requirements. # - # source://rubocop//lib/rubocop/cop/base.rb#135 + # source://rubocop//lib/rubocop/cop/base.rb#138 def gem_requirements; end # @private # - # source://rubocop//lib/rubocop/cop/base.rb#71 + # source://rubocop//lib/rubocop/cop/base.rb#74 def inherited(subclass); end # Override and return the Force class(es) you need to join # - # source://rubocop//lib/rubocop/cop/base.rb#115 + # source://rubocop//lib/rubocop/cop/base.rb#118 def joining_forces; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#102 + # source://rubocop//lib/rubocop/cop/base.rb#105 def lint?; end # Returns true if the cop name or the cop namespace matches any of the @@ -3245,7 +3250,7 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#108 + # source://rubocop//lib/rubocop/cop/base.rb#111 def match?(given_names); end # Register a version requirement for the given gem name. @@ -3260,7 +3265,7 @@ class RuboCop::Cop::Base # # https://guides.rubygems.org/patterns/#declaring-dependencies # - # source://rubocop//lib/rubocop/cop/base.rb#148 + # source://rubocop//lib/rubocop/cop/base.rb#151 def requires_gem(gem_name, *version_requirements); end # Returns if class supports autocorrect. @@ -3268,7 +3273,7 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#84 + # source://rubocop//lib/rubocop/cop/base.rb#87 def support_autocorrect?; end # Override if your cop should be called repeatedly for multiple investigations @@ -3281,22 +3286,17 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#126 + # source://rubocop//lib/rubocop/cop/base.rb#129 def support_multiple_source?; end private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#402 - def builtin?; end - - # source://rubocop//lib/rubocop/cop/base.rb#384 + # source://rubocop//lib/rubocop/cop/base.rb#387 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#388 +# source://rubocop//lib/rubocop/cop/base.rb#391 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -3835,35 +3835,35 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#113 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#111 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#119 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#117 def forbidden_style?; end # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 - def message(range); end + def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#103 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#101 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#107 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#105 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#123 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#121 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#127 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#125 def version_specification?(expression); end end @@ -5164,7 +5164,12 @@ module RuboCop::Cop::Documentation # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#34 + # source://rubocop//lib/rubocop/cop/documentation.rb#40 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#35 def default_base_url; end # @api private @@ -5183,9 +5188,15 @@ module RuboCop::Cop::Documentation # source://rubocop//lib/rubocop/cop/documentation.rb#24 def base_url_for(cop_class, config); end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/documentation.rb#40 + def builtin?(cop_class); end + # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#34 + # source://rubocop//lib/rubocop/cop/documentation.rb#35 def default_base_url; end # @api private @@ -5686,7 +5697,7 @@ class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#120 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#118 def add_dependency_method?(method_name); end # @return [Boolean] @@ -5699,40 +5710,40 @@ class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#134 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#132 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#140 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#138 def forbidden_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#114 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#112 def match_block_variable_name?(receiver_name); end # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#104 - def message(range); end + def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#124 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#122 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#128 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#126 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#144 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#142 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#148 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#146 def version_specification?(expression); end end @@ -6618,40 +6629,45 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#125 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 def brackets?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#155 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#156 def breakdown_value_types_of_hash(hash_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#102 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 def def_node_that_require_parentheses(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#179 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#185 def each_omittable_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#175 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#181 def each_omitted_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#80 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 def enforced_shorthand_syntax; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#117 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#118 def find_ancestor_method_dispatch_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#171 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#74 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#75 def ignore_hash_shorthand_syntax?(pair_node); end # @return [Boolean] @@ -6661,18 +6677,18 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#140 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#141 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#149 def method_dispatch_as_argument?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#183 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#189 def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#205 def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 @@ -6680,22 +6696,22 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#84 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#85 def require_hash_value?(hash_key_source, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#94 def require_hash_value_for_around_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#129 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#130 def use_element_of_hash_literal_as_receiver?(ancestor, parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#134 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#135 def use_modifier_form_without_parenthesized_method_call?(ancestor); end end @@ -6708,12 +6724,12 @@ RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#209 +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#216 class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#218 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#225 def first_argument; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#222 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#229 def last_argument; end # Returns the value of attribute node @@ -6727,7 +6743,7 @@ class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct # @return [Object] the newly set value def node=(_); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#210 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#217 def selector; end class << self @@ -8772,35 +8788,35 @@ class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#131 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#133 def allow_border_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#135 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#137 def allow_margin_comment?; end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#97 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#127 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#129 def comment_text(comment); end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#108 def concat_consecutive_comments(comments); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#139 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#141 def current_token(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#117 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#119 def empty_comment_only?(comment_text); end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#85 def investigate(comments); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#143 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#145 def previous_token(node); end end @@ -19325,7 +19341,7 @@ RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # # format('Numbered format: %1$s and numbered %2$s', a_value, another) # -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#38 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100 def called_on_string?(param0 = T.unsafe(nil)); end @@ -30612,6 +30628,17 @@ module RuboCop::Cop::Style; end # EnforcedStyle config covers only method definitions. # Applications of visibility methods to symbols can be controlled # using AllowModifiersOnSymbols config. +# Also, the visibility of `attr*` methods can be controlled using +# AllowModifiersOnAttrs config. +# +# In Ruby 3.0, `attr*` methods now return an array of defined method names +# as symbols. So we can write the modifier and `attr*` in inline style. +# AllowModifiersOnAttrs config allows `attr*` methods to be written in +# inline style without modifying applications that have been maintained +# for a long time in group style. Furthermore, developers who are not very +# familiar with Ruby may know that the modifier applies to `def`, but they +# may not know that it also applies to `attr*` methods. It would be easier +# to understand if we could write `attr*` methods in inline style. # # @example EnforcedStyle: group (default) # # bad @@ -30663,94 +30690,128 @@ module RuboCop::Cop::Style; end # private :bar, :baz # # end +# @example AllowModifiersOnAttrs: true (default) +# # good +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# def public_method; end +# +# private +# +# def private_method; end +# +# end +# @example AllowModifiersOnAttrs: false +# # bad +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# end # -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#70 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#109 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#91 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 + def access_modifier_with_attr?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#130 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#95 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#140 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#145 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#149 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#199 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#177 + def allow_modifiers_on_attrs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#173 def allow_modifiers_on_symbols?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#112 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#158 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#269 def def_source(node, def_node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#180 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 def find_argument_less_modifier_node(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#169 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 def find_corresponding_def_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#137 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 def group_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 def inline_style?; end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#211 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#261 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#159 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 def message(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#181 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#215 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 def remove_node(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#194 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#244 def replace_def(corrector, node, def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#153 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 def right_siblings_same_inline_method?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#188 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 def select_grouped_def_nodes(node); end end -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#88 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#76 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#81 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#120 RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#86 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#125 RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for grouping of accessors in `class` and `module` bodies. @@ -31087,6 +31148,8 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # # Names not on this list are likely to be meaningful and are allowed by default. # +# This cop handles not only method forwarding but also forwarding to `super`. +# # @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) # # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. # def foo(&block) @@ -31174,222 +31237,222 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # bar(...) # end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#125 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#144 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#144 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#185 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#351 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#353 def add_parens_if_missing(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#212 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#345 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 def arguments_range(node, first_node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#263 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#248 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#495 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 def explicit_block_name?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#168 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 def extract_forwardable_args(args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#238 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#180 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#182 def only_forwards_all?(send_classifications); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#292 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#294 def outside_block?(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#172 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#282 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#284 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#298 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#300 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#314 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#316 def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#306 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#308 def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#347 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#349 def use_anonymous_forwarding?; end class << self - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#142 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#133 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#136 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#132 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#139 RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier extend ::RuboCop::AST::NodePattern::Macros # @return [SendNodeClassifier] a new instance of SendNodeClassifier # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#372 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#398 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#392 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#394 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#368 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#386 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#380 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#382 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#466 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#468 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#464 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#476 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#447 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#449 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#431 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#410 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#412 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#470 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#472 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#427 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#489 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#491 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#480 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#455 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#457 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#423 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#443 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#445 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#439 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#441 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#435 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#437 def referenced_rest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#419 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#421 def ruby_32_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#451 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#453 def target_ruby_version; end end @@ -34849,34 +34912,52 @@ RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) # def do_something # end # end +# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] +# +# # good +# class Foo +# def method_missing(name, *args) +# end +# +# def respond_to_missing?(symbol, include_private) +# end +# end # -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#98 +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base include ::RuboCop::Cop::DocumentationComment include ::RuboCop::Cop::VisibilityHelp include ::RuboCop::Cop::DefNode - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#105 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#116 def modifier_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#119 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#146 + def allowed_methods; end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#130 def check(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#126 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#142 + def method_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#138 def require_for_non_public_methods?; end end -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#102 +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#113 RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) # Detects double disable comments on one line. This is mostly to catch @@ -37902,10 +37983,12 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # * never - forces use of explicit hash literal value # * either - accepts both shorthand and explicit use of hash literal value # * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash +# * either_consistent - accepts both shorthand and explicit use of hash literal value, +# but they must be consistent # -# @example EnforcedShorthandSyntax: consistent +# @example EnforcedShorthandSyntax: either_consistent # -# # bad - `foo` and `bar` values can be omitted +# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted # {foo: foo, bar: bar} # # # bad - `bar` value can be omitted @@ -37966,6 +38049,22 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good # {foo:, bar:} +# @example EnforcedShorthandSyntax: consistent +# +# # bad - `foo` and `bar` values can be omitted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} +# +# # good +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} # @example EnforcedStyle: ruby19 (default) # # bad # {:a => 2} @@ -37976,84 +38075,84 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol # {d: 1, 'e' => 2} # technically not forbidden # -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#131 class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::HashShorthandSyntax include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#185 def alternative_style; end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#145 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#163 def hash_rockets_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#177 def no_mixed_keys_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#123 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 def ruby19_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#149 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 def ruby19_no_mixed_keys_check(pairs); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#199 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#217 def acceptable_19_syntax_symbol?(sym_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#256 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#274 def argument_without_space?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#178 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#196 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#260 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#278 def autocorrect_hash_rockets(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#269 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#287 def autocorrect_no_mixed_keys(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#235 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#253 def autocorrect_ruby19(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#220 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#238 def check(pairs, delim, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#277 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#295 def force_hash_rockets?(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#248 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#266 def range_for_autocorrect_ruby19(pair_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#188 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#206 def sym_indices?(pairs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#192 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#210 def word_symbol_pair?(pair); end end -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#119 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#137 RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#121 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#139 RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#120 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#138 RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) # Looks for uses of `\_.each_with_object({}) {...}`, @@ -38698,7 +38797,7 @@ class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#134 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#136 def assume_boolean_value?(condition); end # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114 @@ -38714,20 +38813,20 @@ class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#151 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#153 def opposite_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#141 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#143 def replacement_condition(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#156 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#158 def require_parentheses?(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#120 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#122 def return_boolean_value?(condition); end end @@ -39675,10 +39774,10 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 def directives; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def loc(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def text(*args, **_arg1, &block); end # A magic comment can contain one value (normal style) or @@ -41808,7 +41907,7 @@ RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) # # shareable_constant_value: literal # CONST = [1, 2, 3] # -# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#87 +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#83 class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue include ::RuboCop::Cop::FrozenStringLiteral @@ -48316,6 +48415,63 @@ RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/send.rb#18 RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Detects the use of the `public_send` method with a literal method name argument. +# Since the `send` method can be used to call private methods, by default, +# only the `public_send` method is detected. +# +# @example +# # bad +# obj.public_send(:method_name) +# obj.public_send('method_name') +# +# # good +# obj.method_name +# @example AllowSend: true (default) +# # good +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# @example AllowSend: false +# # bad +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# +# # good +# obj.method_name +# +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#40 +class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#48 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#69 + def allow_send?; end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#73 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#77 + def removal_argument_range(first_argument, second_argument); end +end + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#43 +RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#44 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#45 +RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array) + # Checks for uses of `fail` and `raise`. # # @example EnforcedStyle: only_raise (default) @@ -49677,6 +49833,87 @@ end # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) +# Checks for redundant argument forwarding when calling super +# with arguments identical to the method definition. +# +# @example +# # bad +# def method(*args, **kwargs) +# super(*args, **kwargs) +# end +# +# # good - implicitly passing all arguments +# def method(*args, **kwargs) +# super +# end +# +# # good - forwarding a subset of the arguments +# def method(*args, **kwargs) +# super(*args) +# end +# +# # good - forwarding no arguments +# def method(*args, **kwargs) +# super() +# end +# +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#29 +class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#36 + def on_super(super_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#52 + def arguments_identical?(def_args, super_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#107 + def block_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#119 + def define_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#115 + def forward_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#87 + def keyword_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#97 + def keyword_rest_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#70 + def positional_arg_same?(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#77 + def positional_rest_arg_same(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#125 + def preprocess_super_args(super_args); end +end + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#32 +RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#34 +RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) + # Enforces the presence of parentheses in `super` containing arguments. # # `super` is a keyword and is provided as a distinct cop from those designed for method call. @@ -49900,9 +50137,11 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # `define_method?` methods are allowed by default. # These are customizable with `AllowedMethods` option. # -# @example AllowedPatterns: ['map'] (default) +# @example AllCops:ActiveSupportExtensionsEnabled: true # # good -# something.map { |s| s.upcase } +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } # @example AllowMethodsWithArguments: false (default) # # bad # something.do_something(foo) { |o| o.bar } @@ -49932,6 +50171,19 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # @example AllowedPatterns: [] (default) # # bad # something.map { |s| s.upcase } +# @example AllowedPatterns: ['map'] (default) +# # good +# something.map { |s| s.upcase } +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # bad +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } +# +# # good +# lambda(&:foo) +# proc(&:foo) +# Proc.new(&:foo) # @example # # bad # something.map { |s| s.upcase } @@ -49940,7 +50192,7 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # # good # something.map(&:upcase) # -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#123 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp include ::RuboCop::Cop::RangeHelp @@ -49950,81 +50202,87 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#172 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 def destructuring_block_argument?(argument_node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#134 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 def proc_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#158 def symbol_proc?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#137 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 def symbol_proc_receiver?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#267 def allow_comments?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#236 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#263 def allow_if_method_has_argument?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#187 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 def allowed_method_name?(name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#212 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 + def autocorrect_lambda_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#231 def autocorrect_with_args(corrector, node, args, method_name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225 def autocorrect_without_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#226 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#253 def begin_pos_for_replacement(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#221 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#248 def block_range_with_space(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#191 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 def register_offense(node, method_name, block_method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#183 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 def unsafe_array_usage?(node); end # See: https://github.com/rubocop/rubocop/issues/10864 # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#179 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#196 def unsafe_hash_usage?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#165 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#130 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#149 +RuboCop::Cop::Style::SymbolProc::LAMBDA_OR_PROC = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#131 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#148 RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. @@ -54662,16 +54920,16 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 def command; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#165 def cop_config_params(default_cfg, cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#181 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 def default_config(cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#225 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#229 def excludes(offending_files, cop_name, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#196 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#200 def filtered_config(cfg); end # Returns true if the given arr include the given elm or if any of the @@ -54679,38 +54937,38 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#273 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#277 def include_or_match?(arr, elm); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#246 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 def merge_mode_for_exclude?(cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#271 def no_exclude_limit?; end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#102 def output_cop(cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#133 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#137 def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#189 def output_cop_config(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#168 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#172 def output_cop_param_comments(output_buffer, params, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#215 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#219 def output_exclude_list(output_buffer, offending_files, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#254 def output_exclude_path(output_buffer, exclude_path, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#204 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#208 def output_offending_files(output_buffer, cfg, cop_name); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#96 @@ -54718,12 +54976,17 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#263 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 def safe_autocorrect?(config); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#116 def set_max(cfg, cop_name); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#125 + def should_set_max?(cop_name); end + # @return [Boolean] # # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#65 @@ -54736,12 +54999,12 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#153 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 def supports_safe_autocorrect?(cop_class, default_cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 def supports_unsafe_autocorrect?(cop_class, default_cfg); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 @@ -54814,43 +55077,46 @@ end class RuboCop::Formatter::FormatterSet < ::Array # @return [FormatterSet] a new instance of FormatterSet # - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#39 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#40 def initialize(options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#55 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#56 def add_formatter(formatter_type, output_path = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#67 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#68 def close_output_files; end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#50 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#51 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#44 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#45 def file_started(file, options); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 def finished(*args); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 def started(*args); end private - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#86 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#87 def builtin_formatter_class(specified_key); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#99 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#105 def custom_formatter_class(specified_class_name); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#75 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#76 def formatter_class(formatter_type); end end # source://rubocop//lib/rubocop/formatter/formatter_set.rb#11 RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#31 +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#30 +RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTER_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#32 RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) # This formatter displays a progress bar and shows details of offenses as @@ -55611,7 +55877,7 @@ module RuboCop::LSP # @return [void] # # source://rubocop//lib/rubocop/lsp.rb#25 - def disable; end + def disable(&block); end # Enable LSP. # @@ -55633,7 +55899,7 @@ module RuboCop::LSP # @return [void] # # source://rubocop//lib/rubocop/lsp.rb#25 - def disable; end + def disable(&block); end # Enable LSP. # @@ -55685,52 +55951,52 @@ class RuboCop::LSP::Routes # source://rubocop//lib/rubocop/lsp/routes.rb#38 def handle_initialize(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#61 + # source://rubocop//lib/rubocop/lsp/routes.rb#57 def handle_initialized(_request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#169 + # source://rubocop//lib/rubocop/lsp/routes.rb#167 def handle_method_missing(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#68 + # source://rubocop//lib/rubocop/lsp/routes.rb#64 def handle_shutdown(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#158 + # source://rubocop//lib/rubocop/lsp/routes.rb#156 def handle_unsupported_method(request, method = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#207 + # source://rubocop//lib/rubocop/lsp/routes.rb#205 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#177 + # source://rubocop//lib/rubocop/lsp/routes.rb#175 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#187 + # source://rubocop//lib/rubocop/lsp/routes.rb#185 def format_file(file_uri, command: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#221 + # source://rubocop//lib/rubocop/lsp/routes.rb#219 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#225 + # source://rubocop//lib/rubocop/lsp/routes.rb#223 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#237 + # source://rubocop//lib/rubocop/lsp/routes.rb#235 def to_range(location); end class << self diff --git a/Library/Homebrew/standalone/sorbet.rb b/Library/Homebrew/standalone/sorbet.rb index aec651361d6f3..9cd7fa24a8df6 100644 --- a/Library/Homebrew/standalone/sorbet.rb +++ b/Library/Homebrew/standalone/sorbet.rb @@ -13,19 +13,19 @@ # @private module TNoChecks def cast(value, type, checked: false) - super(value, type, checked:) + super end def let(value, type, checked: false) - super(value, type, checked:) + super end def bind(value, type, checked: false) - super(value, type, checked:) + super end def assert_type!(value, type, checked: false) - super(value, type, checked:) + super end end diff --git a/Library/Homebrew/test/cmd/update-report_spec.rb b/Library/Homebrew/test/cmd/update-report_spec.rb index 9bbbf3af12644..bb7844084d17c 100644 --- a/Library/Homebrew/test/cmd/update-report_spec.rb +++ b/Library/Homebrew/test/cmd/update-report_spec.rb @@ -18,7 +18,7 @@ def initialize(tap) ENV["HOMEBREW_UPDATE_BEFORE#{tap.repo_var_suffix}"] = "12345678" ENV["HOMEBREW_UPDATE_AFTER#{tap.repo_var_suffix}"] = "abcdef00" - super(tap) + super end end end diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 6b2df1d2d42d1..01759df119f77 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -94,7 +94,7 @@ def self.extension_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-ast-1.31.3/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.13.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.5.0/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.63.5/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.64.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-capybara-2.20.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-factory_bot-2.25.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-md-1.2.2/lib") diff --git a/Library/Homebrew/yard/docstring_parser.rb b/Library/Homebrew/yard/docstring_parser.rb index 41770c4102e33..8528295a8106d 100644 --- a/Library/Homebrew/yard/docstring_parser.rb +++ b/Library/Homebrew/yard/docstring_parser.rb @@ -23,7 +23,7 @@ def parse_content(content) # Ignore non-documentation comments. content = content&.sub(/\A(typed|.*rubocop):.*/m, "") - content = super(content) + content = super source = handler&.statement&.source