Currently, the VarCouldBeVal rule only reports on locally-scoped function variables. It would be nice if the rule could be extended to include private top-level class/object properties as well.
For example
class Test {
private var viewModel = BaseViewModel() // Not re-assigned anywhere else in the class
...
}
should report a violation.
Theses are valid errors that should be reported to fix unnecessary mutability.
I'll actually go ahead and give this one a shot 馃憤
@tylerbwong do you any update on this feature? Do you need assistance?
Hey @schalkms sorry for the late reply. I've actually haven't found the time to work on this lately so it'd probably be best to let someone else work on it 馃槥
@tylerbwong no worries.. thanks for the reply.
Most helpful comment
I'll actually go ahead and give this one a shot 馃憤