From ed7e04c9551524136b9af5a993cdd34cd0eb5d8f Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Sun, 21 Mar 2021 16:26:07 -0700 Subject: [PATCH] Change swiftlint config --- .swiftlint.yml | 5 +++++ DB/Sources/DB/Content/ContentDatabase.swift | 2 -- View Controllers/NewStatusViewController.swift | 2 -- .../ViewModels/View Models/CollectionItemsViewModel.swift | 2 -- Views/UIKit/AccountHeaderView.swift | 2 -- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 7184a50..5f16455 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -3,3 +3,8 @@ disabled_rules: - type_name opt_in_rules: - sorted_imports + +file_length: + warning: 500 + error: 1000 + ignore_comment_only_lines: true diff --git a/DB/Sources/DB/Content/ContentDatabase.swift b/DB/Sources/DB/Content/ContentDatabase.swift index 383f5c9..7cf2dad 100644 --- a/DB/Sources/DB/Content/ContentDatabase.swift +++ b/DB/Sources/DB/Content/ContentDatabase.swift @@ -7,7 +7,6 @@ import Keychain import Mastodon import Secrets -// swiftlint:disable file_length public struct ContentDatabase { public let activeFiltersPublisher: AnyPublisher<[Filter], Error> @@ -685,4 +684,3 @@ private extension ContentDatabase { } } } -// swiftlint:enable file_length diff --git a/View Controllers/NewStatusViewController.swift b/View Controllers/NewStatusViewController.swift index 364cf9f..0b029e6 100644 --- a/View Controllers/NewStatusViewController.swift +++ b/View Controllers/NewStatusViewController.swift @@ -8,7 +8,6 @@ import SwiftUI import UniformTypeIdentifiers import ViewModels -// swiftlint:disable file_length final class NewStatusViewController: UIViewController { private let viewModel: NewStatusViewModel private let rootViewModel: RootViewModel? @@ -486,4 +485,3 @@ private extension NewStatusViewController { } } } -// swiftlint:enable file_length diff --git a/ViewModels/Sources/ViewModels/View Models/CollectionItemsViewModel.swift b/ViewModels/Sources/ViewModels/View Models/CollectionItemsViewModel.swift index 6d22592..7050b9e 100644 --- a/ViewModels/Sources/ViewModels/View Models/CollectionItemsViewModel.swift +++ b/ViewModels/Sources/ViewModels/View Models/CollectionItemsViewModel.swift @@ -5,7 +5,6 @@ import Foundation import Mastodon import ServiceLayer -// swiftlint:disable file_length public class CollectionItemsViewModel: ObservableObject { public let identityContext: IdentityContext @Published public var alertItem: AlertItem? @@ -464,4 +463,3 @@ private extension CollectionItemsViewModel { return nil } } -// swiftlint:enable file_length diff --git a/Views/UIKit/AccountHeaderView.swift b/Views/UIKit/AccountHeaderView.swift index 931475f..6bd2490 100644 --- a/Views/UIKit/AccountHeaderView.swift +++ b/Views/UIKit/AccountHeaderView.swift @@ -4,7 +4,6 @@ import SDWebImage import UIKit import ViewModels -// swiftlint:disable file_length final class AccountHeaderView: UIView { let headerImageBackgroundView = UIView() let headerImageView = SDAnimatedImageView() @@ -537,4 +536,3 @@ private extension AccountHeaderView { ]) } } -// swiftlint:enable file_length