aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
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