audit: fix go audit problems.
This commit is contained in:
parent
e9d608587d
commit
a64e9d4f0a
@ -399,8 +399,10 @@ class FormulaAuditor
|
||||
end
|
||||
|
||||
# Avoid hard-coding compilers
|
||||
if line =~ %r{(system|ENV\[.+\]\s?=)\s?['"](/usr/bin/)?(gcc|llvm-gcc|clang)['" ]}
|
||||
problem "Use \"\#{ENV.cc}\" instead of hard-coding \"#{$3}\""
|
||||
unless f.name == 'go' # Go needs to set CC for cgo support.
|
||||
if line =~ %r{(system|ENV\[.+\]\s?=)\s?['"](/usr/bin/)?(gcc|llvm-gcc|clang)['" ]}
|
||||
problem "Use \"\#{ENV.cc}\" instead of hard-coding \"#{$3}\""
|
||||
end
|
||||
end
|
||||
|
||||
if line =~ %r{(system|ENV\[.+\]\s?=)\s?['"](/usr/bin/)?((g|llvm-g|clang)\+\+)['" ]}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user