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
{{ message }}
Repository navigation
duplicate_imports deletes @testable import X when import X is also present #6922
duplicate_imports treats import X and @testable import X as the same import. --fix deletes whichever line comes second. If a test file puts the plain imports first, the @testable line is the one that goes, and anything that needed internal access from that module fails to compile.
importMyModule@testableimportMyModule
$ swiftlint lint --only-rule duplicate_imports Repro.swift
Repro.swift:2:1: warning: Duplicate Imports Violation: Imports should be unique (duplicate_imports)
Activity
Prefer attributed imports when correcting `duplicate_imports`