kayler-renslow / arma-intellij-plugin

A plugin for Intellij IDEA that allows for syntactical analysis, code inspections, and other nifty features for the SQF scripting language in Arma 3.
MIT License
41 stars 10 forks source link

duplicates when automatically declaring private variables #53

Open zochris opened 6 years ago

zochris commented 6 years ago

Plugin Version

1.0.9

Summary

Automatically declaring local variables as private leads to duplicates in the array of private variables. Missing newline if the private array isn't already there.

Detail

Clicking on the fix-bulb on Local variable is not declared private and may have unintended consequences. - warnings after a code inspection turns this

_var1 = "string";
_var2 = ["some","array"];

_var1 = _var2;

into

private ["_var2","_var1","_var2","_var1"];_var1 = "string";
_var2 = ["some","array"];

_var1 = _var2;