Skip to content

Preserve @_exported import statements in unused_imports#5242

Merged
SimplyDanny merged 2 commits into
realm:mainfrom
jszumski:jszumski/fix-unused-imports-@_exported
Sep 30, 2023
Merged

Preserve @_exported import statements in unused_imports#5242
SimplyDanny merged 2 commits into
realm:mainfrom
jszumski:jszumski/fix-unused-imports-@_exported

Conversation

@jszumski

Copy link
Copy Markdown
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.
"""),
Example("""
↓@_exported import Foundation
↓@_implementationOnly import Foundation

@jszumski jszumski Sep 27, 2023

Copy link
Copy Markdown
Contributor Author

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

SwiftLintBot commented Sep 27, 2023

Copy link
Copy Markdown
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

@SimplyDanny SimplyDanny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

Comment thread CHANGELOG.md Outdated
@SimplyDanny SimplyDanny enabled auto-merge (squash) September 30, 2023 12:27
@SimplyDanny SimplyDanny merged commit 8517e9c into realm:main Sep 30, 2023
@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