From cb3ef81535536cd89a0759890640c1ba5c60c2e9 Mon Sep 17 00:00:00 2001 From: dadachi Date: Wed, 1 Apr 2026 09:22:23 +0900 Subject: [PATCH] Add explicit Sendable conformance to model structs Add Sendable to model structs used as Request.Response types (Shop, ItemTag, PermissionsResponse). Disable SwiftFormat redundantSendable rule to prevent stripping these conformances. Update CLAUDE.md with lint/test workflow guidance. Co-Authored-By: Claude Opus 4.6 (1M context) --- .swiftformat | 2 +- CLAUDE.md | 2 +- NativeAppTemplate/Models/ItemTag.swift | 2 +- NativeAppTemplate/Models/Shop.swift | 2 +- NativeAppTemplate/Networking/Requests/PermissionsRequest.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.swiftformat b/.swiftformat index dbe29d0..3e4b9df 100644 --- a/.swiftformat +++ b/.swiftformat @@ -43,4 +43,4 @@ --xcodeindentation disabled # Disabled rules to avoid conflicts with SwiftLint ---disable wrapMultilineStatementBraces +--disable wrapMultilineStatementBraces,redundantSendable diff --git a/CLAUDE.md b/CLAUDE.md index 5d98dd0..ecb39c1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -43,7 +43,7 @@ swiftlint --strict ``` ### Linting and Formatting -Always run `make lint` before pushing to verify SwiftLint and SwiftFormat checks pass (matches CI). Use `make format` to auto-fix SwiftFormat issues. +Always run `make lint` before pushing to verify SwiftLint and SwiftFormat checks pass. Use `make format` to auto-fix SwiftFormat issues. After lint passes, ask the user to verify tests in Xcode (Cmd+U) before pushing. ### Formatting ```bash diff --git a/NativeAppTemplate/Models/ItemTag.swift b/NativeAppTemplate/Models/ItemTag.swift index 1e197c2..8a9895e 100644 --- a/NativeAppTemplate/Models/ItemTag.swift +++ b/NativeAppTemplate/Models/ItemTag.swift @@ -5,7 +5,7 @@ import Foundation -struct ItemTag: Codable, Hashable, Identifiable { +struct ItemTag: Codable, Hashable, Identifiable, Sendable { var id: String = "" var shopId: String = "" var queueNumber: String = "" diff --git a/NativeAppTemplate/Models/Shop.swift b/NativeAppTemplate/Models/Shop.swift index d5d0df0..b6b4463 100644 --- a/NativeAppTemplate/Models/Shop.swift +++ b/NativeAppTemplate/Models/Shop.swift @@ -5,7 +5,7 @@ import Foundation -struct Shop: Codable, Identifiable { +struct Shop: Codable, Identifiable, Sendable { var id: String var name: String var description: String diff --git a/NativeAppTemplate/Networking/Requests/PermissionsRequest.swift b/NativeAppTemplate/Networking/Requests/PermissionsRequest.swift index b4a4f69..ab88d66 100644 --- a/NativeAppTemplate/Networking/Requests/PermissionsRequest.swift +++ b/NativeAppTemplate/Networking/Requests/PermissionsRequest.swift @@ -6,7 +6,7 @@ import struct Foundation.Data import SwiftyJSON -struct PermissionsResponse { +struct PermissionsResponse: Sendable { var iosAppVersion: Int var shouldUpdatePrivacy: Bool var shouldUpdateTerms: Bool