From b6631b9a150250c2f381912d3bd360ae1d72974c Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 17 Oct 2014 00:35:51 -0500 Subject: audit: call puts once instead of problems.size + 2 times --- Library/Homebrew/cmd/audit.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index a0359ae07..4b9aba93c 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -22,11 +22,9 @@ module Homebrew fa.audit unless fa.problems.empty? - puts "#{f.name}:" - fa.problems.each { |p| puts " * #{p}" } - puts formula_count += 1 problem_count += fa.problems.size + puts "#{f.name}:", fa.problems.map { |p| " * #{p}" }, "" end end @@ -153,10 +151,7 @@ class FormulaAuditor next if dep.build? or dep.run? problem %{#{dep} dependency should be "depends_on '#{dep}' => :build"} when "git", "ruby", "mercurial" - problem <<-EOS.undent - Don't use #{dep} as a dependency. We allow non-Homebrew - #{dep} installations. - EOS + problem "Don't use #{dep} as a dependency. We allow non-Homebrew #{dep} installations." when 'gfortran' problem "Use `depends_on :fortran` instead of `depends_on 'gfortran'`" when 'open-mpi', 'mpich2' -- cgit v1.2.3