The rule should not trigger when the index is used by destructuring the argument tuple.
Environment
SwiftLint version (run swiftlint version to be sure)? 0.55.0
Installation method used (Homebrew, CocoaPods, building from source, etc)? bazel
Paste your configuration file:
# insert yaml contents here
Are you using nested configurations?
If so, paste their relative paths and respective contents.
No
Which Xcode version are you using (check xcodebuild -version)? 15.2.0
Do you have a sample that shows the issue? Run echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more
complex, you can use swiftlint lint --path [file here] --no-cache --enable-all-rules.
AlertOption.allCases.enumerated().map {
let (i, option) = $0
// ...
}
New Issue Checklist
Describe the bug
The rule should not trigger when the index is used by destructuring the argument tuple.
Environment
swiftlint version
to be sure)? 0.55.0No
xcodebuild -version
)? 15.2.0echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more complex, you can useswiftlint lint --path [file here] --no-cache --enable-all-rules
.