Inspection for (mis)usage of module fields backed by property #3589
Labels
enhancement
Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope.
feature-inspections
Given this code:
It's too easy to wrongly reference the backing field within the module; there are instances where bypassing the logic embedded in the setter is fine, but I think it'd be good to have an inspection to bring attention of this possible oversight, so an explicit choice can be made whether it's intended to bypass the setter's logic or not. Given this isn't an error per se, the inspection would be a suggestion, or warning.
This also implies a need for the
@IgnoreOnce
annotation with a comment to make it clear we are deliberately assigning to the backing field.The text was updated successfully, but these errors were encountered: