diff options
| author | Mike McQuaid | 2017-11-24 21:07:07 +0000 |
|---|---|---|
| committer | GitHub | 2017-11-24 21:07:07 +0000 |
| commit | 6c23892d4115be2667e65f05367bc99bdba009e3 (patch) | |
| tree | ba051d9bf7afb0b6216643e4d43fbbffe66e4804 /Library | |
| parent | 1ff628e20f828a0b1e7093b5f3235d77bd30e488 (diff) | |
| parent | 9be85385b33491185fc0defdf0e7cec7639081f6 (diff) | |
| download | brew-6c23892d4115be2667e65f05367bc99bdba009e3.tar.bz2 | |
Merge pull request #3478 from GauthamGoli/dir_audit_bug_fix
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, /^[^\*{},]+$/) |
