diff options
| author | Gautham Goli | 2017-08-14 02:32:29 +0530 |
|---|---|---|
| committer | Gautham Goli | 2017-08-14 02:32:29 +0530 |
| commit | 02a1406a2e4c2d0506861248eb767d99f5ce4515 (patch) | |
| tree | e7903984ef592cddca54ea33722181bfaef0cf3d /Library/Homebrew/rubocops | |
| parent | 3efba57cd936f1e53b72a9e66561d594fcf37d65 (diff) | |
| download | brew-02a1406a2e4c2d0506861248eb767d99f5ce4515.tar.bz2 | |
add test for build.without --without-foo
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 6c0c3ec73..d6dba9061 100644 --- a/Library/Homebrew/rubocops/lines_cop.rb +++ b/Library/Homebrew/rubocops/lines_cop.rb @@ -297,12 +297,12 @@ module RuboCop problem "Don't negate 'build.without?': use 'build.with?'" end - # find_instance_method_call(body_node, :build, :without?) do |m| - # arg = parameters(m).first - # next unless match = regex_match_group(arg, %r{-?-?without-(.*)}) - # problem "Don't duplicate 'without': Use `build.without? \"#{match[1]}\"` to check for \"--without-#{match[1]}\"" - # end - # + find_instance_method_call(body_node, :build, :without?) do |m| + arg = parameters(m).first + next unless match = regex_match_group(arg, %r{-?-?without-(.*)}) + 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-(.*)}) |
