Skip to content

Commit 959e596

Browse files
authored
chore: fix swiftlint errors (#3921)
1 parent 152882e commit 959e596

File tree

12 files changed

+21
-21
lines changed

12 files changed

+21
-21
lines changed

Amplify/Categories/Auth/AuthCategory+WebAuthnBehaviour.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension AuthCategory: AuthCategoryWebAuthnBehaviour {
1515
options: AuthAssociateWebAuthnCredentialRequest.Options? = nil
1616
) async throws {
1717
try await plugin.associateWebAuthnCredential(
18-
presentationAnchor:presentationAnchor,
18+
presentationAnchor: presentationAnchor,
1919
options: options
2020
)
2121
}
@@ -25,7 +25,7 @@ extension AuthCategory: AuthCategoryWebAuthnBehaviour {
2525
options: AuthAssociateWebAuthnCredentialRequest.Options? = nil
2626
) async throws {
2727
try await plugin.associateWebAuthnCredential(
28-
presentationAnchor:presentationAnchor,
28+
presentationAnchor: presentationAnchor,
2929
options: options
3030
)
3131
}

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignIn/VerifySignInChallenge.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct VerifySignInChallenge: Action {
3333
environment: environment,
3434
username: username)
3535
return
36-
} else if case .continueSignInWithFirstFactorSelection(_) = currentSignInStep,
36+
} else if case .continueSignInWithFirstFactorSelection = currentSignInStep,
3737
let authFactorType = AuthFactorType(rawValue: confirmSignEventData.answer) {
3838
if (authFactorType == .password || authFactorType == .passwordSRP) {
3939
try await handleContinueSignInWithPassword(

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignIn/WebAuthn/PlatformWebAuthnCredentials.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class PlatformWebAuthnCredentials: NSObject, WebAuthnCredentialsProtocol {
4343

4444
// - MARK: CredentialAsserterProtocol
4545
@available(iOS 17.4, macOS 13.5, visionOS 1.0, *)
46-
extension PlatformWebAuthnCredentials: CredentialAsserterProtocol{
46+
extension PlatformWebAuthnCredentials: CredentialAsserterProtocol {
4747
func assert(with options: CredentialAssertionOptions) async throws -> CredentialAssertionPayload {
4848
guard assertionContinuation == nil else {
4949
throw WebAuthnError.unknown(

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AWSCognitoAuthCredentialStore.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ struct AWSCognitoAuthCredentialStore {
6363
/// - Old Identity Pool Config == New Identity Pool Config
6464
if oldUserPoolConfiguration == nil &&
6565
newIdentityConfigData != nil &&
66-
oldIdentityPoolConfiguration == newIdentityConfigData
67-
{
66+
oldIdentityPoolConfiguration == newIdentityConfigData {
6867
// retrieve data from the old namespace and save with the new namespace
6968
if let oldCognitoCredentialsData = try? keychain._getData(oldNameSpace) {
7069
try? keychain._set(oldCognitoCredentialsData, key: newNameSpace)

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Data/SignUpEventData.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ struct SignUpEventData {
1414
var session: String?
1515

1616
init(username: String,
17-
clientMetadata: [String : String]? = nil,
18-
validationData: [String : String]? = nil,
17+
clientMetadata: [String: String]? = nil,
18+
validationData: [String: String]? = nil,
1919
session: String? = nil) {
2020
self.username = username
2121
self.clientMetadata = clientMetadata
@@ -31,9 +31,9 @@ extension SignUpEventData: CustomDebugDictionaryConvertible {
3131
var debugDictionary: [String: Any] {
3232
[
3333
"username": username.masked(),
34-
"clientMetadata" : clientMetadata ?? "",
35-
"validationData" : validationData ?? "",
36-
"session" : session?.masked() ?? ""
34+
"clientMetadata": clientMetadata ?? "",
35+
"validationData": validationData ?? "",
36+
"session": session?.masked() ?? ""
3737
]
3838
}
3939
}

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/Resolvers/SignIn/SignInState+Resolver.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
import Foundation
88

9+
// swiftlint:disable type_body_length
910
extension SignInState {
1011

1112
// swiftlint:disable:next nesting

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/Resolvers/SignUp/SignUpState+Resolver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ extension SignUpState {
2222
switch oldState {
2323
case .notStarted:
2424
return resolveNotStarted(byApplying: signUpEvent, from: oldState)
25-
case .initiatingSignUp(_):
25+
case .initiatingSignUp:
2626
return resolveInitiatingSignUp(byApplying: signUpEvent, from: oldState)
2727
case .awaitingUserConfirmation:
2828
return resolveAwaitingUserConfirmation(byApplying: signUpEvent, from: oldState)
29-
case .confirmingSignUp(_):
29+
case .confirmingSignUp:
3030
return resolveConfirmingSignUp(byApplying: signUpEvent, from: oldState)
3131
case .signedUp:
3232
return resolveSignedUp(byApplying: signUpEvent, from: oldState)

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Task/AWSAuthSignUpTask.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class AWSAuthSignUpTask: AuthSignUpTask, DefaultLogger {
9191
let stateSequences = await authStateMachine.listen()
9292
log.verbose("Validating current state")
9393
for await state in stateSequences {
94-
guard case .configured(_ , _, let signUpState) = state else {
94+
guard case .configured(_, _, let signUpState) = state else {
9595
continue
9696
}
9797

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Task/Models/AWSWebAuthCredentialsModels.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ enum WebAuthnCredentialError<T>: Error {
1616
}
1717

1818
struct CredentialAssertionOptions: Codable, Equatable {
19-
private enum CodingKeys : String, CodingKey {
19+
private enum CodingKeys: String, CodingKey {
2020
case challengeString = "challenge", relyingPartyId = "rpId"
2121
}
2222
private let challengeString: String

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Task/Protocols/AuthAssociateWebAuthnCredentialTask.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import Foundation
1212
protocol AuthAssociateWebAuthnCredentialTask: AmplifyAuthTask where
1313
Request == AuthAssociateWebAuthnCredentialRequest,
1414
Success == Void,
15-
Failure == AuthError
16-
{}
15+
Failure == AuthError {
16+
}
1717

1818
public extension HubPayload.EventName.Auth {
1919
static let associateWebAuthnCredentialAPI = "Auth.associateWebAuthnCredentialAPI"

0 commit comments

Comments
 (0)