diff options
| author | Gautham Goli | 2017-08-14 02:47:29 +0530 |
|---|---|---|
| committer | Gautham Goli | 2017-08-14 02:47:29 +0530 |
| commit | 3ff8be1216388817dda2b4bb95aeaa5c3d3d5a6b (patch) | |
| tree | c65538be7f4472a4a0cf5f75eff65dcf98bf6346 /Library/Homebrew/rubocops | |
| parent | 5a7cbb762f1a9e715ae03e82eb6cb8ef4ac4a0bb (diff) | |
| download | brew-3ff8be1216388817dda2b4bb95aeaa5c3d3d5a6b.tar.bz2 | |
add test for build.include?
Diffstat (limited to 'Library/Homebrew/rubocops')
| -rw-r--r-- | Library/Homebrew/rubocops/lines_cop.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb index 5ed9acc93..b6567466a 100644 --- a/Library/Homebrew/rubocops/lines_cop.rb +++ b/Library/Homebrew/rubocops/lines_cop.rb @@ -309,11 +309,11 @@ module RuboCop 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)?-(.*)}) - # problem "Use build.with#{match[1]}? \"#{match[2]}\" instead of build.include? 'with#{match[1]}-#{match[2]}'" - # 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)?-(.*)}) + problem "Use build.with#{match[1]}? \"#{match[2]}\" instead of build.include? 'with#{match[1]}-#{match[2]}'" + end # # find_instance_method_call(body_node, :build, :include?) do |m| # arg = parameters(m).first |
