audit: fix go audit problems.
This commit is contained in:
		
							parent
							
								
									e9d608587d
								
							
						
					
					
						commit
						a64e9d4f0a
					
				@ -399,9 +399,11 @@ class FormulaAuditor
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Avoid hard-coding compilers
 | 
			
		||||
    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)\+\+)['" ]}
 | 
			
		||||
      problem "Use \"\#{ENV.cxx}\" instead of hard-coding \"#{$3}\""
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user