audit: flag redundant shell_output() exit codes
This commit is contained in:
parent
8f3a80b562
commit
20311aec15
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user