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

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++`.
parent 2be11f60
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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