audit: allow env :std in custom taps.
This is a nicer experience than writing `Requirement`s by hand.
This commit is contained in:
parent
9ed1ed3c05
commit
50a84f2535
@ -304,7 +304,7 @@ class FormulaAuditor
|
|||||||
def audit_formula_name
|
def audit_formula_name
|
||||||
return unless @strict
|
return unless @strict
|
||||||
# skip for non-official taps
|
# skip for non-official taps
|
||||||
return if formula.tap.nil? || !formula.tap.official?
|
return unless formula.tap&.official?
|
||||||
|
|
||||||
name = formula.name
|
name = formula.name
|
||||||
|
|
||||||
@ -718,7 +718,13 @@ class FormulaAuditor
|
|||||||
|
|
||||||
return unless @strict
|
return unless @strict
|
||||||
|
|
||||||
problem "`#{Regexp.last_match(1)}` in formulae is deprecated" if line =~ /(env :(std|userpaths))/
|
if formula.tap&.official? && line.include?("env :std")
|
||||||
|
problem "`env :std` in official tap formulae is deprecated"
|
||||||
|
end
|
||||||
|
|
||||||
|
if line.include?("env :userpaths")
|
||||||
|
problem "`env :userpaths` in formulae is deprecated"
|
||||||
|
end
|
||||||
|
|
||||||
if line =~ /system ((["'])[^"' ]*(?:\s[^"' ]*)+\2)/
|
if line =~ /system ((["'])[^"' ]*(?:\s[^"' ]*)+\2)/
|
||||||
bad_system = Regexp.last_match(1)
|
bad_system = Regexp.last_match(1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user