Enable SwiftLint rule 'computed_accessors_order' and fix all violations

This commit is contained in:
Danny Moesch 2020-08-10 23:14:12 +02:00 committed by Mingshen Sun
parent 3197ef39a3
commit 8a4136b7ce
2 changed files with 7 additions and 6 deletions

View file

@ -20,6 +20,7 @@ whitelist_rules:
- colon - colon
- comma - comma
- compiler_protocol_init - compiler_protocol_init
- computed_accessors_order
- conditional_returns_on_newline - conditional_returns_on_newline
- contains_over_filter_count - contains_over_filter_count
- contains_over_filter_is_empty - contains_over_filter_is_empty

View file

@ -36,21 +36,21 @@ public class PasswordStore {
} }
public var gitPassword: String? { public var gitPassword: String? {
set {
AppKeychain.shared.add(string: newValue, for: Globals.gitPassword)
}
get { get {
AppKeychain.shared.get(for: Globals.gitPassword) AppKeychain.shared.get(for: Globals.gitPassword)
} }
set {
AppKeychain.shared.add(string: newValue, for: Globals.gitPassword)
}
} }
public var gitSSHPrivateKeyPassphrase: String? { public var gitSSHPrivateKeyPassphrase: String? {
set {
AppKeychain.shared.add(string: newValue, for: Globals.gitSSHPrivateKeyPassphrase)
}
get { get {
AppKeychain.shared.get(for: Globals.gitSSHPrivateKeyPassphrase) AppKeychain.shared.get(for: Globals.gitSSHPrivateKeyPassphrase)
} }
set {
AppKeychain.shared.add(string: newValue, for: Globals.gitSSHPrivateKeyPassphrase)
}
} }
private let fm = FileManager.default private let fm = FileManager.default