diff options
| author | Mike McQuaid | 2015-01-04 10:48:28 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-04 11:05:34 +0000 |
| commit | c294ce22a78685c9ab6c23a8104214fe8fae1f59 (patch) | |
| tree | 58ee8aa17b247d8ebe3cd02a1b6036651d8bfbcd /Library | |
| parent | e0cacd3008c4fb84d91db28f941a4cb63edccc2a (diff) | |
| download | brew-c294ce22a78685c9ab6c23a8104214fe8fae1f59.tar.bz2 | |
audit: also run `brew style` on `--strict`.
Closes Homebrew/homebrew#35465.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 8b2de4ba6..53a832230 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -8,6 +8,13 @@ module Homebrew formula_count = 0 problem_count = 0 + strict = ARGV.include? "--strict" + if strict && ARGV.formulae.any? + require "cmd/style" + ohai "brew style #{ARGV.formulae.join " "}" + style + end + ENV.activate_extensions! ENV.setup_build_environment @@ -17,13 +24,19 @@ module Homebrew ARGV.formulae end - strict = ARGV.include? "--strict" + output_header = !strict ff.each do |f| fa = FormulaAuditor.new(f, :strict => strict) fa.audit unless fa.problems.empty? + unless output_header + puts + ohai "audit problems" + output_header = true + end + formula_count += 1 problem_count += fa.problems.size puts "#{f.name}:", fa.problems.map { |p| " * #{p}" }, "" |
