Skip to content
Snippets Groups Projects
Commit a64e9d4f authored by Mike McQuaid's avatar Mike McQuaid
Browse files

audit: fix go audit problems.

parent e9d60858
No related branches found
No related tags found
No related merge requests found
......@@ -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)\+\+)['" ]}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment