diff options
| author | Gautham Goli | 2017-11-24 23:39:38 +0530 |
|---|---|---|
| committer | Gautham Goli | 2017-11-24 23:45:01 +0530 |
| commit | 9be85385b33491185fc0defdf0e7cec7639081f6 (patch) | |
| tree | 32adb8d8400dc87bc03bc8f6c112061088a12c7f /Library | |
| parent | 2af98133ba9083a9620703be78357a227deaeef6 (diff) | |
| download | brew-9be85385b33491185fc0defdf0e7cec7639081f6.tar.bz2 | |
lines_cop: Add condition to prevent false positives
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/rubocops/lines_cop.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb index dfa510035..d9e40c2de 100644 --- a/Library/Homebrew/rubocops/lines_cop.rb +++ b/Library/Homebrew/rubocops/lines_cop.rb @@ -331,6 +331,7 @@ module RuboCop end find_instance_method_call(body_node, "Dir", :[]) do |method| + next unless parameters(method).size == 1 path = parameters(method).first next unless path.str_type? next unless match = regex_match_group(path, /^[^\*{},]+$/) |
