diff options
| author | Mike McQuaid | 2014-12-27 12:38:04 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-27 12:38:04 +0000 |
| commit | 1c512ddb7ebab9007c4928dfef9ed48d107ffbab (patch) | |
| tree | 53fa139492d993da08dc57b9db849614a9c36ca5 /Library/Homebrew/cmd | |
| parent | 43882a26b5f15da065ccb32dac0b78622ba026e1 (diff) | |
| download | homebrew-1c512ddb7ebab9007c4928dfef9ed48d107ffbab.tar.bz2 | |
audit: add strict mode, argument.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index b47984d96..07acb76e8 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -17,8 +17,10 @@ module Homebrew ARGV.formulae end + strict = ARGV.include? "--strict" + ff.each do |f| - fa = FormulaAuditor.new f + fa = FormulaAuditor.new(f, :strict => strict) fa.audit unless fa.problems.empty? @@ -76,8 +78,9 @@ class FormulaAuditor swig ] - def initialize(formula) + def initialize(formula, options={}) @formula = formula + @strict = !!options[:strict] @problems = [] @text = FormulaText.new(formula.path) @specs = %w{stable devel head}.map { |s| formula.send(s) }.compact |
