Sort imports

This commit is contained in:
Justin Mazzocchi 2020-09-04 19:31:43 -07:00
parent 51e6a41bd3
commit 70720b3c26
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C
45 changed files with 50 additions and 48 deletions

View file

@ -3,3 +3,5 @@ disabled_rules:
# Swift 5.3 # Swift 5.3
- multiple_closures_with_trailing_closure - multiple_closures_with_trailing_closure
- no_space_in_method_call - no_space_in_method_call
opt_in_rules:
- sorted_imports

View file

@ -2,7 +2,6 @@
import Foundation import Foundation
import GRDB import GRDB
import Mastodon
struct AccountResult: Codable, Hashable, FetchableRecord { struct AccountResult: Codable, Hashable, FetchableRecord {
let account: AccountRecord let account: AccountRecord

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import GRDB import GRDB
import Keychain import Keychain
import Mastodon import Mastodon

View file

@ -2,7 +2,6 @@
import Foundation import Foundation
import GRDB import GRDB
import Mastodon
struct StatusResult: Codable, Hashable, FetchableRecord { struct StatusResult: Codable, Hashable, FetchableRecord {
let account: AccountRecord let account: AccountRecord

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import GRDB import GRDB
import Keychain import Keychain
import Mastodon import Mastodon

View file

@ -1,5 +1,5 @@
import XCTest
@testable import DB @testable import DB
import XCTest
final class DBTests: XCTestCase { final class DBTests: XCTestCase {
func testExample() { func testExample() {

View file

@ -1,12 +1,12 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import SwiftUI
import KingfisherSwiftUI
import struct Kingfisher.KingfisherOptionsInfo
import protocol Kingfisher.ImageProcessor
import struct Kingfisher.DownsamplingImageProcessor import struct Kingfisher.DownsamplingImageProcessor
import struct Kingfisher.RoundCornerImageProcessor
import struct Kingfisher.FormatIndicatedCacheSerializer import struct Kingfisher.FormatIndicatedCacheSerializer
import protocol Kingfisher.ImageProcessor
import struct Kingfisher.KingfisherOptionsInfo
import struct Kingfisher.RoundCornerImageProcessor
import KingfisherSwiftUI
import SwiftUI
extension KingfisherOptionsInfo { extension KingfisherOptionsInfo {
static func downsampled(size: CGSize, scaleFactor: CGFloat, rounded: Bool = true) -> Self { static func downsampled(size: CGSize, scaleFactor: CGFloat, rounded: Bool = true) -> Self {

View file

@ -1,8 +1,8 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import UIKit
import Kingfisher import Kingfisher
import Mastodon import Mastodon
import UIKit
extension NSMutableAttributedString { extension NSMutableAttributedString {
func insert(emoji: [Emoji], view: UIView) { func insert(emoji: [Emoji], view: UIView) {

View file

@ -1,8 +1,8 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine
import Alamofire import Alamofire
import Combine
import Foundation
public typealias Session = Alamofire.Session public typealias Session = Alamofire.Session

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Alamofire import Alamofire
import Foundation
public typealias HTTPMethod = Alamofire.HTTPMethod public typealias HTTPMethod = Alamofire.HTTPMethod
public typealias HTTPHeaders = Alamofire.HTTPHeaders public typealias HTTPHeaders = Alamofire.HTTPHeaders

View file

@ -1,5 +1,5 @@
import XCTest
@testable import HTTP @testable import HTTP
import XCTest
final class HTTPTests: XCTestCase { final class HTTPTests: XCTestCase {
func testExample() { func testExample() {

View file

@ -1,5 +1,5 @@
import XCTest
@testable import Keychain @testable import Keychain
import XCTest
final class KeychainTests: XCTestCase { final class KeychainTests: XCTestCase {
func testExample() { func testExample() {

View file

@ -1,3 +1,5 @@
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation import Foundation
public enum Constants { public enum Constants {

View file

@ -1,5 +1,5 @@
import XCTest
@testable import Mastodon @testable import Mastodon
import XCTest
final class MastodonTests: XCTestCase { final class MastodonTests: XCTestCase {
func testExample() { func testExample() {

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import HTTP import HTTP
import Mastodon import Mastodon

View file

@ -1,5 +1,5 @@
import XCTest
@testable import MastodonAPI @testable import MastodonAPI
import XCTest
final class MastodonAPITests: XCTestCase { final class MastodonAPITests: XCTestCase {
func testExample() { func testExample() {

View file

@ -1,10 +1,10 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import UserNotifications
import CryptoKit import CryptoKit
import Keychain import Keychain
import Mastodon import Mastodon
import Secrets import Secrets
import UserNotifications
class NotificationService: UNNotificationServiceExtension { class NotificationService: UNNotificationServiceExtension {

View file

@ -1,5 +1,5 @@
import XCTest
@testable import Secrets @testable import Secrets
import XCTest
final class SecretsTests: XCTestCase { final class SecretsTests: XCTestCase {
func testExample() { func testExample() {

View file

@ -1,8 +1,8 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Combine
import DB import DB
import Foundation import Foundation
import Combine
import Mastodon import Mastodon
import MastodonAPI import MastodonAPI
import Secrets import Secrets

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import Mastodon import Mastodon
import MastodonAPI import MastodonAPI

View file

@ -1,8 +1,8 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Combine
import DB import DB
import Foundation import Foundation
import Combine
import Mastodon import Mastodon
import MastodonAPI import MastodonAPI
import Secrets import Secrets

View file

@ -1,8 +1,8 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import DB import DB
import Foundation
import Mastodon import Mastodon
import MastodonAPI import MastodonAPI

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import UserNotifications import UserNotifications
public struct UserNotificationService { public struct UserNotificationService {

View file

@ -1,8 +1,8 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import AuthenticationServices import AuthenticationServices
import Combine import Combine
import Foundation
public protocol WebAuthSession: AnyObject { public protocol WebAuthSession: AnyObject {
init(url URL: URL, init(url URL: URL,

View file

@ -1,10 +1,10 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import XCTest
import Combine import Combine
import CombineExpectations import CombineExpectations
@testable import ServiceLayer @testable import ServiceLayer
@testable import ServiceLayerMocks @testable import ServiceLayerMocks
import XCTest
class AuthenticationServiceTests: XCTestCase { class AuthenticationServiceTests: XCTestCase {
func testAuthentication() throws { func testAuthentication() throws {

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import UIKit
import Combine import Combine
import UIKit
class AppDelegate: NSObject { class AppDelegate: NSObject {
@Published private var application: UIApplication? @Published private var application: UIApplication?

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import SwiftUI
import Combine import Combine
import SwiftUI
import ViewModels import ViewModels
class StatusListViewController: UITableViewController { class StatusListViewController: UITableViewController {

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import HTTP import HTTP
import Mastodon import Mastodon
import MastodonAPI import MastodonAPI

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import ServiceLayer import ServiceLayer
public class AddIdentityViewModel: ObservableObject { public class AddIdentityViewModel: ObservableObject {

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import Mastodon import Mastodon
import ServiceLayer import ServiceLayer

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
extension Publisher { extension Publisher {
func assignErrorsToAlertItem<Root: AnyObject>( func assignErrorsToAlertItem<Root: AnyObject>(

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import Mastodon import Mastodon
import ServiceLayer import ServiceLayer

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import Mastodon import Mastodon
import ServiceLayer import ServiceLayer

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import Mastodon import Mastodon
import ServiceLayer import ServiceLayer

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import ServiceLayer import ServiceLayer
public class PostingReadingPreferencesViewModel: ObservableObject { public class PostingReadingPreferencesViewModel: ObservableObject {

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import ServiceLayer import ServiceLayer
public final class RootViewModel: ObservableObject { public final class RootViewModel: ObservableObject {

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import Mastodon import Mastodon
import ServiceLayer import ServiceLayer

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import Mastodon import Mastodon
import ServiceLayer import ServiceLayer

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Combine import Combine
import Foundation
import Mastodon import Mastodon
import ServiceLayer import ServiceLayer

View file

@ -1,6 +1,5 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import XCTest
import Combine import Combine
import CombineExpectations import CombineExpectations
import HTTP import HTTP
@ -9,6 +8,7 @@ import MockKeychain
import ServiceLayer import ServiceLayer
import ServiceLayerMocks import ServiceLayerMocks
@testable import ViewModels @testable import ViewModels
import XCTest
class AddIdentityViewModelTests: XCTestCase { class AddIdentityViewModelTests: XCTestCase {
func testAddIdentity() throws { func testAddIdentity() throws {

View file

@ -1,11 +1,11 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import XCTest
import Combine import Combine
import CombineExpectations import CombineExpectations
import ServiceLayer import ServiceLayer
import ServiceLayerMocks import ServiceLayerMocks
@testable import ViewModels @testable import ViewModels
import XCTest
class RootViewModelTests: XCTestCase { class RootViewModelTests: XCTestCase {
var cancellables = Set<AnyCancellable>() var cancellables = Set<AnyCancellable>()

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import UIKit
import Kingfisher import Kingfisher
import UIKit
import ViewModels import ViewModels
class AttachmentView: UIView { class AttachmentView: UIView {

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import SwiftUI
import KingfisherSwiftUI import KingfisherSwiftUI
import SwiftUI
import ViewModels import ViewModels
struct IdentitiesView: View { struct IdentitiesView: View {

View file

@ -1,7 +1,7 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import SwiftUI
import KingfisherSwiftUI import KingfisherSwiftUI
import SwiftUI
import ViewModels import ViewModels
struct SecondaryNavigationView: View { struct SecondaryNavigationView: View {

View file

@ -1,8 +1,8 @@
// Copyright © 2020 Metabolist. All rights reserved. // Copyright © 2020 Metabolist. All rights reserved.
import SwiftUI
import KingfisherSwiftUI import KingfisherSwiftUI
import enum Mastodon.Timeline import enum Mastodon.Timeline
import SwiftUI
import ViewModels import ViewModels
struct TabNavigationView: View { struct TabNavigationView: View {