diff options
Diffstat (limited to 'Library/Homebrew/rubocops')
| -rw-r--r-- | Library/Homebrew/rubocops/lines_cop.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb index d6dba9061..5ed9acc93 100644 --- a/Library/Homebrew/rubocops/lines_cop.rb +++ b/Library/Homebrew/rubocops/lines_cop.rb @@ -303,12 +303,12 @@ module RuboCop problem "Don't duplicate 'without': Use `build.without? \"#{match[1]}\"` to check for \"--without-#{match[1]}\"" end - # find_instance_method_call(body_node, :build, :with?) do |m| - # arg = parameters(m).first - # next unless match = regex_match_group(arg, %r{-?-?with-(.*)}) - # problem "Don't duplicate 'with': Use `build.with? \"#{match[1]}\"` to check for \"--with-#{match[1]}\"" - # end - # + find_instance_method_call(body_node, :build, :with?) do |m| + arg = parameters(m).first + next unless match = regex_match_group(arg, %r{-?-?with-(.*)}) + problem "Don't duplicate 'with': Use `build.with? \"#{match[1]}\"` to check for \"--with-#{match[1]}\"" + end + # find_instance_method_call(body_node, :build, :include?) do |m| # arg = parameters(m).first # next unless match = regex_match_group(arg, %r{with(out)?-(.*)}) |
