aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2015-05-24 16:27:54 +0800
committerXu Cheng2015-05-24 16:27:54 +0800
commite4ff0a2f2edce6166bf6fad018e6f8154b2ee218 (patch)
tree77461694542833e074896a5436fe056bbeb783c0
parentcc0c9cf6199fbea78a960a556f7ed1bb60c14e3c (diff)
downloadbrew-e4ff0a2f2edce6166bf6fad018e6f8154b2ee218.tar.bz2
audit: move audit_java_home inside audit_line
-rw-r--r--Library/Homebrew/cmd/audit.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 3a6bbbb02..4290bec4c 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -206,12 +206,6 @@ class FormulaAuditor
end
end
- def audit_java_home
- if text =~ /JAVA_HOME/i && !formula.requirements.map(&:class).include?(JavaDependency)
- problem "Use `depends_on :java` to set JAVA_HOME"
- end
- end
-
def audit_conflicts
formula.conflicts.each do |c|
begin
@@ -601,6 +595,10 @@ class FormulaAuditor
problem "Use `depends_on :fortran` instead of `ENV.fortran`"
end
+ if line =~ /JAVA_HOME/i && !formula.requirements.map(&:class).include?(JavaDependency)
+ problem "Use `depends_on :java` to set JAVA_HOME"
+ end
+
if line =~ /depends_on :(.+) (if.+|unless.+)$/
audit_conditional_dep($1.to_sym, $2, $&)
end
@@ -686,7 +684,6 @@ class FormulaAuditor
audit_specs
audit_homepage
audit_deps
- audit_java_home
audit_conflicts
audit_options
audit_patches