Use SwiftFormat version 0.49.x and enable some new rules (#527)
This commit is contained in:
parent
b62c5fa2e5
commit
cdedff0d4d
32 changed files with 139 additions and 126 deletions
|
|
@ -11,7 +11,7 @@ public protocol CryptographicKey {
|
|||
func getFileSharingPath() -> String
|
||||
}
|
||||
|
||||
public enum PgpKey: CryptographicKey {
|
||||
public enum PGPKey: CryptographicKey {
|
||||
case PUBLIC
|
||||
case PRIVATE
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ public enum PgpKey: CryptographicKey {
|
|||
}
|
||||
}
|
||||
|
||||
public enum SshKey: CryptographicKey {
|
||||
public enum SSHKey: CryptographicKey {
|
||||
case PRIVATE
|
||||
|
||||
public func getKeychainKey() -> String {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ public extension FileManager {
|
|||
let contentItemURL = item as! NSURL
|
||||
|
||||
// Bail out on errors from the errorHandler.
|
||||
if let error = errorDidOccur { throw error }
|
||||
if let error = errorDidOccur {
|
||||
throw error
|
||||
}
|
||||
|
||||
let resourceValueForKey: (URLResourceKey) throws -> NSNumber? = { key in
|
||||
var value: AnyObject?
|
||||
|
|
@ -84,7 +86,9 @@ public extension FileManager {
|
|||
}
|
||||
|
||||
// Bail out on errors from the errorHandler.
|
||||
if let error = errorDidOccur { throw error }
|
||||
if let error = errorDidOccur {
|
||||
throw error
|
||||
}
|
||||
|
||||
// We finally got it.
|
||||
return accumulatedSize
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
public class KeyFileManager {
|
||||
public typealias KeyHandler = (String, String) -> Void
|
||||
|
||||
public static let PublicPgp = KeyFileManager(keyType: PgpKey.PUBLIC)
|
||||
public static let PrivatePgp = KeyFileManager(keyType: PgpKey.PRIVATE)
|
||||
public static let PrivateSsh = KeyFileManager(keyType: SshKey.PRIVATE)
|
||||
public static let PublicPGP = KeyFileManager(keyType: PGPKey.PUBLIC)
|
||||
public static let PrivatePGP = KeyFileManager(keyType: PGPKey.PRIVATE)
|
||||
public static let PrivateSSH = KeyFileManager(keyType: SSHKey.PRIVATE)
|
||||
|
||||
private let keyType: CryptographicKey
|
||||
private let keyPath: String
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue