Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): bump rubocop from 1.65.0 to 1.66.1 in /Library/Homebrew #18255

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/build_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def self.dump(env, out = $stdout)
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)
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/artifact/abstract_uninstall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def uninstall_launchctl(*services, command: nil, **_)
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?)
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/cask/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def initialize(path, reason)

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"
Expand All @@ -209,7 +209,7 @@ def to_s
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"
Expand All @@ -225,7 +225,7 @@ def to_s
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"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Info
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
Expand Down
8 changes: 4 additions & 4 deletions Library/Homebrew/cask/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ def forbidden_tap_check
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?
Expand All @@ -615,8 +615,8 @@ def forbidden_tap_check
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?
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def self.error_message_with_suggestions
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}."

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/caveats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def function_completion_caveats(shell)
#{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
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/gist-logs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def gistify_logs(formula)
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
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,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}
Expand Down Expand Up @@ -695,7 +695,7 @@ def initialize(cmd, status:, output: nil, secrets: [])
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|
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/extend/array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ def to_sentence(words_connector: ", ", two_words_connector: " and ", last_word_c
# 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
4 changes: 2 additions & 2 deletions Library/Homebrew/extend/kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def odeprecated(method, replacement = nil,
require "tap"

tap = Tap.fetch(match[:user], match[:repo])
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"
Expand All @@ -166,7 +166,7 @@ def odeprecated(method, replacement = nil,
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

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4197,7 +4197,7 @@ def pour_bottle?(only_if: nil, &block)
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 }
Expand Down
8 changes: 4 additions & 4 deletions Library/Homebrew/formula_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1503,8 +1503,8 @@ def forbidden_tap_check
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?
Expand All @@ -1519,8 +1519,8 @@ def forbidden_tap_check
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?
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/github_runner_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def generate_runners!
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
Expand Down
Loading
Loading