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_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.72.2)
rubocop (1.73.1)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)

View File

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

View File

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

View File

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

View File

@ -85,21 +85,15 @@ module Homebrew
run_shellcheck(shell_files, output_type, fix:)
end
shfmt_result = if files.present? && shell_files.empty?
true
else
run_shfmt(shell_files, fix:)
end
shfmt_result = files.present? && shell_files.empty?
shfmt_result ||= run_shfmt(shell_files, fix:)
has_actionlint_workflow = actionlint_files.any? do |path|
path.to_s.end_with?("/.github/workflows/actionlint.yml")
end
odebug "actionlint workflow detected. Skipping actionlint checks." if has_actionlint_workflow
actionlint_result = if files.present? && (has_actionlint_workflow || actionlint_files.empty?)
true
else
run_actionlint(actionlint_files)
end
actionlint_result = files.present? && (has_actionlint_workflow || actionlint_files.empty?)
actionlint_result ||= run_actionlint(actionlint_files)
if output_type == :json
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: "")
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
options = nil if options.blank?
@ -137,9 +134,6 @@ module Utils
return if not_this_run? || disabled?
return if ENV["HOMEBREW_TEST_BOT_ANALYTICS"].blank?
# ensure passed is a boolean
passed = passed ? true : false
# Tags must have low cardinality.
tags = {
passed:,

View File

@ -340,11 +340,8 @@ module PyPI
show_info = !print_only && !silent
ohai "Retrieving PyPI dependencies for \"#{input_packages.join(" ")}\"..." if show_info
print_stderr = if verbose && show_info
true
else
false
end
print_stderr = verbose && show_info
print_stderr ||= false
found_packages = pip_report(input_packages, python_name:, print_stderr:)
# 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/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/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-performance-1.23.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-3.4.0/lib")