Enable and fix warnings

This commit is contained in:
Douglas Eichelberger 2024-02-18 15:03:00 -08:00 committed by Mike McQuaid
parent b1fe90710e
commit d6b3f5031a
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829
4 changed files with 18 additions and 13 deletions

View File

@ -2,17 +2,21 @@
# frozen_string_literal: true
module Homebrew
sig { returns(T::Array[String]) }
def self.tar_args
if MacOS.version >= :catalina
["--no-mac-metadata", "--no-acls", "--no-xattrs"].freeze
else
[].freeze
class << self
undef tar_args
sig { returns(T::Array[String]) }
def tar_args
if MacOS.version >= :catalina
["--no-mac-metadata", "--no-acls", "--no-xattrs"].freeze
else
[].freeze
end
end
undef gnu_tar
sig { params(gnu_tar_formula: Formula).returns(String) }
def gnu_tar(gnu_tar_formula)
"#{gnu_tar_formula.opt_bin}/gtar"
end
end
sig { params(gnu_tar_formula: Formula).returns(String) }
def self.gnu_tar(gnu_tar_formula)
"#{gnu_tar_formula.opt_bin}/gtar"
end
end

View File

@ -1,8 +1,6 @@
# typed: true
# frozen_string_literal: true
require "livecheck/livecheck"
module Homebrew
module Livecheck
# The `Livecheck::SkipConditions` module primarily contains methods that

View File

@ -1,5 +1,6 @@
# frozen_string_literal: true
require "livecheck/livecheck"
require "livecheck/skip_conditions"
describe Homebrew::Livecheck::SkipConditions do

View File

@ -66,6 +66,7 @@ RSpec.configure do |config|
config.order = :random
config.raise_errors_for_deprecations!
config.warnings = true
config.filter_run_when_matching :focus
@ -179,6 +180,7 @@ RSpec.configure do |config|
end
config.around do |example|
undef find_files if defined? find_files
def find_files
return [] unless File.exist?(TEST_TMPDIR)