Merge pull request #18255 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.66.1

build(deps-dev): bump rubocop from 1.65.0 to 1.66.1 in /Library/Homebrew
This commit is contained in:
Douglas Eichelberger 2024-10-02 11:51:27 -07:00 committed by GitHub
commit a1613426f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 9108 additions and 1376 deletions

View File

@ -80,15 +80,14 @@ GEM
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.65.0)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)

View File

@ -70,7 +70,7 @@ class BuildEnvironment
keys.each do |key|
value = env.fetch(key)
string = +"#{key}: #{value}"
string = "#{key}: #{value}"
case key
when "CC", "CXX", "LD"
string << " => #{Pathname.new(value).realpath}" if value.present? && File.symlink?(value)

View File

@ -125,8 +125,8 @@ module Cask
sleep 1
end
paths = [
+"/Library/LaunchAgents/#{service}.plist",
+"/Library/LaunchDaemons/#{service}.plist",
"/Library/LaunchAgents/#{service}.plist",
"/Library/LaunchDaemons/#{service}.plist",
]
paths.each { |elt| elt.prepend(Dir.home).freeze } unless sudo
paths = paths.map { |elt| Pathname(elt) }.select(&:exist?)

View File

@ -193,7 +193,7 @@ module Cask
sig { returns(String) }
def to_s
s = +"Failed to quarantine #{path}."
s = "Failed to quarantine #{path}."
unless reason.empty?
s << " Here's the reason:\n"
@ -209,7 +209,7 @@ module Cask
class CaskQuarantinePropagationError < CaskQuarantineError
sig { returns(String) }
def to_s
s = +"Failed to quarantine one or more files within #{path}."
s = "Failed to quarantine one or more files within #{path}."
unless reason.empty?
s << " Here's the reason:\n"
@ -225,7 +225,7 @@ module Cask
class CaskQuarantineReleaseError < CaskQuarantineError
sig { returns(String) }
def to_s
s = +"Failed to release #{path} from quarantine."
s = "Failed to release #{path} from quarantine."
unless reason.empty?
s << " Here's the reason:\n"

View File

@ -9,7 +9,7 @@ module Cask
def self.get_info(cask)
require "cask/installer"
output = +"#{title_info(cask)}\n"
output = "#{title_info(cask)}\n"
output << "#{Formatter.url(cask.homepage)}\n" if cask.homepage
deprecate_disable = DeprecateDisable.message(cask)
output << "#{deprecate_disable.capitalize}\n" if deprecate_disable

View File

@ -602,8 +602,8 @@ on_request: true)
next if dep_tap.blank? || (dep_tap.allowed_by_env? && !dep_tap.forbidden_by_env?)
dep_full_name = cask_or_formula.full_name
error_message = +"The installation of #{@cask} has a dependency #{dep_full_name}\n" \
"from the #{dep_tap} tap but #{owner} "
error_message = "The installation of #{@cask} has a dependency #{dep_full_name}\n" \
"from the #{dep_tap} tap but #{owner} "
error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless dep_tap.allowed_by_env?
error_message << " and\n" if !dep_tap.allowed_by_env? && dep_tap.forbidden_by_env?
error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if dep_tap.forbidden_by_env?
@ -616,8 +616,8 @@ on_request: true)
cask_tap = @cask.tap
return if cask_tap.blank? || (cask_tap.allowed_by_env? && !cask_tap.forbidden_by_env?)
error_message = +"The installation of #{@cask.full_name} has the tap #{cask_tap}\n" \
"but #{owner} "
error_message = "The installation of #{@cask.full_name} has the tap #{cask_tap}\n" \
"but #{owner} "
error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless cask_tap.allowed_by_env?
error_message << " and\n" if !cask_tap.allowed_by_env? && cask_tap.forbidden_by_env?
error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if cask_tap.forbidden_by_env?

View File

@ -128,7 +128,7 @@ module Cask
end
def self.method_missing_message(method, token, section = nil)
message = +"Unexpected method '#{method}' called "
message = "Unexpected method '#{method}' called "
message << "during #{section} " if section
message << "on Cask #{token}."

View File

@ -134,7 +134,7 @@ class Caveats
#{root_dir}/etc/bash_completion.d
EOS
when :fish
fish_caveats = +"fish #{installed.join(" and ")} have been installed to:"
fish_caveats = "fish #{installed.join(" and ")} have been installed to:"
fish_caveats << "\n #{root_dir}/share/fish/vendor_completions.d" if completion_installed
fish_caveats << "\n #{root_dir}/share/fish/vendor_functions.d" if functions_installed
fish_caveats.freeze

View File

@ -92,7 +92,7 @@ module Homebrew
sig { params(formula: Formula, with_hostname: T::Boolean).returns(String) }
def brief_build_info(formula, with_hostname:)
build_time_string = formula.logs.ctime.strftime("%Y-%m-%d %H:%M:%S")
string = +<<~EOS
string = <<~EOS
Homebrew build logs for #{formula.full_name} on #{OS_VERSION}
EOS
if with_hostname

View File

@ -562,7 +562,7 @@ class UnbottledError < RuntimeError
def initialize(formulae)
require "utils"
msg = +<<~EOS
msg = <<~EOS
The following #{Utils.pluralize("formula", formulae.count, plural: "e")} cannot be installed from #{Utils.pluralize("bottle", formulae.count)} and must be
built from source.
#{formulae.to_sentence}
@ -686,7 +686,7 @@ class ErrorDuringExecution < RuntimeError
raise ArgumentError, "Status neither has `exitstatus` nor `termsig`."
end
s = +"Failure while executing; `#{redacted_cmd}` #{reason}."
s = "Failure while executing; `#{redacted_cmd}` #{reason}."
if Array(output).present?
format_output_line = lambda do |type_line|

View File

@ -98,9 +98,9 @@ class Array
# This is not typesafe, if the array contains a BasicObject
+T.unsafe(self[0]).to_s
when 2
+"#{self[0]}#{two_words_connector}#{self[1]}"
"#{self[0]}#{two_words_connector}#{self[1]}"
else
+"#{T.must(self[0...-1]).join(words_connector)}#{last_word_connector}#{self[-1]}"
"#{T.must(self[0...-1]).join(words_connector)}#{last_word_connector}#{self[-1]}"
end
end
end

View File

@ -157,7 +157,7 @@ module Kernel
require "tap"
tap = Tap.fetch(match[:user], match[:repository])
tap_message = +"\nPlease report this issue to the #{tap.full_name} tap"
tap_message = "\nPlease report this issue to the #{tap.full_name} tap"
tap_message += " (not Homebrew/brew or Homebrew/homebrew-core)" unless tap.official?
tap_message += ", or even better, submit a PR to fix it" if replacement
tap_message << ":\n #{line.sub(/^(.*:\d+):.*$/, '\1')}\n\n"
@ -166,7 +166,7 @@ module Kernel
file, line, = backtrace.first.split(":")
line = line.to_i if line.present?
message = +"Calling #{method} is #{verb}! #{replacement_message}"
message = "Calling #{method} is #{verb}! #{replacement_message}"
message << tap_message if tap_message
message.freeze

View File

@ -4196,7 +4196,7 @@ class Formula
when :default_prefix
lambda do |_|
T.bind(self, PourBottleCheck)
reason(+<<~EOS)
reason(<<~EOS)
The bottle (and many others) needs to be installed into #{Homebrew::DEFAULT_PREFIX}.
EOS
satisfy { HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX }

View File

@ -1503,8 +1503,8 @@ on_request: installed_on_request?, options:)
dep_tap = dep.tap
next if dep_tap.blank? || (dep_tap.allowed_by_env? && !dep_tap.forbidden_by_env?)
error_message = +"The installation of #{formula.name} has a dependency #{dep.name}\n" \
"from the #{dep_tap} tap but #{owner} "
error_message = "The installation of #{formula.name} has a dependency #{dep.name}\n" \
"from the #{dep_tap} tap but #{owner} "
error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless dep_tap.allowed_by_env?
error_message << " and\n" if !dep_tap.allowed_by_env? && dep_tap.forbidden_by_env?
error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if dep_tap.forbidden_by_env?
@ -1519,8 +1519,8 @@ on_request: installed_on_request?, options:)
formula_tap = formula.tap
return if formula_tap.blank? || (formula_tap.allowed_by_env? && !formula_tap.forbidden_by_env?)
error_message = +"The installation of #{formula.full_name} has the tap #{formula_tap}\n" \
"but #{owner} "
error_message = "The installation of #{formula.full_name} has the tap #{formula_tap}\n" \
"but #{owner} "
error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless formula_tap.allowed_by_env?
error_message << " and\n" if !formula_tap.allowed_by_env? && formula_tap.forbidden_by_env?
error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if formula_tap.forbidden_by_env?

View File

@ -149,7 +149,7 @@ class GitHubRunnerMatrix
use_github_runner ||= @dependent_matrix
use_github_runner &&= runner_timeout <= GITHUB_ACTIONS_RUNNER_TIMEOUT
ephemeral_suffix = +"-#{github_run_id}"
ephemeral_suffix = "-#{github_run_id}"
ephemeral_suffix << "-deps" if @dependent_matrix
ephemeral_suffix << "-long" if runner_timeout == GITHUB_ACTIONS_LONG_TIMEOUT
ephemeral_suffix.freeze

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,6 @@ gem:
- rspec_junit_formatter
- rubocop-md
- rubocop-performance
- rubocop-rspec
- rubocop-sorbet
- ruby-prof
- simplecov_json_formatter

View File

@ -459,7 +459,7 @@ class Tap
"\n#{contact}"
end
error_message = +"The installation of the #{full_name} was requested but #{owner}\n"
error_message = "The installation of the #{full_name} was requested but #{owner}\n"
error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless allowed_by_env?
error_message << " and\n" if !allowed_by_env? && forbidden_by_env?
error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if forbidden_by_env?

View File

@ -175,7 +175,7 @@ RSpec.describe InstalledDependents do
end
def stub_cask_name(name, version, dependency)
c = Cask::CaskLoader.load(+<<-RUBY)
c = Cask::CaskLoader.load(<<-RUBY)
cask "#{name}" do
version "#{version}"

View File

@ -39,7 +39,7 @@ RSpec.describe Keg::Relocation do
relocation.replace_text(text)
expect(text).to eq "foo"
text = +<<~TEXT
text = <<~TEXT
#{prefix}/foo
#{cellar}/foo
foo#{prefix}/bar

View File

@ -80,7 +80,7 @@ module GitHub
class AuthenticationFailedError < Error
def initialize(credentials_type, github_message)
@github_message = github_message
message = +"GitHub API Error: #{github_message}\n"
message = "GitHub API Error: #{github_message}\n"
message << case credentials_type
when :github_cli_token
<<~EOS

View File

@ -91,7 +91,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.65.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-md-1.2.3/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")