Skip to content

Commit

Permalink
Merge pull request #18577 from Homebrew/dependabot/bundler/Library/Ho…
Browse files Browse the repository at this point in the history
…mebrew/rubocop-1.67.0
  • Loading branch information
carlocab authored Oct 18, 2024
2 parents 215064e + 7aee21c commit fdd2aa7
Show file tree
Hide file tree
Showing 6 changed files with 1,061 additions and 991 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/hash/keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _deep_transform_keys_in_object!(object, &block)
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
Expand Down
3 changes: 1 addition & 2 deletions Library/Homebrew/rubocops/lines.rb
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ def audit_formula(formula_nodes)
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
Expand Down
Loading

0 comments on commit fdd2aa7

Please sign in to comment.