Inspectopedia
 
2024.3

Variable declaration can be merged with the first assignment to the variable

Info
Code Style
New
Last modified: 03 December 2024

Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression.