String var1 = getValue();
return var1;
String var2 = "hello"
var2 = "world" //Non compliant cause never assigned
This rule is deprecated because there are already Sonarqube native rules for the same things, and will be removed soon.
Do not unnecessarily assign values to variables. It increases the use of RAM memory.
String var1 = getValue();
return var1;
String var2 = "hello"
var2 = "world" //Non compliant cause never assigned
return getValue();