24838, "jabraham17", "[Feature Request]: improve UnusedLoopIndex chplcheck warning", "2024-04-12T18:00:58Z"
The UnusedLoopIndex warning should consider an empty tuple as being unused as well
For example
for (_, _) in zip(1..10, 1..10) {}
This should be a lint warning for UnusedLoopIndex and the rule should provide a fixit for this to remove (_, _) in
.
Furthermore, if a fixit will cause this case to occur, the fixit should just remove the index
for (i, _) in zip(1..10, 1..10) {}
The fixit for the above example should entirely remove (i, _) in
, instead of just changing it to (_, _)