Variable Not Assigned
Warns about variables that are never assigned.
Reasoning
A variable that is never assigned is probably a sign of a bug. This inspection may yield false positives if the variable is assigned through a ByRef parameter assignment, or if UserForm controls fail to resolve, references to these controls in code-behind can be flagged as unassigned and undeclared variables.
Default severity
Warning
Inspection type
CodeQualityIssues
Examples
This example should trigger a result
This example should NOT trigger a result
Rubberduck.CodeAnalysis.Inspections.Concrete.VariableNotAssignedInspection.cs (Prerelease-v2.5.9.6289)