aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/rubocops
diff options
context:
space:
mode:
authorGautham Goli2017-08-14 02:49:52 +0530
committerGautham Goli2017-08-14 02:49:52 +0530
commitdc4d10ff6a59ce0da1bfc7bc06dd819c442813ab (patch)
tree2bad9c6bad7544be9027b3dd929e259b514f978b /Library/Homebrew/rubocops
parent3ff8be1216388817dda2b4bb95aeaa5c3d3d5a6b (diff)
downloadbrew-dc4d10ff6a59ce0da1bfc7bc06dd819c442813ab.tar.bz2
add test for build.include? having dashed args
Diffstat (limited to 'Library/Homebrew/rubocops')
-rw-r--r--Library/Homebrew/rubocops/lines_cop.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb
index b6567466a..dac523424 100644
--- a/Library/Homebrew/rubocops/lines_cop.rb
+++ b/Library/Homebrew/rubocops/lines_cop.rb
@@ -314,12 +314,12 @@ module RuboCop
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{\-\-(.*)})
- # problem "Reference '#{match[1]}' without dashes"
- # end
+
+ find_instance_method_call(body_node, :build, :include?) do |m|
+ arg = parameters(m).first
+ next unless match = regex_match_group(arg, %r{\-\-(.*)})
+ problem "Reference '#{match[1]}' without dashes"
+ end
end