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

Preserve @_exported import statements in unused_imports #5242

Merged

Conversation

jszumski
Copy link
Contributor

Preserve @_exported import statements even if unused to avoid breaking downstream modules depending on the re-exported module.

…ing downstream modules depending on the re-exported module.
@@ -122,7 +125,7 @@ struct UnusedImportRuleExamples {
dispatchMain()
"""),
Example("""
↓@_exported import Foundation
↓@_implementationOnly import Foundation
Copy link
Contributor Author

@jszumski jszumski Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original intent in #2993 seemed to make sure any attributed import was correctable, so I arbitrarily chose @_implementationOnly as a replacement.

@SwiftLintBot
Copy link

SwiftLintBot commented Sep 27, 2023

17 Messages
📖 Linting Aerial with this PR took 1.18s vs 1.18s on main (0% slower)
📖 Linting Alamofire with this PR took 1.55s vs 1.55s on main (0% slower)
📖 Linting Brave with this PR took 8.78s vs 8.79s on main (0% faster)
📖 Linting DuckDuckGo with this PR took 4.4s vs 4.4s on main (0% slower)
📖 Linting Firefox with this PR took 10.32s vs 10.33s on main (0% faster)
📖 Linting Kickstarter with this PR took 11.49s vs 11.4s on main (0% slower)
📖 Linting Moya with this PR took 0.62s vs 0.62s on main (0% slower)
📖 Linting NetNewsWire with this PR took 3.3s vs 3.29s on main (0% slower)
📖 Linting Nimble with this PR took 0.82s vs 0.82s on main (0% slower)
📖 Linting PocketCasts with this PR took 8.71s vs 8.68s on main (0% slower)
📖 Linting Quick with this PR took 0.4s vs 0.4s on main (0% slower)
📖 Linting Realm with this PR took 11.61s vs 11.63s on main (0% faster)
📖 Linting Sourcery with this PR took 2.81s vs 2.81s on main (0% slower)
📖 Linting Swift with this PR took 5.22s vs 5.2s on main (0% slower)
📖 Linting VLC with this PR took 1.53s vs 1.53s on main (0% slower)
📖 Linting Wire with this PR took 19.42s vs 19.34s on main (0% slower)
📖 Linting WordPress with this PR took 13.1s vs 13.08s on main (0% slower)

Generated by 🚫 Danger

Copy link
Collaborator

@SimplyDanny SimplyDanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

CHANGELOG.md Outdated Show resolved Hide resolved
@SimplyDanny SimplyDanny enabled auto-merge (squash) September 30, 2023 12:27
@SimplyDanny SimplyDanny merged commit 8517e9c into realm:main Sep 30, 2023
11 checks passed
@jszumski jszumski deleted the jszumski/fix-unused-imports-@_exported branch September 30, 2023 18:11
KS1019 pushed a commit to KS1019/SwiftLint that referenced this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants