diff options
| author | Adam Vandenberg | 2011-03-21 12:54:00 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-03-21 12:54:00 -0700 |
| commit | ace8723caffbb0de638a5fb75242dfbd4a8b08a0 (patch) | |
| tree | 817a1475cd1ae4c63989fd26544192d1cbe1242a /Library | |
| parent | 85569610347d91052cf03ec9e123c03db045c657 (diff) | |
| download | brew-ace8723caffbb0de638a5fb75242dfbd4a8b08a0.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-x | Library/Homebrew/cmd/audit.rb | 13 |
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 |
