From e6cc04668c99f1efc8b80fe12b11b774c7d8947a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 19:54:01 +0000 Subject: [PATCH 1/4] build(deps): bump rubocop from 1.49.0 to 1.50.0 in /Library/Homebrew Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.49.0 to 1.50.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.49.0...v1.50.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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index e09436a75c..3de77565c3 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -130,7 +130,7 @@ GEM rspec-support (3.12.0) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.49.0) + rubocop (1.50.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) From 73b1fd1388e092ed28959663c5809e2359a9b5de Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Tue, 11 Apr 2023 19:58:03 +0000 Subject: [PATCH 2/4] 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 e1195a263d..7882653365 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.28.0/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.4.2/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.49.0/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.50.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.17.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.19.0/lib") From ad188c9a4b15cb7a8dcc430a6bf98adaa43ffea6 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Tue, 11 Apr 2023 20:04:55 +0000 Subject: [PATCH 3/4] 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.49.0.rbi => rubocop@1.50.0.rbi} | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{rubocop@1.49.0.rbi => rubocop@1.50.0.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.49.0.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.50.0.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.49.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.50.0.rbi index 6dd2fbee5d..f26246eb31 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.49.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.50.0.rbi @@ -2311,6 +2311,7 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector def on_class(class_node); end + def on_sclass(class_node); end private @@ -4741,6 +4742,18 @@ end RuboCop::Cop::Lint::DuplicateMagicComment::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Lint::DuplicateMatchPattern < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + def on_case_match(case_node); end + + private + + def pattern_identity(pattern); end +end + +RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) + class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end @@ -5754,11 +5767,17 @@ class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector def on_interpolation(begin_node); end + def on_send(node); end def to_s_without_args?(param0 = T.unsafe(nil)); end + + private + + def register_offense(node, context); end end RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) +RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp @@ -6625,6 +6644,7 @@ class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base def on_casgn(node); end def on_class(node); end + def on_sclass(node); end private @@ -8390,6 +8410,9 @@ class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base def class_name(class_node, node); end def class_name_method?(method_name); end def offense_range(receiver_node, node); end + def require_cbase?(class_node); end + def trim_string_quotes(class_node); end + def unable_to_determine_type?(class_node); end end RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array) @@ -10517,7 +10540,7 @@ class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base private def arguments_range(node); end - def autocorrect(corrector, node); end + def autocorrect(corrector, node, begin_of_arguments); end def closing_line(node); end def correction_exceeds_max_line_length?(node); end def definition_width(node); end @@ -11703,16 +11726,20 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base private + def argument_is_method?(node); end def argument_newline?(node); end def ends_with_backslash_without_comment?(source_line); end def find_node_for_line(line); end + def inside_string_literal?(range); end + def method_call_with_arguments?(node); end def redundant_line_continuation?(range); end def require_line_continuation?(range); end def same_line?(node, line); end - def starts_with_plus_or_minus?(source_line); end + def start_with_arithmetic_operator?(source_line); end def string_concatenation?(source_line); end end +RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base @@ -12791,6 +12818,7 @@ class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector def on_class(node); end + def on_sclass(node); end end RuboCop::Cop::Style::TrailingBodyOnClass::MSG = T.let(T.unsafe(nil), String) From 5aa24832df0b8baad6577d28bc5797bfdf7b0723 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 11 Apr 2023 21:12:13 +0100 Subject: [PATCH 4/4] brew style --fix --- Library/Homebrew/debrew.rb | 2 +- Library/Homebrew/test/language/node_spec.rb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/debrew.rb b/Library/Homebrew/debrew.rb index 661d9e7428..05acc2da8b 100644 --- a/Library/Homebrew/debrew.rb +++ b/Library/Homebrew/debrew.rb @@ -102,7 +102,7 @@ module Debrew raise(exception) if !active? || !debugged_exceptions.add?(exception) || !mu_try_lock begin - puts exception.backtrace.first.to_s + puts exception.backtrace.first puts Formatter.error(exception, label: exception.class.name) loop do diff --git a/Library/Homebrew/test/language/node_spec.rb b/Library/Homebrew/test/language/node_spec.rb index dc80eed2f8..36f1eefd8c 100644 --- a/Library/Homebrew/test/language/node_spec.rb +++ b/Library/Homebrew/test/language/node_spec.rb @@ -45,14 +45,12 @@ describe Language::Node do it "raises error with non zero exitstatus" do allow(Utils).to receive(:popen_read).with(*npm_pack_cmd).and_return(`false`) - expect { described_class.std_npm_install_args(npm_install_arg) }.to \ - raise_error("npm failed to pack #{Dir.pwd}") + expect { described_class.std_npm_install_args(npm_install_arg) }.to raise_error("npm failed to pack #{Dir.pwd}") end it "raises error with empty npm pack output" do allow(Utils).to receive(:popen_read).with(*npm_pack_cmd).and_return(`true`) - expect { described_class.std_npm_install_args(npm_install_arg) }.to \ - raise_error("npm failed to pack #{Dir.pwd}") + expect { described_class.std_npm_install_args(npm_install_arg) }.to raise_error("npm failed to pack #{Dir.pwd}") end it "does not raise error with a zero exitstatus" do