Update SwiftLint and SwiftFormat (#613)

* Update Swift version used by SwiftFormat

* Update SwiftLint version

* Rely on new virtual 'all' rule in SwiftLint

* Enable SwiftLint rule 'direct_return' rule and fix all violations

* Enable SwiftLint rule 'shorthand_optional_binding' rule and fix all violations

* Enable SwiftLint rule 'blanket_disable_command' rule and fix all violations
This commit is contained in:
Danny Mösch 2023-04-23 22:01:37 +02:00 committed by GitHub
parent a22e872a8c
commit d9bd0f3014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 90 additions and 272 deletions

View file

@ -37,7 +37,7 @@ public extension FileManager {
}
// We have to enumerate all directory contents, including subdirectories.
let enumerator = self.enumerator(
let enumerator = enumerator(
at: directoryURL,
includingPropertiesForKeys: prefetchedProperties,
options: Self.DirectoryEnumerationOptions(),

View file

@ -9,8 +9,7 @@ import YubiKit
public enum YubiKeyAPDU {
public static func selectOpenPGPApplication() -> YKFSelectApplicationAPDU {
let selectOpenPGPAPDU = YKFSelectApplicationAPDU(data: Data([0xD2, 0x76, 0x00, 0x01, 0x24, 0x01]))!
return selectOpenPGPAPDU
YKFSelectApplicationAPDU(data: Data([0xD2, 0x76, 0x00, 0x01, 0x24, 0x01]))!
}
public static func verify(password: String) -> YKFAPDU {
@ -22,8 +21,7 @@ public enum YubiKeyAPDU {
apdu += [0x82] // P2: PW1
apdu += withUnsafeBytes(of: UInt8(pw1.count).bigEndian, Array.init)
apdu += pw1
let verifyApdu = YKFAPDU(data: Data(apdu))!
return verifyApdu
return YKFAPDU(data: Data(apdu))!
}
public static func decipherExtended(data: Data) -> [YKFAPDU] {