diff --git a/Example/Diagnostics-Example/Supporting Files/AppDelegate.swift b/Example/Diagnostics-Example/Supporting Files/AppDelegate.swift index 608f7f2..6a12816 100644 --- a/Example/Diagnostics-Example/Supporting Files/AppDelegate.swift +++ b/Example/Diagnostics-Example/Supporting Files/AppDelegate.swift @@ -5,7 +5,6 @@ // Created by Antoine van der Lee on 02/12/2019. // Copyright © 2019 WeTransfer. All rights reserved. // -// swiftlint:disable line_length import Diagnostics import UIKit @@ -24,7 +23,10 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { } } - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { do { try DiagnosticsLogger.setup() } catch { @@ -34,6 +36,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { DiagnosticsLogger.log(message: "Application started") DiagnosticsLogger.log(error: ExampleError.missingData) DiagnosticsLogger.log(error: ExampleLocalizedError.missingLocalizedData) + // swiftlint:disable:next line_length DiagnosticsLogger.log(message: "A very long string: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum facilisis arcu, at fermentum diam fermentum in. Nullam lectus libero, tincidunt et risus vel, feugiat vulputate nunc. Nunc malesuada congue risus fringilla lacinia. Aliquam suscipit nulla nec faucibus mattis. Suspendisse quam nunc, interdum vel dapibus in, vulputate ac enim. Morbi placerat commodo leo, nec condimentum eros dictum sit amet. Vivamus maximus neque in dui rutrum, vel consectetur metus mollis. Nulla ultricies sodales viverra. Etiam ut velit consectetur, consectetur turpis eu, volutpat purus. Maecenas vitae consectetur tortor, at eleifend lacus. Nullam sed augue vel purus mollis sagittis at sed dui. Quisque faucibus fermentum lectus eget porttitor. Phasellus efficitur aliquet lobortis. Suspendisse at lectus imperdiet, sollicitudin arcu non, interdum diam. Sed ornare ante dolor. In pretium auctor sem, id vestibulum sem molestie in.") // Override point for customization after application launch. return true @@ -41,7 +44,11 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: UISceneSession Lifecycle - func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + func application( + _ application: UIApplication, + configurationForConnecting connectingSceneSession: UISceneSession, + options: UIScene.ConnectionOptions + ) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) diff --git a/Sources/DiagnosticsReporter.swift b/Sources/DiagnosticsReporter.swift index b8d9844..ef9f9c1 100644 --- a/Sources/DiagnosticsReporter.swift +++ b/Sources/DiagnosticsReporter.swift @@ -5,7 +5,6 @@ // Created by Antoine van der Lee on 02/12/2019. // Copyright © 2019 WeTransfer. All rights reserved. // -// swiftlint:disable line_length import Foundation @@ -120,6 +119,7 @@ extension DiagnosticsReporter { return html } + // swiftlint:disable line_length private static func footer() -> HTML { return """ """ } + // swiftlint:enable line_length static func style() -> HTML { guard let cssURL = Bundle.module.url(forResource: "style.css", withExtension: nil), let css = try? String(contentsOf: cssURL) else { @@ -140,12 +141,15 @@ extension DiagnosticsReporter { } static func scripts() -> HTML { - guard let scriptsURL = Bundle.module.url(forResource: "functions.js", withExtension: nil), let scripts = try? String(contentsOf: scriptsURL) else { + guard + let scriptsURL = Bundle.module.url(forResource: "functions.js", withExtension: nil), + let scripts = try? String(contentsOf: scriptsURL) else { return "" } return "" } + // swiftlint:disable line_length static func menu(using chapters: [DiagnosticsChapter]) -> HTML { var html = "" return html } + // swiftlint:enable line_length static func mainContent(using chapters: [DiagnosticsChapter]) -> HTML { var html = "