aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2017-11-24 21:07:07 +0000
committerGitHub2017-11-24 21:07:07 +0000
commit6c23892d4115be2667e65f05367bc99bdba009e3 (patch)
treeba051d9bf7afb0b6216643e4d43fbbffe66e4804 /Library/Homebrew
parent1ff628e20f828a0b1e7093b5f3235d77bd30e488 (diff)
parent9be85385b33491185fc0defdf0e7cec7639081f6 (diff)
downloadbrew-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/Homebrew')
-rw-r--r--Library/Homebrew/rubocops/lines_cop.rb1
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, /^[^\*{},]+$/)