brew style --fix

This commit is contained in:
Patrick Linnane 2025-08-13 12:23:12 -07:00
parent 6b10f65cb7
commit 2605529a90
No known key found for this signature in database
18 changed files with 22 additions and 3 deletions

View File

@ -8,6 +8,7 @@ module Cask
# Abstract superclass for all artifacts.
class AbstractArtifact
extend T::Helpers
abstract!
include Comparable

View File

@ -18,6 +18,7 @@ module Cask
module ILoader
extend T::Helpers
interface!
sig { abstract.params(config: T.nilable(Config)).returns(Cask) }
@ -28,6 +29,7 @@ module Cask
class AbstractContentLoader
include ILoader
extend T::Helpers
abstract!
sig { returns(String) }

View File

@ -40,6 +40,7 @@ module Cask
attr_reader :tag, :branch, :revision, :only_path, :verified
extend Forwardable
def_delegators :uri, :path, :scheme, :to_s
# Creates a `url` stanza.

View File

@ -10,6 +10,7 @@ module Homebrew
module Cmd
class Deps < AbstractCommand
include DependenciesHelpers
cmd_args do
description <<~EOS
Show dependencies for <formula>. When given multiple formula arguments,

View File

@ -11,6 +11,7 @@ module Homebrew
module Cmd
class FetchCmd < AbstractCommand
include Fetch
FETCH_MAX_TRIES = 5
cmd_args do

View File

@ -12,6 +12,7 @@ module Homebrew
module Cmd
class GistLogs < AbstractCommand
include Install
cmd_args do
description <<~EOS
Upload logs for a failed build of <formula> to a new Gist. Presents an

View File

@ -1000,12 +1000,12 @@ module Homebrew
locale_variables = ENV.keys.grep(/^(?:LC_\S+|LANG|LANGUAGE)\Z/).sort
add_info "Cask Environment Variables:", ((locale_variables + environment_variables).sort.each do |var|
add_info "Cask Environment Variables:", (locale_variables + environment_variables).sort.each do |var|
next unless ENV.key?(var)
var = %Q(#{var}="#{ENV.fetch(var)}")
user_tilde(var)
end)
end
end
def check_cask_xattr

View File

@ -2,6 +2,7 @@
module Ignorable
include Kernel
# This is a workaround to enable `raise` to be aliased
# @see https://github.com/sorbet/sorbet/issues/2378#issuecomment-569474238
def self.raise(*); end

View File

@ -8,6 +8,7 @@ module Homebrew
# method implementations here.
module Strategic
extend T::Helpers
interface!
# Whether the strategy can be applied to the provided URL.

View File

@ -3,5 +3,6 @@
module RuboCop::Cop::Cask::CaskHelp
# Sorbet doesn't understand `prepend`: https://github.com/sorbet/sorbet/issues/259
include RuboCop::Cop::CommentsHelp
requires_ancestor { RuboCop::Cop::Base }
end

View File

@ -146,6 +146,7 @@ class Tap
class << self
extend T::Generic
Elem = type_member(:out) { { fixed: Tap } }
# @api public

View File

@ -5,6 +5,7 @@ require "cmd/shared_examples/args_parse"
RSpec.describe Homebrew::Cmd::InstallCmd do
include FileUtils
it_behaves_like "parseable arguments"
it "installs formulae", :integration_test do

View File

@ -5,6 +5,7 @@ require "cmd/upgrade"
RSpec.describe Homebrew::Cmd::UpgradeCmd do
include FileUtils
it_behaves_like "parseable arguments"
it "upgrades a Formula and cleans up old versions", :integration_test do

View File

@ -8,6 +8,7 @@ RSpec.describe Dependable do
subject(:dependable) do
Class.new do
include Dependable
def initialize
@tags = ["foo", "bar", :build]
end

View File

@ -19,7 +19,7 @@ RSpec.describe LazyObject do
describe "#!" do
it "delegates to the underlying object" do
expect(!(described_class.new { false })).to be true
expect(!described_class.new { false }).to be true
end
end

View File

@ -8,6 +8,7 @@ require "system_command"
module UnpackStrategy
extend T::Helpers
include SystemCommand::Mixin
abstract!
requires_ancestor { Kernel }
@ -16,6 +17,7 @@ module UnpackStrategy
module ClassMethods
extend T::Helpers
abstract!
sig { abstract.returns(T::Array[String]) }

View File

@ -15,6 +15,7 @@ class Version
# A part of a {Version}.
class Token
extend T::Helpers
abstract!
include Comparable

View File

@ -4,6 +4,7 @@
class Version
class Parser
extend T::Helpers
abstract!
sig { abstract.params(spec: Pathname).returns(T.nilable(String)) }
@ -12,6 +13,7 @@ class Version
class RegexParser < Parser
extend T::Helpers
abstract!
sig { params(regex: Regexp, block: T.nilable(T.proc.params(arg0: String).returns(String))).void }