Open
Description
In Issue #903 the rule in my opinion correctly throws on a +=
for simple defined arrays using the $var = @()
method of defining an array to the var
variable
I would suggest that a new rule is created that correctly identifies this method as being an expensive action and that a recommendation to use a fully defined Array collection would be a better suggestion, initially suggesting using a System.Collections.ArrayList
This rule should look for both @()
& +=
and suggest converting these calls better scripting practices