From b7f82944c76849002aa7c9aa79b7395fd057b92c Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 22 Jan 2025 22:38:37 -0800 Subject: [PATCH] Fix lint issues. --- .swiftlint.yml | 3 +++ .../Account/ReaderAPI/ReaderAPICaller.swift | 4 ++-- iOS/KeyboardManager.swift | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index f646f4508..bf5f89e26 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -1,8 +1,11 @@ identifier_name: min_length: 1 max_length: 40 + allowed_patterns: ^_.*$ + line_length: warning: 200 error: 300 ignores_comments: true ignores_urls: true + diff --git a/Modules/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift b/Modules/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift index b569bce42..f7ef1d509 100644 --- a/Modules/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift +++ b/Modules/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift @@ -476,11 +476,11 @@ final class ReaderAPICaller: NSObject { switch result { case .success: completion(.success(())) - case .failure(let error): + case .failure(let error): completion(.failure(error)) } }) - + case .failure(let error): completion(.failure(error)) } diff --git a/iOS/KeyboardManager.swift b/iOS/KeyboardManager.swift index d4f7803c5..a9c5c65e2 100644 --- a/iOS/KeyboardManager.swift +++ b/iOS/KeyboardManager.swift @@ -47,7 +47,18 @@ class KeyboardManager { static func createKeyCommand(title: String, action: String, input: String, modifiers: UIKeyModifierFlags) -> UIKeyCommand { let selector = NSSelectorFromString(action) - let keyCommand = UIKeyCommand(title: title, image: nil, action: selector, input: input, modifierFlags: modifiers, propertyList: nil, alternates: [], discoverabilityTitle: nil, attributes: [], state: .on) + let keyCommand = UIKeyCommand( + title: title, + image: nil, + action: selector, + input: input, + modifierFlags: modifiers, + propertyList: nil, + alternates: [], + discoverabilityTitle: nil, + attributes: [], + state: .on + ) keyCommand.wantsPriorityOverSystemBehavior = true return keyCommand } @@ -91,12 +102,11 @@ private extension KeyboardManager { return "\u{8}" case "[deletefunction]": return nil - case "[tab]": - return "\t" + case "[tab]": + return "\t" default: return key } - } static func createKeyModifierFlags(keyEntry: [String: Any]) -> UIKeyModifierFlags {