audit: call puts once instead of problems.size + 2 times
This commit is contained in:
parent
fb30041640
commit
b6631b9a15
@ -22,11 +22,9 @@ module Homebrew
|
|||||||
fa.audit
|
fa.audit
|
||||||
|
|
||||||
unless fa.problems.empty?
|
unless fa.problems.empty?
|
||||||
puts "#{f.name}:"
|
|
||||||
fa.problems.each { |p| puts " * #{p}" }
|
|
||||||
puts
|
|
||||||
formula_count += 1
|
formula_count += 1
|
||||||
problem_count += fa.problems.size
|
problem_count += fa.problems.size
|
||||||
|
puts "#{f.name}:", fa.problems.map { |p| " * #{p}" }, ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -153,10 +151,7 @@ class FormulaAuditor
|
|||||||
next if dep.build? or dep.run?
|
next if dep.build? or dep.run?
|
||||||
problem %{#{dep} dependency should be "depends_on '#{dep}' => :build"}
|
problem %{#{dep} dependency should be "depends_on '#{dep}' => :build"}
|
||||||
when "git", "ruby", "mercurial"
|
when "git", "ruby", "mercurial"
|
||||||
problem <<-EOS.undent
|
problem "Don't use #{dep} as a dependency. We allow non-Homebrew #{dep} installations."
|
||||||
Don't use #{dep} as a dependency. We allow non-Homebrew
|
|
||||||
#{dep} installations.
|
|
||||||
EOS
|
|
||||||
when 'gfortran'
|
when 'gfortran'
|
||||||
problem "Use `depends_on :fortran` instead of `depends_on 'gfortran'`"
|
problem "Use `depends_on :fortran` instead of `depends_on 'gfortran'`"
|
||||||
when 'open-mpi', 'mpich2'
|
when 'open-mpi', 'mpich2'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user