You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why should this rule be added? Share links to existing discussion about what
the community thinks about this.
Duplicate imports are unnecessary.
Provide several examples of what would and wouldn't trigger violations.
// Should Trigger
import Foundation
import Dispatch
import Foundation
// Should Trigger
import Foundation
import Foundation.NSString
// Should Not TriggerImport Foundation.NSString
Import Foundation.NSRange
Should the rule be configurable, if so what parameters should be configurable?
Shouldn't be configurable. Either there are duplicates or not.
Should the rule be opt-in or enabled by default? Why?
See README.md for guidelines on when to mark a
rule as opt-in.
New Issue Checklist
Rule Request
Duplicate imports are unnecessary.
Shouldn't be configurable. Either there are duplicates or not.
Enabled by default.
@marcelofabri removing this duplicate import motivated me to write this rule request: https://github.com/realm/SwiftLint/pull/1872/files#diff-71e28580a5fd3b8b3f701a7c8ca9f6a9
There are gotchas around conditional imports, so I suggest we just not count imports in a conditional compilation expression.
The text was updated successfully, but these errors were encountered: