-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add Unused Import analyzer rule #2381
Conversation
Removed SwiftLint's own unused imports using this rule in #2382. |
Generated by 🚫 Danger |
} | ||
} | ||
|
||
private let syntaxKindsToSkip: [SyntaxKind] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about making this a Set
?
Codecov Report
@@ Coverage Diff @@
## master #2381 +/- ##
==========================================
- Coverage 90.51% 90.49% -0.02%
==========================================
Files 313 314 +1
Lines 15704 15775 +71
==========================================
+ Hits 14214 14276 +62
- Misses 1490 1499 +9
Continue to review full report at Codecov.
|
@jpsim Have you tried running this rule against Lyft's iOS app? I've run it against one app and gave some false positives - I think they're all related to importing a framework that imports other ones. For example, one class was importing |
Thats expected. If you import UIKit but only use However, there are times when autocorrect will cause the file to no longer compile, because the wider import wasn’t replaced by a more specific one. |
No description provided.