Detection of variable usage prior to assignment in function scope #2739
Labels
blocked-external
Issues that are blocked by something outside of lintr's direct control
object linters 🏀
I've noticed that when a variable is being used in a function without assignment, we can expect that
object_usage_linter
can detect it. For instance variablebar
here:However, if we declare this variable after usage, either independently or as a name within an iterator, the
object_usage_linter
no longer thinks it is an issue.I have all linters on and I can't seem to get something that would flag variable usage before declaration. Would it be possible to build something that does this?
The text was updated successfully, but these errors were encountered: