Add audit for xcodebuild.
xcodebuild should be passed an explicit SYMROOT, since the user can override this. Also added --strict, so certain audits can be ignored in most cases (including this one.)
This commit is contained in:
parent
8556961034
commit
ace8723caf
@ -1,6 +1,12 @@
|
|||||||
require 'formula'
|
require 'formula'
|
||||||
require 'utils'
|
require 'utils'
|
||||||
|
|
||||||
|
# Use "brew audit --strict" to enable even stricter checks.
|
||||||
|
|
||||||
|
def strict?
|
||||||
|
ARGV.flag? "--strict"
|
||||||
|
end
|
||||||
|
|
||||||
def ff
|
def ff
|
||||||
return Formula.all if ARGV.named.empty?
|
return Formula.all if ARGV.named.empty?
|
||||||
return ARGV.formulae
|
return ARGV.formulae
|
||||||
@ -103,6 +109,11 @@ def audit_formula_text name, text
|
|||||||
problems << " * Use ENV.fortran during install instead of depends_on 'gfortran'"
|
problems << " * Use ENV.fortran during install instead of depends_on 'gfortran'"
|
||||||
end unless name == "gfortran" # Gfortran itself has this text in the caveats
|
end unless name == "gfortran" # Gfortran itself has this text in the caveats
|
||||||
|
|
||||||
|
# xcodebuild should specify SYMROOT
|
||||||
|
if text =~ /xcodebuild/ and not text =~ /SYMROOT=/
|
||||||
|
problems << " * xcodebuild should be passed an explicit \"SYMROOT\""
|
||||||
|
end if strict?
|
||||||
|
|
||||||
return problems
|
return problems
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -182,7 +193,7 @@ def audit_formula_urls f
|
|||||||
|
|
||||||
unless p =~ %r[^http://mirrors\.kernel\.org/debian/pool/]
|
unless p =~ %r[^http://mirrors\.kernel\.org/debian/pool/]
|
||||||
problems << " * \"mirrors.kernel.org\" is the preferred mirror for debian software."
|
problems << " * \"mirrors.kernel.org\" is the preferred mirror for debian software."
|
||||||
end
|
end if strict?
|
||||||
end
|
end
|
||||||
|
|
||||||
return problems
|
return problems
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user