From e91b60ef68f3b390ad2c02360570b20ba883b82f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 18:14:31 +0000 Subject: [PATCH 1/5] build(deps): bump rubocop from 1.45.1 to 1.46.0 in /Library/Homebrew Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.45.1 to 1.46.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.45.1...v1.46.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 8567a46f92..a7e1e3981f 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -130,14 +130,14 @@ GEM rspec-support (3.12.0) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.45.1) + rubocop (1.46.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.24.1, < 2.0) + rubocop-ast (>= 1.26.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.26.0) From 30a64593f6e97f9255b3ce3d4b68602d8e9ec61b Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 23 Feb 2023 18:18:18 +0000 Subject: [PATCH 2/5] brew vendor-gems: commit updates. --- Library/Homebrew/vendor/bundle/bundler/setup.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index d5a6a8e9ae..b0dffb6667 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -103,7 +103,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-ast-1.26.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.11.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.4.2/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.45.1/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.46.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-capybara-2.17.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.16.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.4/lib") From 40f286fc429e8408b747752d8848f25d9ce9d2ce Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 23 Feb 2023 18:26:08 +0000 Subject: [PATCH 3/5] Update RBI files for rubocop. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- ...{rubocop@1.45.1.rbi => rubocop@1.46.0.rbi} | 27 +-- .../sorbet/rbi/hidden-definitions/hidden.rbi | 171 +----------------- 2 files changed, 22 insertions(+), 176 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{rubocop@1.45.1.rbi => rubocop@1.46.0.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.45.1.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.46.0.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.45.1.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.46.0.rbi index 8fccd00963..01e2b705f9 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.45.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.46.0.rbi @@ -216,6 +216,7 @@ class RuboCop::CommentConfig def config(*args, &block); end def cop_disabled_line_ranges; end def cop_enabled_at_line?(cop, line_number); end + def cop_opted_in?(cop); end def extra_enabled_comments; end def processed_source; end def registry(*args, &block); end @@ -234,6 +235,7 @@ class RuboCop::CommentConfig def handle_switch(directive, names, extras); end def inject_disabled_cops_directives(analyses); end def non_comment_token_line_numbers; end + def opt_in_cops; end def qualified_cop_name(cop_name); end end @@ -1934,7 +1936,7 @@ module RuboCop::Cop::HashShorthandSyntax def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end def ignore_hash_shorthand_syntax?(pair_node); end def ignore_mixed_hash_shorthand_syntax?(hash_node); end - def last_expression?(ancestor); end + def last_expression?(node); end def method_dispatch_as_argument?(method_dispatch_node); end def mixed_shorthand_syntax_check(hash_value_type_breakdown); end def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end @@ -2844,6 +2846,7 @@ class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base def on_class(node); end def on_if(node); end def on_module(node); end + def on_sclass(node); end def on_until(node); end def on_while(node); end @@ -3111,6 +3114,7 @@ class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop:: def add_correct_closing_paren(node, corrector); end def add_correct_external_trailing_comma(node, corrector); end def autocorrect(corrector, node); end + def end_keyword_before_closing_parentesis?(parenthesized_send_node); end def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end def external_trailing_comma?(node); end def external_trailing_comma_offset_from_loc_end(node); end @@ -3352,13 +3356,13 @@ class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base def comment_ranges(comments); end def find_offensive_spacing(line); end def ignore_range?(backtick_range); end + def ignored_literal_ranges(ast); end def ignored_ranges; end def investigate(line, line_number); end def last_line(processed_source); end def message(_range); end def no_space_style?; end def space_style?; end - def string_literal_ranges(ast); end end class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base @@ -5291,7 +5295,6 @@ class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - def class_constructor?(param0 = T.unsafe(nil)); end def eval_call?(param0 = T.unsafe(nil)); end def exec_call?(param0 = T.unsafe(nil)); end def on_def(node); end @@ -5485,8 +5488,8 @@ class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base def check_regexp(node); end def nth_ref_receiver?(send_node); end - def patterns(pattern_node); end def regexp_first_argument?(send_node); end + def regexp_patterns(in_node); end def regexp_receiver?(send_node); end end @@ -5629,6 +5632,7 @@ end RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) +RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp @@ -6316,7 +6320,6 @@ class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - def class_constructor?(param0 = T.unsafe(nil)); end def class_or_instance_eval?(param0 = T.unsafe(nil)); end def dynamic_method_definition?(param0 = T.unsafe(nil)); end def on_block(node); end @@ -7889,11 +7892,11 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base private - def accessor?(send_node); end def autocorrect(corrector, node); end def check(send_node); end def class_send_elements(class_node); end def group_accessors(node, accessors); end + def groupable_accessor?(node); end def grouped_style?; end def message(send_node); end def preferred_accessors(node); end @@ -7903,7 +7906,6 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base def sibling_accessors(send_node); end end -RuboCop::Cop::Style::AccessorGrouping::ACCESSOR_METHODS = T.let(T.unsafe(nil), Array) RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) @@ -8809,7 +8811,7 @@ class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base include ::RuboCop::Cop::VisibilityHelp include ::RuboCop::Cop::DefNode - def module_function_node?(param0 = T.unsafe(nil)); end + def modifier_node?(param0 = T.unsafe(nil)); end def on_def(node); end def on_defs(node); end @@ -11673,10 +11675,10 @@ class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base private def backslash_b?(elem); end - def backslash_zero?(elem); end def each_redundant_character_class(node); end def each_single_element_character_class(node); end def multiple_codepoins?(expression); end + def octal_requiring_char_class?(elem); end def redundant_single_element_character_class?(node, char_class); end def requires_escape_outside_char_class?(elem); end def whitespace_in_free_space_mode?(node, elem); end @@ -12907,13 +12909,15 @@ class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector def on_array(node); end + def on_new_investigation; end private def build_bracketed_array(node); end def complex_content?(strings, complex_regex: T.unsafe(nil)); end def invalid_percent_array_contents?(node); end - def within_2d_array_of_complex_content?(node); end + def matrix_of_complex_content?(array); end + def within_matrix_of_complex_content?(node); end def word_regex; end class << self @@ -13061,7 +13065,7 @@ class RuboCop::Cop::Team def investigate_partial(cops, processed_source, offset:, original:); end def process_errors(file, errors); end def reset; end - def roundup_relevant_cops(filename); end + def roundup_relevant_cops(processed_source); end def support_target_rails_version?(cop); end def support_target_ruby_version?(cop); end def suppress_clobbering; end @@ -13204,6 +13208,7 @@ end RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) +RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer) module RuboCop::Cop::Utils; end class RuboCop::Cop::Utils::FormatString diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index 071654aea2..1fcb39ee96 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -2953,69 +2953,16 @@ class Cask::AbstractCaskErrorWithToken extend ::T::Private::Methods::SingletonMethodHooks end +class Cask::Artifact::AbstractArtifact + extend ::T::Private::Abstract::Hooks + extend ::T::InterfaceWrapper::Helpers +end + module Cask::Cache extend ::T::Private::Methods::MethodHooks extend ::T::Private::Methods::SingletonMethodHooks end -class Cask::Cask - def app(&block); end - - def artifact(&block); end - - def audio_unit_plugin(&block); end - - def binary(&block); end - - def colorpicker(&block); end - - def dictionary(&block); end - - def font(&block); end - - def input_method(&block); end - - def installer(&block); end - - def internet_plugin(&block); end - - def manpage(&block); end - - def mdimporter(&block); end - - def on_system_blocks_exist?(&block); end - - def pkg(&block); end - - def postflight(&block); end - - def preflight(&block); end - - def prefpane(&block); end - - def qlplugin(&block); end - - def screen_saver(&block); end - - def service(&block); end - - def stage_only(&block); end - - def suite(&block); end - - def uninstall(&block); end - - def uninstall_postflight(&block); end - - def uninstall_preflight(&block); end - - def vst3_plugin(&block); end - - def vst_plugin(&block); end - - def zap(&block); end -end - class Cask::CaskQuarantineError extend ::T::Private::Methods::MethodHooks extend ::T::Private::Methods::SingletonMethodHooks @@ -3084,84 +3031,6 @@ class Cask::Config def vst_plugindir=(path); end end -class Cask::DSL - def app(*args, **kwargs); end - - def artifact(*args, **kwargs); end - - def audio_unit_plugin(*args, **kwargs); end - - def binary(*args, **kwargs); end - - def colorpicker(*args, **kwargs); end - - def dictionary(*args, **kwargs); end - - def font(*args, **kwargs); end - - def input_method(*args, **kwargs); end - - def installer(*args, **kwargs); end - - def internet_plugin(*args, **kwargs); end - - def manpage(*args, **kwargs); end - - def mdimporter(*args, **kwargs); end - - def on_arch_conditional(arm: T.unsafe(nil), intel: T.unsafe(nil)); end - - def on_arm(&block); end - - def on_big_sur(or_condition=T.unsafe(nil), &block); end - - def on_catalina(or_condition=T.unsafe(nil), &block); end - - def on_el_capitan(or_condition=T.unsafe(nil), &block); end - - def on_high_sierra(or_condition=T.unsafe(nil), &block); end - - def on_intel(&block); end - - def on_mojave(or_condition=T.unsafe(nil), &block); end - - def on_monterey(or_condition=T.unsafe(nil), &block); end - - def on_sierra(or_condition=T.unsafe(nil), &block); end - - def on_ventura(or_condition=T.unsafe(nil), &block); end - - def pkg(*args, **kwargs); end - - def postflight(&block); end - - def preflight(&block); end - - def prefpane(*args, **kwargs); end - - def qlplugin(*args, **kwargs); end - - def screen_saver(*args, **kwargs); end - - def service(*args, **kwargs); end - - def stage_only(*args, **kwargs); end - - def suite(*args, **kwargs); end - - def uninstall(*args, **kwargs); end - - def uninstall_postflight(&block); end - - def uninstall_preflight(&block); end - - def vst3_plugin(*args, **kwargs); end - - def vst_plugin(*args, **kwargs); end - - def zap(*args, **kwargs); end -end - class Cask::DSL::Caveats def depends_on_java(*args); end @@ -4559,18 +4428,6 @@ class Homebrew::FormulaCreator extend ::T::Private::Methods::SingletonMethodHooks end -class Homebrew::Livecheck::Strategy::ExtractPlist::Item - def short_version(*args, &block); end - - def version(*args, &block); end -end - -class Homebrew::Livecheck::Strategy::ExtractPlist::Item - def self.[](*arg); end - - def self.members(); end -end - class Homebrew::Livecheck::Strategy::Sparkle::Item def nice_version(*args, &block); end @@ -5538,7 +5395,6 @@ class Object TARGET_MAN_PATH = ::T.let(nil, ::T.untyped) TESTBALL_PATCHES_SHA256 = ::T.let(nil, ::T.untyped) TESTBALL_SHA256 = ::T.let(nil, ::T.untyped) - TEST_DIRECTORIES = ::T.let(nil, ::T.untyped) TEST_FIXTURE_DIR = ::T.let(nil, ::T.untyped) TEST_SHA1 = ::T.let(nil, ::T.untyped) TEST_SHA256 = ::T.let(nil, ::T.untyped) @@ -6016,22 +5872,6 @@ class RSpec::Expectations::MultipleExpectationsNotMetError include ::RSpec::Core::MultipleExceptionError::InterfaceTag end -module RSpec::Matchers - def a_json_string(*expected, &block_arg); end - - def a_string_containing(*args, &block); end - - def array_including_cons(*expected, &block_arg); end - - def be_a_failure(*args, &block); end - - def have_failed(*args, &block); end - - def not_raise_error(*args, &block); end - - def not_to_output(*args, &block); end -end - module Racc Racc_No_Extensions = ::T.let(nil, ::T.untyped) end @@ -6769,6 +6609,7 @@ module RuboCop::AST::NodePattern::Sets SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_MAC_LINUX = ::T.let(nil, ::T.untyped) + SET_MODULE_FUNCTION_RUBY2_KEYWORDS = ::T.let(nil, ::T.untyped) SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped) SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped) SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped) From e95ce6967a81b558b41627763a372964fb1c8d48 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 24 Feb 2023 13:50:07 +0000 Subject: [PATCH 4/5] brew style --fix --- Library/Homebrew/cask/artifact_set.rb | 3 --- Library/Homebrew/utils/tty.rb | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Library/Homebrew/cask/artifact_set.rb b/Library/Homebrew/cask/artifact_set.rb index c4d466df3e..b92d1eeaf9 100644 --- a/Library/Homebrew/cask/artifact_set.rb +++ b/Library/Homebrew/cask/artifact_set.rb @@ -9,10 +9,7 @@ module Cask # @api private class ArtifactSet < ::Set def each(&block) - # TODO: This is a false positive: https://github.com/rubocop/rubocop/issues/11591 - # rubocop:disable Lint/ToEnumArguments return enum_for(T.must(__method__)) { size } unless block - # rubocop:enable Lint/ToEnumArguments to_a.each(&block) self diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb index ddb7da3824..b95317bbb8 100644 --- a/Library/Homebrew/utils/tty.rb +++ b/Library/Homebrew/utils/tty.rb @@ -118,5 +118,5 @@ module Tty @stream.tty? end -end + end end From 8a01478fb1fe2ae168a4f462396bc776c3b3b0d3 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Fri, 24 Feb 2023 08:26:22 -0800 Subject: [PATCH 5/5] Remove stray rubocop:enable comments --- Library/Homebrew/livecheck/livecheck.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Library/Homebrew/livecheck/livecheck.rb b/Library/Homebrew/livecheck/livecheck.rb index db2bb8106a..9e2920a77c 100644 --- a/Library/Homebrew/livecheck/livecheck.rb +++ b/Library/Homebrew/livecheck/livecheck.rb @@ -393,7 +393,6 @@ module Homebrew nil end end - # rubocop:enable Metrics/BlockLength puts "No newer upstream versions." if newer_only && !has_a_newer_upstream_version && !debug && !json @@ -408,8 +407,6 @@ module Homebrew puts JSON.pretty_generate(formulae_checked.compact) end - # rubocop:enable Metrics/CyclomaticComplexity - # rubocop:enable Metrics/PerceivedComplexity sig { params(package_or_resource: T.any(Formula, Cask::Cask, Resource), full_name: T::Boolean).returns(String) } def package_or_resource_name(package_or_resource, full_name: false) @@ -1015,5 +1012,4 @@ module Homebrew resource_version_info end end - # rubocop:enable Metrics/ModuleLength end