Skip to content

Commit aa17634

Browse files
committed
chore: update changes after swiftformat command
1 parent 943b6b6 commit aa17634

File tree

455 files changed

+3199
-2400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

455 files changed

+3199
-2400
lines changed

.swiftformat

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,17 @@
6565
--enable void
6666
--empty void
6767

68-
--disable wrapArguments
69-
--closingparen same-line
70-
--wraparguments after-first
68+
--enable wrapArguments
69+
--closingparen balanced
70+
--wraparguments before-first
7171
--wrapcollections before-first
72+
--wrapconditions preserve
7273

7374
# standalone rules
75+
--disable preferKeyPath
76+
--disable conditionalAssignment
77+
--disable wrapMultilineConditionalAssignment
78+
--disable wrapMultilineStatementBraces
7479
--disable andOperator
7580
--disable anyObjectProtocol
7681
--disable blankLinesAroundMark
@@ -114,4 +119,4 @@
114119
--enable strongifiedSelf
115120
--disable todos
116121
--enable typeSugar
117-
--enable yodaConditions
122+
--enable yodaConditions

Amplify/Amplify.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,63 +37,63 @@ public class Amplify: @unchecked Sendable {
3737

3838
/// - Tag: Amplify.Analytics
3939
private static let analyticsAtomic = AtomicValue<AnalyticsCategory>(initialValue: AnalyticsCategory())
40-
public static internal(set) var Analytics: AnalyticsCategory {
40+
public internal(set) static var Analytics: AnalyticsCategory {
4141
get { analyticsAtomic.get() }
4242
set { analyticsAtomic.set(newValue) }
4343
}
4444

4545
/// - Tag: Amplify.API
4646
private static let apiAtomic = AtomicValue<APICategory>(initialValue: APICategory())
47-
public static internal(set) var API: APICategory {
47+
public internal(set) static var API: APICategory {
4848
get { apiAtomic.get() }
4949
set { apiAtomic.set(newValue) }
5050
}
5151

5252
/// - Tag: Amplify.Auth
5353
private static let authAtomic = AtomicValue<AuthCategory>(initialValue: AuthCategory())
54-
public static internal(set) var Auth: AuthCategory {
54+
public internal(set) static var Auth: AuthCategory {
5555
get { authAtomic.get() }
5656
set { authAtomic.set(newValue) }
5757
}
5858

5959
/// - Tag: Amplify.DataStore
6060
private static let dataStoreAtomic = AtomicValue<DataStoreCategory>(initialValue: DataStoreCategory())
61-
public static internal(set) var DataStore: DataStoreCategory {
61+
public internal(set) static var DataStore: DataStoreCategory {
6262
get { dataStoreAtomic.get() }
6363
set { dataStoreAtomic.set(newValue) }
6464
}
6565

6666
/// - Tag: Amplify.Geo
6767
private static let geoAtomic = AtomicValue<GeoCategory>(initialValue: GeoCategory())
68-
public static internal(set) var Geo: GeoCategory {
68+
public internal(set) static var Geo: GeoCategory {
6969
get { geoAtomic.get() }
7070
set { geoAtomic.set(newValue) }
7171
}
7272

7373
/// - Tag: Amplify.Hub
7474
private static let hubAtomic = AtomicValue<HubCategory>(initialValue: HubCategory())
75-
public static internal(set) var Hub: HubCategory {
75+
public internal(set) static var Hub: HubCategory {
7676
get { hubAtomic.get() }
7777
set { hubAtomic.set(newValue) }
7878
}
7979

8080
/// - Tag: Amplify.Notifications
8181
private static let notificationsAtomic = AtomicValue<NotificationsCategory>(initialValue: NotificationsCategory())
82-
public static internal(set) var Notifications: NotificationsCategory {
82+
public internal(set) static var Notifications: NotificationsCategory {
8383
get { notificationsAtomic.get() }
8484
set { notificationsAtomic.set(newValue) }
8585
}
8686

8787
/// - Tag: Amplify.Predictions
8888
private static let predictionsAtomic = AtomicValue<PredictionsCategory>(initialValue: PredictionsCategory())
89-
public static internal(set) var Predictions: PredictionsCategory {
89+
public internal(set) static var Predictions: PredictionsCategory {
9090
get { predictionsAtomic.get() }
9191
set { predictionsAtomic.set(newValue) }
9292
}
9393

9494
/// - Tag: Amplify.Storage
9595
private static let storageAtomic = AtomicValue<StorageCategory>(initialValue: StorageCategory())
96-
public static internal(set) var Storage: StorageCategory {
96+
public internal(set) static var Storage: StorageCategory {
9797
get { storageAtomic.get() }
9898
set { storageAtomic.set(newValue) }
9999
}

Amplify/Categories/API/Error/APIError.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ extension APIError: AmplifyError {
106106
For more information on HTTP status codes, take a look at
107107
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
108108
"""
109+
109110
case .pluginError(let error):
110111
return error.recoverySuggestion
111112
}

Amplify/Categories/API/Operation/RetryableGraphQLOperation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public final class RetryableGraphQLOperation<Payload: Decodable> {
1616
private let nondeterminsticOperation: NondeterminsticOperation<GraphQLTask<Payload>.Success>
1717

1818
public init(
19-
requestStream: AsyncStream < () async throws -> GraphQLTask<Payload>.Success>
19+
requestStream: AsyncStream<() async throws -> GraphQLTask<Payload>.Success>
2020
) {
2121
self.nondeterminsticOperation = NondeterminsticOperation(
2222
operations: requestStream,
@@ -80,7 +80,7 @@ public final class RetryableGraphQLSubscriptionOperation<Payload> where Payload:
8080
private let nondeterminsticOperation: NondeterminsticOperation<AmplifyAsyncThrowingSequence<SubscriptionEvents>>
8181

8282
public init(
83-
requestStream: AsyncStream < () async throws -> AmplifyAsyncThrowingSequence < SubscriptionEvents>>
83+
requestStream: AsyncStream<() async throws -> AmplifyAsyncThrowingSequence<SubscriptionEvents>>
8484
) {
8585
self.nondeterminsticOperation = NondeterminsticOperation(operations: requestStream)
8686
}

Amplify/Categories/API/Response/GraphQLError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct GraphQLError: Decodable {
3737
public extension GraphQLError {
3838

3939
/// Both `line` and `column` are positive numbers describing the beginning of an associated syntax element
40-
public struct Location: Decodable, @unchecked Sendable {
40+
struct Location: Decodable, @unchecked Sendable {
4141

4242
/// The line describing the associated syntax element
4343
public let line: Int

Amplify/Categories/Auth/AuthCategory+ClientBehavior.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extension AuthCategory: AuthCategoryBehavior {
7575
public func autoSignIn() async throws -> AuthSignInResult {
7676
try await plugin.autoSignIn()
7777
}
78-
78+
7979
public func deleteUser() async throws {
8080
try await plugin.deleteUser()
8181
}

Amplify/Categories/Auth/AuthCategoryBehavior.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ public protocol AuthCategoryBehavior: AuthCategoryUserBehavior, AuthCategoryDevi
111111
options: AuthConfirmSignInRequest.Options?
112112
) async throws -> AuthSignInResult
113113

114-
114+
115115
/// Auto signs in the user for passwordless sign up
116116
func autoSignIn() async throws -> AuthSignInResult
117-
117+
118118
/// Sign out the currently logged-in user.
119119
///
120120
/// - Parameters:

Amplify/Categories/Auth/Models/AccessGroup.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import Foundation
1111
public struct AccessGroup {
1212
/// The name of the access group.
1313
public let name: String?
14-
14+
1515
/// A flag indicating whether to migrate keychain items.
1616
public let migrateKeychainItems: Bool
1717

1818
/**
1919
Initializes an `AccessGroup` with the specified name and migration option.
20-
20+
2121
- Parameter name: The name of the access group.
2222
- Parameter migrateKeychainItemsOfUserSession: A flag indicating whether to migrate keychain items. Defaults to `false`.
2323
*/
@@ -27,7 +27,7 @@ public struct AccessGroup {
2727

2828
/**
2929
Creates an `AccessGroup` instance with no specified name.
30-
30+
3131
- Parameter migrateKeychainItemsOfUserSession: A flag indicating whether to migrate keychain items.
3232
- Returns: An `AccessGroup` instance with the migration option set.
3333
*/
@@ -37,13 +37,13 @@ public struct AccessGroup {
3737

3838
/**
3939
A static property representing an `AccessGroup` with no name and no migration.
40-
40+
4141
- Returns: An `AccessGroup` instance with no name and the migration option set to `false`.
4242
*/
4343
public static var none: AccessGroup {
4444
return .none(migrateKeychainItemsOfUserSession: false)
4545
}
46-
46+
4747
private init(name: String? = nil, migrateKeychainItems: Bool) {
4848
self.name = name
4949
self.migrateKeychainItems = migrateKeychainItems

Amplify/Categories/Auth/Models/AuthSignUpStep.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ public enum AuthSignUpStep {
1818
UserId? = nil
1919
)
2020

21-
/// Sign Up successfully completed
21+
/// Sign Up successfully completed
2222
/// The customers can use this step to determine if they want to complete sign in
2323
case completeAutoSignIn(Session)
24-
24+
2525
/// Sign up is complete
2626
case done
2727
}

Amplify/Categories/Auth/Request/AuthFetchSessionRequest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public extension AuthFetchSessionRequest {
4545

4646
extension AuthFetchSessionRequest.Options: @unchecked Sendable { }
4747

48-
extension AuthFetchSessionRequest.Options {
49-
public static func forceRefresh() -> AuthFetchSessionRequest.Options {
48+
public extension AuthFetchSessionRequest.Options {
49+
static func forceRefresh() -> AuthFetchSessionRequest.Options {
5050
return AuthFetchSessionRequest.Options(forceRefresh: true)
5151
}
5252
}

0 commit comments

Comments
 (0)