add audit for ENV.x11

This commit is contained in:
Adam Vandenberg 2012-09-03 19:18:58 -07:00
parent 33233f5039
commit 26f887d4ab

View File

@ -352,6 +352,10 @@ class FormulaAuditor
problem "xcodebuild should be passed an explicit \"SYMROOT\"" problem "xcodebuild should be passed an explicit \"SYMROOT\""
end end
if text =~ /ENV\.x11/
problem "Use \"depends_on :x11\" instead of \"ENV.x11\""
end
# Avoid hard-coding compilers # Avoid hard-coding compilers
if text =~ %r[(system|ENV\[.+\]\s?=)\s?['"](/usr/bin/)?(gcc|llvm-gcc|clang)['" ]] if text =~ %r[(system|ENV\[.+\]\s?=)\s?['"](/usr/bin/)?(gcc|llvm-gcc|clang)['" ]]
problem "Use \"\#{ENV.cc}\" instead of hard-coding \"#{$3}\"" problem "Use \"\#{ENV.cc}\" instead of hard-coding \"#{$3}\""