lines_cop: add missing e.g. clang++ regex SOL.
You need a start of line check in this regex (like was added in the
others) to allow things like `#{bin}/clang++`.
			
			
This commit is contained in:
		
							parent
							
								
									2be11f6040
								
							
						
					
					
						commit
						d985838428
					
				@ -178,7 +178,7 @@ module RuboCop
 | 
			
		||||
            param = parameters(method).first
 | 
			
		||||
            if match = regex_match_group(param, %r{^(/usr/bin/)?(gcc|llvm-gcc|clang)\s?})
 | 
			
		||||
              problem "Use \"\#{ENV.cc}\" instead of hard-coding \"#{match[2]}\""
 | 
			
		||||
            elsif match = regex_match_group(param, %r{(/usr/bin/)?((g|llvm-g|clang)\+\+)\s?})
 | 
			
		||||
            elsif match = regex_match_group(param, %r{^(/usr/bin/)?((g|llvm-g|clang)\+\+)\s?})
 | 
			
		||||
              problem "Use \"\#{ENV.cxx}\" instead of hard-coding \"#{match[2]}\""
 | 
			
		||||
            end
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user