Skip to content
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

[WIP] Fixed sorted_imports rule to take into account all import declaration variants #1295

Closed
wants to merge 6 commits into from

Conversation

m-revetria
Copy link

@m-revetria m-revetria commented Feb 9, 2017

Fixes #1269 & #1185.
Additionally, added two new rules: duplicated_imports and imports_at_top

Added

  • duplicated_imports rule which checks for duplicated imports
  • imports_at_top rule which checks if all imports are placed at top of the file regardless of comments

Fixes

  • sorted_imports rule:

    • ignore_case option added to configuration, by default the rule will be case insensitive.
    • Grouping imports by importation kind (class, enum, func, etc., Import Declaration from Apple Docs)
    • Checking if @testable imports are at the end of the import list.
    // Example of a non-triggering import list
    import AAA
    import bbb
    
    import enum AAA.Enum
    import enum bbb.Enum
    
    import func AAA.Func
    
    import protocol bbb.Protocol
    
    import struct AAA.Struct
    
    import typealias AAA.Typealias
    
    import var CCC.var
    
    @testable import bbb
    @testable import CCC

@SwiftLintBot
Copy link

SwiftLintBot commented Feb 9, 2017

136 Warnings
⚠️ This PR introduced a violation in WordPress-iOS: /WordPress/WordPressTest/MediaPicker/MediaLibraryPickerDataSourceTests.swift#L3:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in Alamofire: /Tests/NetworkReachabilityManagerTests.swift#L26:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in Alamofire: /Tests/ResultTests.swift#L26:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in Alamofire: /Tests/SessionDelegateTests.swift#L26:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in Alamofire: /Tests/SessionManagerTests.swift#L26:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift#L26:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in swift: /stdlib/public/SDK/Foundation/Data.swift#L33:12: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in swift: /stdlib/public/SDK/Foundation/Data.swift#L34:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in swift: /stdlib/public/SDK/Foundation/Data.swift#L35:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in SourceKitten: /Tests/LinuxMain.swift#L2:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in SourceKitten: /Tests/SourceKittenFrameworkTests/SourceKitTests.swift#L11:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/main.swift#L147:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Sourcery.swift#L11:8: warning: Duplicated Imports Violation: Avoid duplicated imports. (duplicated_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/ActivitiesDataSourceTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/AppDelegate.swift#L7:10: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/DashboardDataSourceTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/DashboardProjectsDrawerDataSourceTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/DiscoveryProjectsDataSourceTest.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/FindFriendsDataSourceTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/ProfileDataSourceTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/ProjectActivitiesDataSourceTests.swift#L6:18: warning: Duplicated Imports Violation: Avoid duplicated imports. (duplicated_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/ProjectActivitiesDataSourceTests.swift#L7:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/ProjectPamphletContentDataSourceTests.swift#L7:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/SearchDataSourceTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/DataSources/ThanksProjectsDataSourceTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/ActivitiesViewControllerTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DiscoveryFiltersViewControllerTests.swift#L4:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DiscoveryNavigationHeaderViewControllerTests.swift#L4:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/EmptyStatesViewControllerTests.swift#L4:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/LiveStreamDiscoveryViewControllerTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/SortPagerViewControllerTests.swift#L4:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/AssetImageGeneratorType.swift#L2:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in ios-oss: /Library/CircleAvatarImageViewTests.swift#L3:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/DataSource/ValueCellDataSourceTests.swift#L3:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/PaginateTests.swift#L7:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/TestHelpers/MockBundle.swift#L2:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/TestHelpers/XCTestCase+AppEnvironment.swift#L7:8: warning: Duplicated Imports Violation: Avoid duplicated imports. (duplicated_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/UIBarButtonItem.swift#L2:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in ios-oss: /Library/UIColor.swift#L2:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in ios-oss: /Library/UIColor.swift#L3:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in ios-oss: /Library/UIAlertController.swift#L3:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in ios-oss: /Library/UIAlertController.swift#L4:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in ios-oss: /Library/UIAlertController.swift#L5:1: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ActivitiesViewModelTests.swift#L7:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ActivityFriendBackingViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ActivityFriendFollowCellViewModelTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/BackingCellViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/CommentCellViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/CheckoutViewModelTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/DeprecatedWebViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/DiscoveryFiltersViewModelTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/EmptyStatesViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/FindFriendsHeaderCellViewModelTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/FindFriendsStatsCellViewModelTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/FindFriendsFriendFollowCellViewModelTests.swift#L11:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/FindFriendsViewModelTests.swift#L10:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessageCellViewModelTests.swift#L3:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessageDialogViewModelTests.swift#L3:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessageDialogViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessagesSearchViewModel.swift#L4:8: warning: Duplicated Imports Violation: Avoid duplicated imports. (duplicated_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessagesViewModelTests.swift#L7:18: warning: Duplicated Imports Violation: Avoid duplicated imports. (duplicated_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessagesViewModelTests.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessagesSearchViewModelTests.swift#L7:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessageThreadCellViewModelTests.swift#L4:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/MessageThreadsViewModelTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ProfileProjectCellViewModelTests.swift#L7:18: warning: Duplicated Imports Violation: Avoid duplicated imports. (duplicated_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ProfileProjectCellViewModelTests.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ProjectActivitiesViewModelTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ Big PR
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ProjectActivitySuccessCellViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ProjectActivityUpdateCellViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/SearchViewModel.swift#L4:8: warning: Duplicated Imports Violation: Avoid duplicated imports. (duplicated_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/SearchViewModelTests.swift#L13:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ThanksViewModelTests.swift#L11:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/UpdateDraftViewModelTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in Moya: /Sources/Moya/Image.swift#L5:5: warning: Imports at top Violation: Imports should be placed at top of the file. (imports_at_top)
⚠️ This PR introduced a violation in firefox-ios: /AccountTests/FirefoxAccountTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /AccountTests/FxAClient10Tests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /AccountTests/FxAStateTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /AccountTests/HawkHelperTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /AccountTests/FxALoginStateMachineTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /AccountTests/SyncAuthStateTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /AccountTests/LiveAccountTest.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /AccountTests/TokenServerClientTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/ActivityStreamTests.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/CustomSearchEnginesTest.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/HomePageTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/MockProfile.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/MenuTests.swift#L7:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/PingCentreTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/PrefsTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/ProfileTest.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/ResetTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/SearchTests.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/SearchEnginesTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/TestBookmarks.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/TestFavicons.swift#L10:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/TabManagerTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/TestHistory.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /PushTests/LivePushClientTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /PushTests/PushCryptoTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /Storage/SQL/BrowserDB.swift#L9:8: warning: Duplicated Imports Violation: Avoid duplicated imports. (duplicated_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/MockFiles.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/DiskImageStoreTests.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/StorageTestUtils.swift#L11:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/SyncTelemetryTests.swift#L10:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/TestBrowserDB.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/TestDeferredSqlite.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/SyncCommandsTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/TestFaviconsTable.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/TestSQLiteBookmarks.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/TestLogins.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/TestSwiftData.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /StorageTests/TestTableTable.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/CryptoTests.swift#L10:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/DownloadTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/HistorySynchronizerTests.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/InfoTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/BatchingClientTests.swift#L10:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/LiveStorageClientTests.swift#L12:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/MockSyncServer.swift#L11:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/MockSyncServerTests.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/MetaGlobalTests.swift#L6:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/MetaGlobalTests.swift#L10:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/StateTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/StorageClientTests.swift#L9:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/RecordTests.swift#L8:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/TestBookmarkModel.swift#L10:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in firefox-ios: /SyncTests/TestBookmarkTreeMerging.swift#L10:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in Nimble: /Tests/NimbleTests/Helpers/utils.swift#L4:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in realm-cocoa: /RealmSwift/Tests/MigrationTests.swift#L23:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in realm-cocoa: /RealmSwift/Tests/ObjectSchemaInitializationTests.swift#L22:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in realm-cocoa: /RealmSwift/Tests/RealmTests.swift#L23:12: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in realm-cocoa: /RealmSwift/Tests/TestCase.swift#L22:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in WordPress-iOS: /WordPress/Classes/ViewRelated/Themes/ThemeBrowserViewController.swift#L4:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ProjectActivityLaunchCellViewModelTests.swift#L5:8: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
218 Messages
📖 Linting WordPress-iOS with this PR took 19.68s vs 17.43s on master (12% slower)
📖 This PR fixed a violation in Sourcery: /SourceryTests/Generating/StencilTemplateSpec.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in Sourcery: /SourceryTests/GeneratorSpec.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/ActivitiesDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/CommentsDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/DashboardDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/DashboardProjectsDrawerDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/DiscoveryPagesDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/DiscoveryFiltersDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/DiscoveryProjectsDataSourceTest.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/FindFriendsDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/LiveStreamDiscoveryDataSourceTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/ProfileDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/ProjectActivitiesDataSourceTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/ProjectPamphletContentDataSourceTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/SearchDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/DataSources/ThanksProjectsDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/ViewModels/AppDelegateViewModelTests.swift#L11:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/ViewModels/RootViewModelTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/BackingViewControllerTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/CommentsViewControllerTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DashboardViewControllerTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DiscoveryPageViewControllerTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/FacebookConfirmationViewControllerTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/FindFriendsViewControllerTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/LiveStreamContainerViewControllerTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/LiveStreamCountdownViewControllerTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/LoginToutViewControllerTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/LoginViewControllerTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/MessageThreadsViewControllerTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/ProfileViewControllerTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/ProjectActivityViewControllerTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/ProjectNavBarViewControllerTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/ProjectPamphletContentViewControllerTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/ResetPasswordViewControllerTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/RewardPledgeViewControllerTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/SearchViewControllerTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/SettingsViewControllerTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/SignupViewControllerTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/TwoFactorViewControllerTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Kickstarter-iOS/Views/FundingGraphViewTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/CircleAvatarImageViewTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/EnvironmentTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/DataSource/ValueCellDataSourceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/Koala/KoalaTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/KSCacheTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/LanguageTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/LaunchedCountriesTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/LocalizedStringTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/NavigationTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/PKPaymentRequestTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/RefTagTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/PaginateTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/PaginateTests.swift#L10:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/SharedFunctionsTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/String+SimpleHTMLTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/String+WhitespaceTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/String+TruncateTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/TestHelpers/TestCase.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/TestHelpers/XCTestCase+AppEnvironment.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/UIColorTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/UILabel+IBClearTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/UILabel+SimpleHTMLTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ActivityFriendBackingViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ActivitiesViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ActivityFriendFollowCellViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ActivityProjectStatusViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ActivitySampleBackingCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ActivitySampleFollowCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ActivitySampleProjectCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ActivityUpdateViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/BackingCellViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/BackingViewModelTests.swift#L8:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/CheckoutRacingViewModelTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/CommentCellViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/CommentDialogViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/CheckoutViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/CommentsEmptyStateCellViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/CommentsViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardActionCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardProjectsDrawerCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardFundingCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardProjectsDrawerViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardReferrerRowStackViewViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardReferrersCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardRewardRowStackViewViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardRewardsCellViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardTitleViewViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardVideoCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DeprecatedWebViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DashboardViewModelTests.swift#L8:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DiscoveryExpandableRowCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DiscoveryNavigationHeaderViewModelTests.swift#L8:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/DiscoveryPostcardViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/FacebookConfirmationViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/FindFriendsFaceookConnectCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/FindFriendsHeaderCellViewModelTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/FindFriendsStatsCellViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/FindFriendsFriendFollowCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/FindFriendsViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/LiveStreamContainerViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/LiveStreamCountdownViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/LiveStreamDiscoveryLiveNowCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/LiveStreamDiscoveryViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/LiveStreamEventDetailsViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/LoginToutViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/MessageCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/LoginViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/MessageDialogViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in Aerial: /Tests/PreferencesTests.swift#L10:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/MessagesSearchViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/MessagesViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/MessageThreadCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/MessageThreadsViewModelTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProfileProjectCellViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProfileViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectActivitiesViewModelTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectActivityBackingCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectActivityCommentCellViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectActivityLaunchCellViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectActivityNegativeStateChangeCellViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectActivitySuccessCellViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectActivityUpdateCellViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectCreatorViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectDescriptionViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectNavBarViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectNotificationCellViewModelTests.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectNotificationsViewModelTest.swift#L5:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectPamphletMainCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectPamphletContentViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectPamphletSubpageCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectUpdatesViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ResetPasswordViewModelTests.swift#L2:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/ProjectPamphletViewModelTests.swift#L8:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/RewardCellViewModelTests.swift#L8:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/RewardShippingPickerViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/SearchEmptyStateCellViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/SearchViewModelTests.swift#L6:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/SearchViewModelTests.swift#L12:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/RewardPledgeViewModelTests.swift#L11:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/SettingsViewModelTests.swift#L7:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/SignupViewModelTests.swift#L4:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
📖 This PR fixed a violation in ios-oss: /Library/ViewModels/SurveyResponseViewModelTests.swift#L3:18: warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
⚠️ Danger found 218 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 143.

Generated by 🚫 danger

@m-revetria m-revetria force-pushed the bugfix_1269 branch 2 times, most recently from 7f41def to e45613b Compare February 14, 2017 12:03
@codecov-io
Copy link

codecov-io commented Feb 14, 2017

Codecov Report

Merging #1295 into master will decrease coverage by 1.55%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1295      +/-   ##
==========================================
- Coverage   81.82%   80.27%   -1.56%     
==========================================
  Files         181      185       +4     
  Lines        9112     9884     +772     
==========================================
+ Hits         7456     7934     +478     
- Misses       1656     1950     +294
Impacted Files Coverage Δ
.../SwiftLintFrameworkTests/Yaml+SwiftLintTests.swift 83.78% <ø> (ø) ⬆️
.../SwiftLintFrameworkTests/AttributesRuleTests.swift 88.88% <ø> (ø) ⬆️
Tests/SwiftLintFrameworkTests/TestHelpers.swift 71.27% <ø> (ø) ⬆️
...s/SwiftLintFrameworkTests/ConfigurationTests.swift 82.52% <ø> (ø) ⬆️
.../SwiftLintFrameworkTests/LineLengthRuleTests.swift 89.79% <ø> (ø) ⬆️
Tests/SwiftLintFrameworkTests/RuleTests.swift 61.11% <ø> (ø) ⬆️
...sts/SwiftLintFrameworkTests/Swift2RulesTests.swift 0% <ø> (ø) ⬆️
...Tests/CyclomaticComplexityConfigurationTests.swift 84.33% <ø> (ø) ⬆️
...ests/SwiftLintFrameworkTests/YamlParserTests.swift 46.66% <ø> (ø) ⬆️
...tFrameworkTests/LineLengthConfigurationTests.swift 86.7% <ø> (ø) ⬆️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee90273...b9c106b. Read the comment docs.

@jpsim
Copy link
Collaborator

jpsim commented Feb 15, 2017

Thanks for the PR @m-revetria! What's the state of this now? The OSSCheck comment has lots of noise so I'd rather not bang my head trying to make sense of all this if this is still work in progress.

@m-revetria
Copy link
Author

m-revetria commented Feb 15, 2017

Hi @jpsim this is ready to go. I fixed some issues that were appearing like I forgot to update the changelog or some conflicts with the master branch.

I'm not sure how to proceed with all these warnings while linting other libraries. What should I do in those cases?

Thanks

@m-revetria
Copy link
Author

Hello @jpsim, is any progress on reviewing this? Is anything I should do in order to go forward?

@jpsim
Copy link
Collaborator

jpsim commented Mar 10, 2017

@mlilback
Copy link

It should ignore sorting order for rules in #ifdefs or an option to do so. For example

#ifdef os(OSX)
import AppKit
#else
import UIKit
#endif

@m-revetria
Copy link
Author

m-revetria commented Mar 27, 2017

Hi @jpsim, @mlilback, I'm sorry for the long time to reply.

I think we can allow developers to set what to do with @testable in 3 diff way:

  • All of them should go before other imports:
    @testable import MyModule
    import AVKit
  • All of them should go after other imports:
    import UIKit
    @testable import MyModule
  • The @testable is ignored and imports are then sorted just by their module
    import AVKit
    @testable import MyModule
    import UIKit

Regarding nested imports in #if macros, I'll add an option to just ignore them. By default, I would let the rule to check those imports as well.

What do you think?

@m-revetria m-revetria changed the title Fixed sorted_imports rule to take into account all import declaration variants [WIP] Fixed sorted_imports rule to take into account all import declaration variants Mar 28, 2017
@jpsim
Copy link
Collaborator

jpsim commented May 24, 2017

The suggestions in your last comment make sense to me @m-revetria!

<CommandLineArgument
argument = "--config /Users/remer/Workspace/ios/swiftlint-test/.swiftlint.yml"
isEnabled = "YES">
</CommandLineArgument>

Choose a reason for hiding this comment

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

I think you might have forgot to remove this...

@Coder-256
Copy link

Are there any plans to implement this? I think it would still be useful.

@georgescumihai
Copy link

I know this looks dead, but are there any plans for it @m-revetria ?

@Jeehut
Copy link
Collaborator

Jeehut commented Feb 25, 2019

@m-revetria Do you still have plans to complete this implementation? I'd be happy to review changes.

If @m-revetria doesn't have the time to continue this, is there anyone else who would post a new PR with his own solution to fix #1269 (you could decide to use the code from this PR or begin yourself).

Also please note, that in my opinion this PR actually should be 5 separate PRs:

  1. Adding a case_sensitive option to the sorted_imports rule
  2. Adding an testable_order option with the three possible values above, below and mixed
  3. A new duplicated_imports rule
  4. A new imports_at_top rule

@stale
Copy link

stale bot commented Nov 8, 2020

This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!

@stale stale bot added the wontfix Issues that became stale and were auto-closed by a bot. label Nov 8, 2020
@stale stale bot closed this Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Issues that became stale and were auto-closed by a bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sorted_imports rule is not caring about different import flavors
9 participants