Rule Set:
UnnecessaryLocalBeforeReturn
Description:
The enhancement in #240 was ill-advised. The change in behavior should have been formulated as a new rule or an option on the existing rule, not added to an existing rule in a "bug-fix" release.
There are many cases where order does matter even for variables that are declared and then only referenced a single time.
Code Sample demonstrating the issue:
int i = compute(); // might throw
markComputationDone();
return i;
Mutable m = ...;
int i = compute(m);
sideEffect(m);
return i;
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4