unused_enumerated
rule should also check closure parameters
#5470
Labels
enhancement
Ideas for improvements of existing features and rules.
The
unused_enumerated
rule triggers when either of the two values returned by.enumerated()
isn't used (replaced by an underscore_
). The rule currently checks onlyfor
loops. It could be extended to support closure parameters as well.The rule would only check the immediate closure after the
.enumerated()
call. Otherwise, the number of parameters and their types could have changed.Triggering:
Non-triggering:
PS: This enhancement was motivated by this comment.
The text was updated successfully, but these errors were encountered: