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

duplicate_imports not properly taking @testable into account #5716

Closed
2 tasks done
vincentisambart opened this issue Jul 30, 2024 · 0 comments · Fixed by #5718
Closed
2 tasks done

duplicate_imports not properly taking @testable into account #5716

vincentisambart opened this issue Jul 30, 2024 · 0 comments · Fixed by #5718
Assignees
Labels
bug Unexpected and reproducible misbehavior.

Comments

@vincentisambart
Copy link

New Issue Checklist

Describe the bug

duplicate_imports considers some @testable imports as duplicated even though they are not.

import Foo
@testable import struct Foo.Bar // warning: Duplicate Imports Violation: Imports should be unique (duplicate_imports)

The second import is NOT a duplication. swiftlint --fix will remove it but that breaks the code if the code relied on using some of Foo.Bar's internal methods.

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.55.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? Mint
@SimplyDanny SimplyDanny added the bug Unexpected and reproducible misbehavior. label Jul 31, 2024
@SimplyDanny SimplyDanny self-assigned this Jul 31, 2024
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