diff --git a/GRDB/Core/Statement.swift b/GRDB/Core/Statement.swift index b60c6a54c..7c6d8ec8f 100644 --- a/GRDB/Core/Statement.swift +++ b/GRDB/Core/Statement.swift @@ -48,8 +48,9 @@ public final class Statement { /// The column names, ordered from left to right. public lazy var columnNames: [String] = { + // swiftlint:disable:next redundant_self_in_closure let sqliteStatement = self.sqliteStatement - return (0.. { /// Returns a promise whose value is transformed by the given closure. func map(_ transform: @escaping (T) throws -> U) -> DatabasePromise { DatabasePromise { db in - try transform(self.resolve(db)) + try transform(resolve(db)) } } } diff --git a/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift b/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift index 5c39d13e3..17551514b 100644 --- a/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift +++ b/GRDB/QueryInterface/SQLGeneration/SQLQueryGenerator.swift @@ -566,8 +566,8 @@ private struct SQLQualifiedRelation { /// The full selection, including selection of joined relations var selectionPromise: DatabasePromise<[SQLSelection]> { DatabasePromise { db in - let selection = try self.sourceSelectionPromise.resolve(db) - return try self.joins.values.reduce(into: selection) { selection, join in + let selection = try sourceSelectionPromise.resolve(db) + return try joins.values.reduce(into: selection) { selection, join in let joinedSelection = try join.relation.selectionPromise.resolve(db) selection.append(contentsOf: joinedSelection) } diff --git a/Scripts/swiftlint.yml b/Scripts/swiftlint.yml index c933e32ea..af49e16e2 100644 --- a/Scripts/swiftlint.yml +++ b/Scripts/swiftlint.yml @@ -57,11 +57,13 @@ opt_in_rules: - pattern_matching_keywords - prohibited_super_call - reduce_into + - redundant_self_in_closure - redundant_type_annotation - shorthand_optional_binding - sorted_first_last - sorted_imports - toggle_bool + - unhandled_throwing_task - vertical_parameter_alignment_on_call - yoda_condition