diff options
| author | Gautham Goli | 2017-08-14 15:22:44 +0530 |
|---|---|---|
| committer | Gautham Goli | 2017-08-14 15:22:44 +0530 |
| commit | 76f4eccdceb5b3fb4e88b56e077234a6a3e56b08 (patch) | |
| tree | 0ee69fa055f76003099739d448028d4048deee69 /Library/Homebrew/rubocops | |
| parent | dc4d10ff6a59ce0da1bfc7bc06dd819c442813ab (diff) | |
| download | brew-76f4eccdceb5b3fb4e88b56e077234a6a3e56b08.tar.bz2 | |
add test for using ARGV to check options
Diffstat (limited to 'Library/Homebrew/rubocops')
| -rw-r--r-- | Library/Homebrew/rubocops/lines_cop.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb index dac523424..6a6f34821 100644 --- a/Library/Homebrew/rubocops/lines_cop.rb +++ b/Library/Homebrew/rubocops/lines_cop.rb @@ -88,11 +88,11 @@ module RuboCop end end - # [:debug?, :verbose?, :value].each do |m| - # find_instance_method_call(body_node, :ARGV, m) do - # problem "Use build instead of ARGV to check options" - # end - # end + [:debug?, :verbose?, :value].each do |m| + find_instance_method_call(body_node, "ARGV", m) do + problem "Use build instead of ARGV to check options" + end + end # # find_instance_method_call(body_node, :man, :+) do |m| # next unless match = regex_match_group(parameters(m).first, %r{man[1-8]}) @@ -320,7 +320,6 @@ module RuboCop next unless match = regex_match_group(arg, %r{\-\-(.*)}) problem "Reference '#{match[1]}' without dashes" end - end def unless_modifier?(node) |
