formula_auditor: repair audit_specs

This commit is contained in:
hyuraku 2021-07-13 21:55:47 +09:00
parent e344cb6aff
commit 57911f479a

View File

@ -555,14 +555,6 @@ module Homebrew
)
end
if (stable = formula.stable)
version = stable.version
problem "Stable: version (#{version}) is set to a string without a digit" if version.to_s !~ /\d/
if version.to_s.start_with?("HEAD")
problem "Stable: non-HEAD version name (#{version}) should not begin with HEAD"
end
end
return unless @core_tap
if formula.head && @versioned_formula &&
@ -574,7 +566,14 @@ module Homebrew
return unless stable
return unless stable.url
stable_version_string = stable.version.to_s
version = stable.version
problem "Stable: version (#{version}) is set to a string without a digit" if version.to_s !~ /\d/
stable_version_string = version.to_s
if stable_version_string.start_with?("HEAD")
problem "Stable: non-HEAD version name (#{stable_version_string}) should not begin with HEAD"
end
stable_url_version = Version.parse(stable.url)
stable_url_minor_version = stable_url_version.minor.to_i