Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
marcelofabri opened this issue May 13, 2024 · 0 comments · Fixed by #5577
Closed
2 tasks done

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

marcelofabri opened this issue May 13, 2024 · 0 comments · Fixed by #5577
Assignees
Labels
bug Unexpected and reproducible misbehavior.

Comments

@marcelofabri
Copy link
Collaborator

New Issue Checklist

Describe the bug

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

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
    // ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants