Skip to content

Commit a5c3faf

Browse files
authored
chore: resolve swiftformat errors (#4086)
* chore: resolve swiftformat errors * update more files
1 parent 14f087d commit a5c3faf

File tree

8 files changed

+27
-27
lines changed

8 files changed

+27
-27
lines changed

AmplifyPlugins/Core/AWSPluginsCoreTests/Auth/AuthModeStrategyTests.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ class AuthModeStrategyTests: XCTestCase {
159159

160160
/// Model with two auth rules
161161
private struct ModelWithOwnerAndPublicAuth: Model {
162-
public let id: String
162+
let id: String
163163

164-
public enum CodingKeys: String, ModelKey {
164+
enum CodingKeys: String, ModelKey {
165165
case id
166166
}
167-
public static let keys = CodingKeys.self
167+
static let keys = CodingKeys.self
168168

169-
public static let schema = defineSchema { model in
169+
static let schema = defineSchema { model in
170170
model.authRules = [
171171
rule(allow: .owner, provider: .userPools, operations: [.create, .read, .update, .delete]),
172172
rule(allow: .public, provider: .apiKey, operations: [.create, .read, .update, .delete])
@@ -176,14 +176,14 @@ private struct ModelWithOwnerAndPublicAuth: Model {
176176

177177
/// Model with multiple auth rules with equal strategy
178178
private struct ModelWithMultiplePublicRules: Model {
179-
public let id: String
179+
let id: String
180180

181-
public enum CodingKeys: String, ModelKey {
181+
enum CodingKeys: String, ModelKey {
182182
case id
183183
}
184-
public static let keys = CodingKeys.self
184+
static let keys = CodingKeys.self
185185

186-
public static let schema = defineSchema { model in
186+
static let schema = defineSchema { model in
187187
model.authRules = [
188188
rule(allow: .public, provider: .iam, operations: [.create, .read, .update, .delete]),
189189
rule(allow: .public, provider: .apiKey, operations: [.create, .read, .update, .delete]),
@@ -195,14 +195,14 @@ private struct ModelWithMultiplePublicRules: Model {
195195

196196
/// Model with two auth rules but no auth provider
197197
private struct ModelNoProvider: Model {
198-
public let id: String
198+
let id: String
199199

200-
public enum CodingKeys: String, ModelKey {
200+
enum CodingKeys: String, ModelKey {
201201
case id
202202
}
203-
public static let keys = CodingKeys.self
203+
static let keys = CodingKeys.self
204204

205-
public static let schema = defineSchema { model in
205+
static let schema = defineSchema { model in
206206
model.authRules = [
207207
rule(allow: .owner, operations: [.create, .read, .update, .delete]),
208208
rule(allow: .public, operations: [.read])
@@ -212,14 +212,14 @@ private struct ModelNoProvider: Model {
212212

213213
/// Model with multiple auth rules but no auth provider
214214
private struct ModelAllStrategies: Model {
215-
public let id: String
215+
let id: String
216216

217-
public enum CodingKeys: String, ModelKey {
217+
enum CodingKeys: String, ModelKey {
218218
case id
219219
}
220-
public static let keys = CodingKeys.self
220+
static let keys = CodingKeys.self
221221

222-
public static let schema = defineSchema { model in
222+
static let schema = defineSchema { model in
223223
model.authRules = [
224224
rule(allow: .owner, provider: .userPools, operations: [.create, .read, .update, .delete]),
225225
rule(allow: .public, provider: .iam, operations: [.read]),
@@ -231,14 +231,14 @@ private struct ModelAllStrategies: Model {
231231

232232
/// Model with custom auth rule
233233
private struct ModelWithCustomStrategy: Model {
234-
public let id: String
234+
let id: String
235235

236-
public enum CodingKeys: String, ModelKey {
236+
enum CodingKeys: String, ModelKey {
237237
case id
238238
}
239-
public static let keys = CodingKeys.self
239+
static let keys = CodingKeys.self
240240

241-
public static let schema = defineSchema { model in
241+
static let schema = defineSchema { model in
242242
model.authRules = [
243243
rule(allow: .public, provider: .iam, operations: [.create, .read, .update, .delete]),
244244
rule(allow: .custom, provider: .function, operations: [.create, .read, .update, .delete]),

AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginAuthCognitoTests/AWSDataStoreCategoryPluginAuthIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extension AWSDataStoreCategoryPluginAuthIntegrationTests {
8585
private struct ModelsRegistration: AmplifyModelRegistration {
8686
var version: String = "version"
8787

88-
public func registerModels(registry: ModelRegistry.Type) {
88+
func registerModels(registry: ModelRegistry.Type) {
8989
ModelRegistry.register(modelType: TodoExplicitOwnerField.self)
9090
ModelRegistry.register(modelType: TodoImplicitOwnerField.self)
9191
}

AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginCPKTests/PrimaryKey/16/AWSDataStoreAWSURLSortKeyTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
2323
ModelRegistry.register(modelType: Post16.self)
2424
}
2525

26-
public let version: String = "test"
26+
let version: String = "test"
2727
}
2828

2929

AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginCPKTests/PrimaryKey/17/AWSDataStoreAWSEmailSortKeyTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
2323
ModelRegistry.register(modelType: Post17.self)
2424
}
2525

26-
public let version: String = "test"
26+
let version: String = "test"
2727
}
2828

2929

AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginCPKTests/PrimaryKey/18/AWSDataStoreAWSPhoneSortKeyTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
2323
ModelRegistry.register(modelType: Post18.self)
2424
}
2525

26-
public let version: String = "test"
26+
let version: String = "test"
2727
}
2828

2929

AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginCPKTests/PrimaryKey/19/AWSDataStoreAWSIPAddressSortKeyTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
2323
ModelRegistry.register(modelType: Post19.self)
2424
}
2525

26-
public let version: String = "test"
26+
let version: String = "test"
2727
}
2828

2929

AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginCPKTests/PrimaryKey/20/AWSDataStoreAWSTimestampSortKeyTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
2323
ModelRegistry.register(modelType: Post20.self)
2424
}
2525

26-
public let version: String = "test"
26+
let version: String = "test"
2727
}
2828

2929

AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginCPKTests/PrimaryKey/9/AWSDataStoreCompositeSortKeyIdentifierTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ private struct TestModels: AmplifyModelRegistration {
2121
ModelRegistry.register(modelType: Comment9.self)
2222
}
2323

24-
public let version: String = "test"
24+
let version: String = "test"
2525
}
2626

2727
class AWSDataStoreCompositeSortKeyIdentifierTest: XCTestCase {

0 commit comments

Comments
 (0)