Merge pull request #4663 from DomT4/redundant_exit_code_begone

audit: flag redundant shell_output() exit codes
This commit is contained in:
Dominyk Tiller 2018-08-11 17:35:35 +01:00 committed by GitHub
commit 08b0d8410d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -803,6 +803,10 @@ module Homebrew
problem "Use separate make calls" if line.include?("make && make")
if line =~ /shell_output\(['"].+['"], 0\)/
problem "Passing 0 to shell_output() is redundant"
end
if line =~ /JAVA_HOME/i && !formula.requirements.map(&:class).include?(JavaRequirement)
problem "Use `depends_on :java` to set JAVA_HOME"
end