Use SwiftFormat version 0.48.x
This commit is contained in:
parent
56a5cbe5cb
commit
7cbc14978a
6 changed files with 9 additions and 5 deletions
|
|
@ -116,6 +116,10 @@
|
||||||
|
|
||||||
--elseposition same-line
|
--elseposition same-line
|
||||||
|
|
||||||
|
### Empty braces: "no-space" (default), "spaced" or "linebreak"
|
||||||
|
|
||||||
|
--emptybraces no-space
|
||||||
|
|
||||||
### Case of 'e' in numbers: "lowercase" or "uppercase" (default)
|
### Case of 'e' in numbers: "lowercase" or "uppercase" (default)
|
||||||
|
|
||||||
--exponentcase lowercase
|
--exponentcase lowercase
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ class GitRepositorySettingsTableViewController: UITableViewController, PasswordA
|
||||||
if let scheme = gitURL.scheme {
|
if let scheme = gitURL.scheme {
|
||||||
switch scheme {
|
switch scheme {
|
||||||
case "http", "https", "ssh":
|
case "http", "https", "ssh":
|
||||||
if gitURL.user == nil && usernameTextField.text == nil {
|
if gitURL.user == nil, usernameTextField.text == nil {
|
||||||
Utils.alert(title: "CannotSave".localize(), message: "CannotFindUsername.".localize(), controller: self)
|
Utils.alert(title: "CannotSave".localize(), message: "CannotFindUsername.".localize(), controller: self)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ class PasswordEditorTableViewController: UITableViewController {
|
||||||
var previousPathLength = Int.max
|
var previousPathLength = Int.max
|
||||||
while passwordURL.path != "." {
|
while passwordURL.path != "." {
|
||||||
passwordURL = passwordURL.deletingLastPathComponent()
|
passwordURL = passwordURL.deletingLastPathComponent()
|
||||||
if passwordURL.path != "." && passwordURL.path.count >= previousPathLength {
|
if passwordURL.path != ".", passwordURL.path.count >= previousPathLength {
|
||||||
Utils.alert(title: "CannotSave".localize(), message: "CannotParseFilename.".localize(), controller: self, completion: nil)
|
Utils.alert(title: "CannotSave".localize(), message: "CannotParseFilename.".localize(), controller: self, completion: nil)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,7 @@ extension PasswordNavigationViewController {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} else if identifier == "addPasswordSegue" {
|
} else if identifier == "addPasswordSegue" {
|
||||||
guard PGPAgent.shared.isPrepared && PasswordStore.shared.storeRepository != nil else {
|
guard PGPAgent.shared.isPrepared, PasswordStore.shared.storeRepository != nil else {
|
||||||
Utils.alert(title: "CannotAddPassword".localize(), message: "MakeSurePgpAndGitProperlySet.".localize(), controller: self)
|
Utils.alert(title: "CannotAddPassword".localize(), message: "MakeSurePgpAndGitProperlySet.".localize(), controller: self)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public class KeyFileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public func importKey(from string: String) throws {
|
public func importKey(from string: String) throws {
|
||||||
guard string.unicodeScalars.allSatisfy({ $0.isASCII }) else {
|
guard string.unicodeScalars.allSatisfy(\.isASCII) else {
|
||||||
throw AppError.encoding
|
throw AppError.encoding
|
||||||
}
|
}
|
||||||
keyHandler(string, keyType.getKeychainKey())
|
keyHandler(string, keyType.getKeychainKey())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
SWIFTFORMAT_VERSION="0.47.*"
|
SWIFTFORMAT_VERSION="0.48.*"
|
||||||
|
|
||||||
if [[ "${CI}" == "true" ]]; then
|
if [[ "${CI}" == "true" ]]; then
|
||||||
echo "Running in a Continuous Integration environment. Formatting is skipped."
|
echo "Running in a Continuous Integration environment. Formatting is skipped."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue