aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2014-12-27 12:38:04 +0000
committerMike McQuaid2014-12-27 12:38:04 +0000
commit24f183dd12064b9dfd729fda58dee0938fa078f6 (patch)
tree720ec9c53ef65d4c20d8ca6c4d84d3f07f96f413 /Library/Homebrew/cmd
parenta1ba5a5da6ee62aab11c628b7d427091f8356b42 (diff)
downloadbrew-24f183dd12064b9dfd729fda58dee0938fa078f6.tar.bz2
audit: add strict mode, argument.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb7
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