Skip to content

Commit 3fac726

Browse files
committed
silence swiftlint line_length for some sql strings
1 parent bc63d3a commit 3fac726

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/SQLiteTests/QueryTests.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,15 @@ class QueryTests: XCTestCase {
300300
let insert = try emails.insert(value)
301301
let encodedJSON = try JSONEncoder().encode(value1)
302302
let encodedJSONString = String(data: encodedJSON, encoding: .utf8)!
303+
// swiftlint:disable line_length
303304
assertSQL(
304305
"""
305306
INSERT INTO \"emails\" (\"int\", \"string\", \"bool\", \"float\", \"double\", \"date\", \"uuid\", \"optional\",
306307
\"sub\") VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000', 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F', 'optional', '\(encodedJSONString)')
307308
""".replacingOccurrences(of: "\n", with: ""),
308309
insert
309310
)
311+
// swiftlint:enable line_length
310312
}
311313
#endif
312314

@@ -352,6 +354,7 @@ class QueryTests: XCTestCase {
352354
let value = TestCodable(int: 1, string: "2", bool: true, float: 3, double: 4,
353355
date: Date(timeIntervalSince1970: 0), uuid: testUUIDValue, optional: nil, sub: nil)
354356
let insert = try emails.upsert(value, onConflictOf: string)
357+
// swiftlint:disable line_length
355358
assertSQL(
356359
"""
357360
INSERT INTO \"emails\" (\"int\", \"string\", \"bool\", \"float\", \"double\", \"date\", \"uuid\")
@@ -361,6 +364,7 @@ class QueryTests: XCTestCase {
361364
""".replacingOccurrences(of: "\n", with: ""),
362365
insert
363366
)
367+
// swiftlint:enable line_length
364368
}
365369

366370
func test_insert_many_encodable() throws {
@@ -372,6 +376,7 @@ class QueryTests: XCTestCase {
372376
let value3 = TestCodable(int: 3, string: "4", bool: true, float: 3, double: 6,
373377
date: Date(timeIntervalSince1970: 0), uuid: testUUIDValue, optional: nil, sub: nil)
374378
let insert = try emails.insertMany([value1, value2, value3])
379+
// swiftlint:disable line_length
375380
assertSQL(
376381
"""
377382
INSERT INTO \"emails\" (\"int\", \"string\", \"bool\", \"float\", \"double\", \"date\", \"uuid\")
@@ -380,6 +385,7 @@ class QueryTests: XCTestCase {
380385
""".replacingOccurrences(of: "\n", with: ""),
381386
insert
382387
)
388+
// swiftlint:enable line_length
383389
}
384390

385391
func test_update_compilesUpdateExpression() {

0 commit comments

Comments
 (0)