TrueChange warnings for variables that are assigned but never used
640
Views
6
Comments
New
Service Studio

In some projects and when refactoring some logic, we can leave some variables that are only assigned and never used. The idea would be to improve TrueChange to show a warning saying exactly that. "Local Variable is assigned but never used"

Mega like to this idea!

If it's not feasible to implement on TrueChange, I suggest it could be implemented as a finding in Architecture Dashboard.

This is already implemented, right?


Wait what?! Is this not already appears in the TrueChange as warning?

Exactly.. the image which Matthias has posted. I have the same in my mind.

Or, the idea is something different? Please elaborate.

The Idea is that ,Considering @Matthias preuter example, if we assign var1 to var1 in the same action, then the warning will be gone, Please check for assurance or take a look on screen shot, but we didn't used that var1 except that assign which is not useful. So it just memory consuming, It is not a big problem but in big project some times when we need to optimized some code we need to check that. It will happened that we create variable and assign with second variable but didn't used that both variable. Great Idea Andre Goncalves.


Exactly Akshay! Thanks for clarifying :) 

Changed the category to
Service Studio