You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The rules have near identical implementation; in fact LocalVariableCouldBeFinal uses methods of the other rule.
The rule MethodArgumentCouldBeFinal is misnamed. It doesn't report only methods, but also constructors. To be pedantic the word argument is not appropriate as we are reporting formal parameters.
Describe the solution you'd like
Merge both rules into a new VariableCouldBeDeclaredFinal rule. The new rule can also care about other kinds of variables, probably by adding properties to check different kinds of vars (in future developments).
Describe alternatives you've considered
Just rename MethodArgumentCouldBeFinal to FormalParameterCouldBeFinal. This would not allow us to merge the implementations and would require us to add new rules for other kinds of variables, which has a lot of overhead.
Additional context
Add any other context about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Merge both rules into a new
VariableCouldBeDeclaredFinal
rule. The new rule can also care about other kinds of variables, probably by adding properties to check different kinds of vars (in future developments).Describe alternatives you've considered
Just rename MethodArgumentCouldBeFinal to FormalParameterCouldBeFinal. This would not allow us to merge the implementations and would require us to add new rules for other kinds of variables, which has a lot of overhead.
Additional context
Add any other context about the feature request here.
The text was updated successfully, but these errors were encountered: