VariableCanBeInlined
Proposed Category: codestyle
Description:
Inline variables when they are immediately used to return or throw.
Code Sample: This should include code, that should be flagged by the rule. If possible, the "correct" code
according to this new rule should also be demonstrated.
public long ComputeDurationInMilliseconds()
{
long duration = (((hours * 60) + minutes) * 60 + seconds ) * 1000 ;
return duration;
}
public void DoSomething()
{
ApplicationException myException = new ApplicationException();
throw myException;
}
Possible Properties:
- Should this rule be customizable via properties?
VariableCanBeInlined
Proposed Category: codestyle
Description:
Inline variables when they are immediately used to return or throw.
S1488checkstyle/checkstyle#16488Code Sample: This should include code, that should be flagged by the rule. If possible, the "correct" code
according to this new rule should also be demonstrated.
Possible Properties: