Sorted Imports
Imports should be sorted
- Identifier:
sorted_imports
- Enabled by default: No
- Supports autocorrection: Yes
- Kind: style
- Analyzer rule: No
- Minimum Swift compiler version: 5.0.0
- Default configuration:
Key Value severity warning grouping names
Non Triggering Examples
import AAA
import BBB
import CCC
import DDD
import Alamofire
import API
import labc
import Ldef
import BBB
// comment
import AAA
import CCC
@testable import AAA
import CCC
import AAA
@testable import CCC
import EEE.A
import FFF.B
#if os(Linux)
import DDD.A
import EEE.B
#else
import CCC
import DDD.B
#endif
import AAA
import BBB
Triggering Examples
import AAA
import ZZZ
import ↓BBB
import CCC
import DDD
// comment
import CCC
import ↓AAA
@testable import CCC
import ↓AAA
import CCC
@testable import ↓AAA
import FFF.B
import ↓EEE.A
#if os(Linux)
import DDD.A
import EEE.B
#else
import DDD.B
import ↓CCC
#endif
import AAA
import BBB