Merge pull request #19393 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.73.1

build(deps-dev): bump rubocop from 1.72.2 to 1.73.1 in /Library/Homebrew
This commit is contained in:
Mike McQuaid 2025-02-28 10:08:29 +00:00 committed by GitHub
commit fb24f4d367
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 657 additions and 395 deletions

View File

@ -76,7 +76,7 @@ GEM
rspec-support (3.13.2) rspec-support (3.13.2)
rspec_junit_formatter (0.6.0) rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0) rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.72.2) rubocop (1.73.1)
json (~> 2.3) json (~> 2.3)
language_server-protocol (~> 3.17.0.2) language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0) lint_roller (~> 1.1.0)

View File

@ -748,14 +748,12 @@ module Homebrew
def check_for_unlinked_but_not_keg_only def check_for_unlinked_but_not_keg_only
unlinked = Formula.racks.reject do |rack| unlinked = Formula.racks.reject do |rack|
if (HOMEBREW_LINKED_KEGS/rack.basename).directory? next true if (HOMEBREW_LINKED_KEGS/rack.basename).directory?
true
else begin
begin Formulary.from_rack(rack).keg_only?
Formulary.from_rack(rack).keg_only? rescue FormulaUnavailableError, TapFormulaAmbiguityError
rescue FormulaUnavailableError, TapFormulaAmbiguityError false
false
end
end end
end.map(&:basename) end.map(&:basename)
return if unlinked.empty? return if unlinked.empty?

View File

@ -809,11 +809,8 @@ on_request: installed_on_request?, options:)
options |= inherited_options options |= inherited_options
options &= df.options options &= df.options
installed_on_request = if df.any_version_installed? && tab.present? && tab.installed_on_request installed_on_request = df.any_version_installed? && tab.present? && tab.installed_on_request
true installed_on_request ||= false
else
false
end
fi = FormulaInstaller.new( fi = FormulaInstaller.new(
df, df,

View File

@ -81,11 +81,9 @@ class Locale
end end
[:language, :script, :region].all? do |var| [:language, :script, :region].all? do |var|
if other.public_send(var).nil? next true if other.public_send(var).nil?
true
else public_send(var) == other.public_send(var)
public_send(var) == other.public_send(var)
end
end end
end end

View File

@ -85,21 +85,15 @@ module Homebrew
run_shellcheck(shell_files, output_type, fix:) run_shellcheck(shell_files, output_type, fix:)
end end
shfmt_result = if files.present? && shell_files.empty? shfmt_result = files.present? && shell_files.empty?
true shfmt_result ||= run_shfmt(shell_files, fix:)
else
run_shfmt(shell_files, fix:)
end
has_actionlint_workflow = actionlint_files.any? do |path| has_actionlint_workflow = actionlint_files.any? do |path|
path.to_s.end_with?("/.github/workflows/actionlint.yml") path.to_s.end_with?("/.github/workflows/actionlint.yml")
end end
odebug "actionlint workflow detected. Skipping actionlint checks." if has_actionlint_workflow odebug "actionlint workflow detected. Skipping actionlint checks." if has_actionlint_workflow
actionlint_result = if files.present? && (has_actionlint_workflow || actionlint_files.empty?) actionlint_result = files.present? && (has_actionlint_workflow || actionlint_files.empty?)
true actionlint_result ||= run_actionlint(actionlint_files)
else
run_actionlint(actionlint_files)
end
if output_type == :json if output_type == :json
Offenses.new(rubocop_result + shellcheck_result) Offenses.new(rubocop_result + shellcheck_result)

View File

@ -71,9 +71,6 @@ module Utils
def report_package_event(measurement, package_name:, tap_name:, on_request: false, options: "") def report_package_event(measurement, package_name:, tap_name:, on_request: false, options: "")
return if not_this_run? || disabled? return if not_this_run? || disabled?
# ensure on_request is a boolean
on_request = on_request ? true : false
# ensure options are removed (by `.compact` below) if empty # ensure options are removed (by `.compact` below) if empty
options = nil if options.blank? options = nil if options.blank?
@ -137,9 +134,6 @@ module Utils
return if not_this_run? || disabled? return if not_this_run? || disabled?
return if ENV["HOMEBREW_TEST_BOT_ANALYTICS"].blank? return if ENV["HOMEBREW_TEST_BOT_ANALYTICS"].blank?
# ensure passed is a boolean
passed = passed ? true : false
# Tags must have low cardinality. # Tags must have low cardinality.
tags = { tags = {
passed:, passed:,

View File

@ -340,11 +340,8 @@ module PyPI
show_info = !print_only && !silent show_info = !print_only && !silent
ohai "Retrieving PyPI dependencies for \"#{input_packages.join(" ")}\"..." if show_info ohai "Retrieving PyPI dependencies for \"#{input_packages.join(" ")}\"..." if show_info
print_stderr = if verbose && show_info print_stderr = verbose && show_info
true print_stderr ||= false
else
false
end
found_packages = pip_report(input_packages, python_name:, print_stderr:) found_packages = pip_report(input_packages, python_name:, print_stderr:)
# Resolve the dependency tree of excluded packages to prune the above # Resolve the dependency tree of excluded packages to prune the above

View File

@ -94,7 +94,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.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/ruby-progressbar-1.13.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-emoji-4.0.4/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-emoji-4.0.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-3.1.4/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-3.1.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.72.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.73.1/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-md-1.2.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.23.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.23.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-3.4.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-3.4.0/lib")