diff --git a/Coder-Desktop/.swiftformat b/Coder-Desktop/.swiftformat index b34aa3f..388c4a6 100644 --- a/Coder-Desktop/.swiftformat +++ b/Coder-Desktop/.swiftformat @@ -1,3 +1,4 @@ --selfrequired log,info,error,debug,critical,fault --exclude **.pb.swift,**.grpc.swift ---condassignment always \ No newline at end of file +--condassignment always +--disable unusedArguments \ No newline at end of file diff --git a/Coder-Desktop/.swiftlint.yml b/Coder-Desktop/.swiftlint.yml index 1c2e5c4..1cf2d05 100644 --- a/Coder-Desktop/.swiftlint.yml +++ b/Coder-Desktop/.swiftlint.yml @@ -3,6 +3,8 @@ disabled_rules: - trailing_comma - blanket_disable_command # Used by Protobuf - opening_brace # Handled by SwiftFormat +opt_in_rules: + - unused_parameter type_name: allowed_symbols: "_" identifier_name: diff --git a/Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncConfig.swift b/Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncConfig.swift index 302bd13..c075056 100644 --- a/Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncConfig.swift +++ b/Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncConfig.swift @@ -165,11 +165,11 @@ struct FileSyncConfig: View { } // TODO: Support selecting & deleting multiple sessions at once - func delete(session _: FileSyncSession) async { + func delete(session: FileSyncSession) async { loading = true defer { loading = false } do throws(DaemonError) { - try await fileSync.deleteSessions(ids: [selection!]) + try await fileSync.deleteSessions(ids: [session.id]) } catch { actionError = error }