Merge pull request #18577 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.67.0
This commit is contained in:
commit
fdd2aa7902
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user