Merge pull request #18577 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.67.0

This commit is contained in:
Carlo Cabrera 2024-10-18 15:09:40 +08:00 committed by GitHub
commit fdd2aa7902
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 1066 additions and 996 deletions

View File

@ -72,7 +72,7 @@ GEM
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.66.1)
rubocop (1.67.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)

View File

@ -119,7 +119,7 @@ class Hash
case object
when Hash
# We can't use `each_key` here because we're updating the hash in-place.
object.keys.each do |key| # rubocop:disable Style/HashEachMethods
object.keys.each do |key|
value = object.delete(key)
object[yield(key)] = _deep_transform_keys_in_object!(value, &block)
end

View File

@ -338,8 +338,7 @@ module RuboCop
good_args = "Utils.#{command}({ \"#{match[1]}\" => \"#{match[2]}\" }, \"#{match[3]}\")"
problem "Use `#{good_args}` instead of `#{method.source}`" do |corrector|
corrector.replace(@offensive_node.source_range,
"{ \"#{match[1]}\" => \"#{match[2]}\" }, \"#{match[3]}\"")
corrector.replace(method.source_range, good_args)
end
end
end

View File

@ -19,7 +19,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::ShellVariables do
expect_correction(<<~RUBY)
class Foo < Formula
def install
Utils.popen { "SHELL" => "bash" }, "foo"
Utils.popen({ "SHELL" => "bash" }, "foo")
end
end
RUBY
@ -38,7 +38,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::ShellVariables do
expect_correction(<<~RUBY)
class Foo < Formula
def install
Utils.safe_popen_read { "SHELL" => "bash" }, "foo"
Utils.safe_popen_read({ "SHELL" => "bash" }, "foo")
end
end
RUBY
@ -57,7 +57,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::ShellVariables do
expect_correction(<<~RUBY)
class Foo < Formula
def install
Utils.safe_popen_write { "SHELL" => "bash" }, "foo"
Utils.safe_popen_write({ "SHELL" => "bash" }, "foo")
end
end
RUBY
@ -76,7 +76,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::ShellVariables do
expect_correction(<<~RUBY)
class Foo < Formula
def install
Utils.popen { "SHELL" => "bash" }, "\#{bin}/foo"
Utils.popen({ "SHELL" => "bash" }, "\#{bin}/foo")
end
end
RUBY

View File

@ -88,7 +88,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.32.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.6.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.66.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.67.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-md-1.2.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.22.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-3.1.0/lib")