Swift 3 function names#80
Conversation
| let recheckItem1 = try keychain.persistentTokenWithIdentifier(savedItem1.identifier) | ||
| let recheckItem2 = try keychain.persistentTokenWithIdentifier(savedItem2.identifier) | ||
| let recheckItem1 = try keychain.persistentToken(withIdentifier: savedItem1.identifier) | ||
| let recheckItem2 = try keychain.persistentToken(withIdentifier: savedItem2.identifier) |
There was a problem hiding this comment.
Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)
| do { | ||
| let recheckItem1 = try keychain.persistentTokenWithIdentifier(savedItem1.identifier) | ||
| let recheckItem2 = try keychain.persistentTokenWithIdentifier(savedItem2.identifier) | ||
| let recheckItem1 = try keychain.persistentToken(withIdentifier: savedItem1.identifier) |
There was a problem hiding this comment.
Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)
| let fetchedItem1 = try keychain.persistentTokenWithIdentifier(savedItem1.identifier) | ||
| let fetchedItem2 = try keychain.persistentTokenWithIdentifier(savedItem2.identifier) | ||
| let fetchedItem1 = try keychain.persistentToken(withIdentifier: savedItem1.identifier) | ||
| let fetchedItem2 = try keychain.persistentToken(withIdentifier: savedItem2.identifier) |
There was a problem hiding this comment.
Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)
| do { | ||
| let fetchedItem1 = try keychain.persistentTokenWithIdentifier(savedItem1.identifier) | ||
| let fetchedItem2 = try keychain.persistentTokenWithIdentifier(savedItem2.identifier) | ||
| let fetchedItem1 = try keychain.persistentToken(withIdentifier: savedItem1.identifier) |
There was a problem hiding this comment.
Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)
| // Attempt to restore the deleted token | ||
| do { | ||
| let fetchedToken = try keychain.persistentTokenWithIdentifier(savedToken.identifier) | ||
| let fetchedToken = try keychain.persistentToken(withIdentifier: savedToken.identifier) |
There was a problem hiding this comment.
Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)
| // Fetch the token again | ||
| do { | ||
| let fetchedToken = try keychain.persistentTokenWithIdentifier(savedToken.identifier) | ||
| let fetchedToken = try keychain.persistentToken(withIdentifier: savedToken.identifier) |
There was a problem hiding this comment.
Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)
| // Restore the token | ||
| do { | ||
| let fetchedToken = try keychain.persistentTokenWithIdentifier(savedToken.identifier) | ||
| let fetchedToken = try keychain.persistentToken(withIdentifier: savedToken.identifier) |
There was a problem hiding this comment.
Line Length Violation: Line should be 100 characters or less: currently 102 characters (line_length)
| public func updatePersistentToken(_ persistentToken: PersistentToken, | ||
| withToken token: Token) throws -> PersistentToken | ||
| { | ||
| public func update(_ persistentToken: PersistentToken, with token: Token) throws -> PersistentToken { |
There was a problem hiding this comment.
Line Length Violation: Line should be 100 characters or less: currently 105 characters (line_length)
There was a problem hiding this comment.
Barely over the limit, and definitely more readable on one line.
| private extension String { | ||
| /// Prepends the given character to the beginning of `self` until it matches the given length. | ||
| func paddedWithCharacter(_ character: Character, toLength length: Int) -> String { | ||
| func padded(with character: Character, toLength length: Int) -> String { |
There was a problem hiding this comment.
Valid Docs Violation: Documented declarations should be valid. (valid_docs)
Current coverage is 94.27% (diff: 100%)@@ swift-3 #80 diff @@
==========================================
Files 6 6
Lines 367 367
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 346 346
Misses 21 21
Partials 0 0
|
| } | ||
|
|
||
| private func tokenFromURL(_ url: URL, secret externalSecret: Data? = nil) -> Token? { | ||
| private func token(from url: URL, secret externalSecret: Data? = nil) -> Token? { |
There was a problem hiding this comment.
Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 46 lines (function_body_length)
Cyclomatic Complexity Violation: Function should have complexity 10 or less: currently complexity equals 13 (cyclomatic_complexity)
There was a problem hiding this comment.
Ignoring these warnings, as the represent issues that already exist and aren't being exacerbated by this PR.
Update several function names to conform to the Swift 3 naming guidelines.