diff options
| author | Gautham Goli | 2017-08-14 01:55:47 +0530 |
|---|---|---|
| committer | Gautham Goli | 2017-08-14 01:55:47 +0530 |
| commit | ec2b0df10e62152529386cf2a696f9aaece405ea (patch) | |
| tree | 50d9d8601e2bc57d86237e4faec9c4b2f4d821b6 /Library/Homebrew/rubocops | |
| parent | f968776e8460d7b6a0a3199d9c92c945cda0738d (diff) | |
| download | brew-ec2b0df10e62152529386cf2a696f9aaece405ea.tar.bz2 | |
Add tests for unless build.with?
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 6c79e1fca..2b146b79e 100644 --- a/Library/Homebrew/rubocops/lines_cop.rb +++ b/Library/Homebrew/rubocops/lines_cop.rb @@ -281,12 +281,12 @@ module RuboCop problem "Use if #{correct} instead of unless #{m.source}" end - # find_instance_method_call(body_node, :build, :with?) do |m| - # next unless unless_modifier?(m.parent) - # correct = m.source.gsub("?", "out?").gsub("unless", "if") - # problem "Use #{correct} instead of unless #{m.source}" - # end - # + find_instance_method_call(body_node, :build, :with?) do |m| + next unless unless_modifier?(m.parent) + correct = m.source.gsub("?", "out?") + problem "Use if #{correct} instead of unless #{m.source}" + end + # find_instance_method_call(body_node, :build, :with?) do |m| # next unless negation?(m) # problem "Don't negate 'build.with?': use 'build.without?'" |
