aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-21 12:54:00 -0700
committerAdam Vandenberg2011-03-21 12:54:00 -0700
commit649f91e02b959eb9a2919aa5ff283422af37b996 (patch)
tree2ab94985588c60494dd4be544397fdb1f5ffa030 /Library
parentb66b6c6b20519fc0a4fe4aa95c088bfb924093f2 (diff)
downloadhomebrew-649f91e02b959eb9a2919aa5ff283422af37b996.tar.bz2
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.)
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/cmd/audit.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 3e717115c..1bc6bf32a 100755
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -1,6 +1,12 @@
require 'formula'
require 'utils'
+# Use "brew audit --strict" to enable even stricter checks.
+
+def strict?
+ ARGV.flag? "--strict"
+end
+
def ff
return Formula.all if ARGV.named.empty?
return ARGV.formulae
@@ -103,6 +109,11 @@ def audit_formula_text name, text
problems << " * Use ENV.fortran during install instead of depends_on 'gfortran'"
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
end
@@ -182,7 +193,7 @@ def audit_formula_urls f
unless p =~ %r[^http://mirrors\.kernel\.org/debian/pool/]
problems << " * \"mirrors.kernel.org\" is the preferred mirror for debian software."
- end
+ end if strict?
end
return problems