Prerequisites
Suggested rule title
Variables shouldn't be unnecessarily assigned
Rule description
Dead stores refer to assignments made to local variables that are subsequently never used or immediately overwritten. Such assignments are unnecessary and impact the clarity and potentially performance of the code. Removing them improves clarity, intentionality, and readability.
For example:
function Test: Integer;
begin
var I := 10; // This assignment is useless
I := 20;
Exit(I);
end;
Rationale
This rule will limit extraneous variable assignment.
Prerequisites
Suggested rule title
Variables shouldn't be unnecessarily assigned
Rule description
Dead stores refer to assignments made to local variables that are subsequently never used or immediately overwritten. Such assignments are unnecessary and impact the clarity and potentially performance of the code. Removing them improves clarity, intentionality, and readability.
For example:
Rationale
This rule will limit extraneous variable assignment.