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. # Abstract superclass for all artifacts.
class AbstractArtifact class AbstractArtifact
extend T::Helpers extend T::Helpers
abstract! abstract!
include Comparable include Comparable

View File

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

View File

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

View File

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

View File

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

View File

@ -12,6 +12,7 @@ module Homebrew
module Cmd module Cmd
class GistLogs < AbstractCommand class GistLogs < AbstractCommand
include Install include Install
cmd_args do cmd_args do
description <<~EOS description <<~EOS
Upload logs for a failed build of <formula> to a new Gist. Presents an 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 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) next unless ENV.key?(var)
var = %Q(#{var}="#{ENV.fetch(var)}") var = %Q(#{var}="#{ENV.fetch(var)}")
user_tilde(var) user_tilde(var)
end) end
end end
def check_cask_xattr def check_cask_xattr

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,6 +5,7 @@ require "cmd/upgrade"
RSpec.describe Homebrew::Cmd::UpgradeCmd do RSpec.describe Homebrew::Cmd::UpgradeCmd do
include FileUtils include FileUtils
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "upgrades a Formula and cleans up old versions", :integration_test do 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 subject(:dependable) do
Class.new do Class.new do
include Dependable include Dependable
def initialize def initialize
@tags = ["foo", "bar", :build] @tags = ["foo", "bar", :build]
end end

View File

@ -19,7 +19,7 @@ RSpec.describe LazyObject do
describe "#!" do describe "#!" do
it "delegates to the underlying object" 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
end end

View File

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

View File

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

View File

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