realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.46k stars 2.2k forks source link

[0.55.0] False positive on unused_enumerated with block + destructuring #5573

Closed marcelofabri closed 1 month ago

marcelofabri commented 1 month ago

New Issue Checklist

Describe the bug

The rule should not trigger when the index is used by destructuring the argument tuple.

Environment

# insert yaml contents here

No

AlertOption.allCases.enumerated().map {
    let (i, option) = $0
    // ...
}