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

Silence `unused_enumerated` rule when `$0` in a closure is explicitly unpacked #5577

Closed SimplyDanny closed 1 month ago

SimplyDanny commented 1 month ago

The fix is quite specific for this single case. What are other cases where an "unpack" can happen? We could further check if i and e are actually used. But that's out of scope for this fix.

Fixes #5573.

SwiftLintBot commented 1 month ago
17 Messages
:book: Linting Aerial with this PR took 0.17s vs 0.17s on main (0% slower)
:book: Linting Alamofire with this PR took 0.15s vs 0.15s on main (0% slower)
:book: Linting Brave with this PR took 0.66s vs 0.65s on main (1% slower)
:book: Linting DuckDuckGo with this PR took 0.5s vs 0.5s on main (0% slower)
:book: Linting Firefox with this PR took 1.33s vs 1.32s on main (0% slower)
:book: Linting Kickstarter with this PR took 0.72s vs 0.72s on main (0% slower)
:book: Linting Moya with this PR took 0.11s vs 0.11s on main (0% slower)
:book: Linting NetNewsWire with this PR took 0.26s vs 0.27s on main (3% faster)
:book: Linting Nimble with this PR took 0.13s vs 0.13s on main (0% slower)
:book: Linting PocketCasts with this PR took 0.62s vs 0.62s on main (0% slower)
:book: Linting Quick with this PR took 0.1s vs 0.1s on main (0% slower)
:book: Linting Realm with this PR took 0.51s vs 0.51s on main (0% slower)
:book: Linting Sourcery with this PR took 0.31s vs 0.31s on main (0% slower)
:book: Linting Swift with this PR took 0.42s vs 0.42s on main (0% slower)
:book: Linting VLC with this PR took 0.18s vs 0.18s on main (0% slower)
:book: Linting Wire with this PR took 1.7s vs 1.7s on main (0% slower)
:book: Linting WordPress with this PR took 1.01s vs 1.01s on main (0% slower)

Generated by :no_entry_sign: Danger