lines_cop: Add condition to prevent false positives
This commit is contained in:
parent
2af98133ba
commit
9be85385b3
@ -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, /^[^\*{},]+$/)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user