Skip to content

Commit 810e16a

Browse files
committed
fix: warning found 2 file(s) which are unhandled
1 parent 9a45993 commit 810e16a

4 files changed

Lines changed: 34 additions & 21 deletions

File tree

Package.swift

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ let package = Package(
5454
.product(name: "LibPNG", package: "libpng"),
5555
.product(name: "Noora", package: "Noora"),
5656
],
57+
exclude: ["CLAUDE.md", "AGENTS.md"],
5758
resources: [
5859
.copy("Resources/Schemas/"),
5960
]
@@ -64,7 +65,8 @@ let package = Package(
6465
name: "ExFigCore",
6566
dependencies: [
6667
.product(name: "YYJSON", package: "swift-yyjson"),
67-
]
68+
],
69+
exclude: ["CLAUDE.md", "AGENTS.md"]
6870
),
6971

7072
// PKL configuration and shared config types
@@ -73,15 +75,17 @@ let package = Package(
7375
dependencies: [
7476
"ExFigCore",
7577
.product(name: "PklSwift", package: "pkl-swift"),
76-
]
78+
],
79+
exclude: ["CLAUDE.md", "AGENTS.md"]
7780
),
7881

7982
// Loads data via Figma REST API
8083
.target(
8184
name: "FigmaAPI",
8285
dependencies: [
8386
"ExFigCore",
84-
]
87+
],
88+
exclude: ["CLAUDE.md", "AGENTS.md"]
8589
),
8690

8791
// Exports resources to Xcode project
@@ -91,6 +95,7 @@ let package = Package(
9195
"ExFigCore", .product(name: "Stencil", package: "Stencil"),
9296
"StencilSwiftKit",
9397
],
98+
exclude: ["CLAUDE.md", "AGENTS.md"],
9499
resources: [
95100
.copy("Resources/"),
96101
]
@@ -102,7 +107,8 @@ let package = Package(
102107
dependencies: [
103108
.product(name: "Logging", package: "swift-log"),
104109
.product(name: "Resvg", package: "swift-resvg"),
105-
]
110+
],
111+
exclude: ["CLAUDE.md", "AGENTS.md"]
106112
),
107113

108114
// Exports resources to Android project
@@ -115,6 +121,7 @@ let package = Package(
115121
"StencilSwiftKit",
116122
.product(name: "OrderedCollections", package: "swift-collections"),
117123
],
124+
exclude: ["CLAUDE.md", "AGENTS.md"],
118125
resources: [
119126
.copy("Resources/"),
120127
]
@@ -124,6 +131,7 @@ let package = Package(
124131
.target(
125132
name: "FlutterExport",
126133
dependencies: ["ExFigCore", "Stencil", "StencilSwiftKit"],
134+
exclude: ["CLAUDE.md", "AGENTS.md"],
127135
resources: [
128136
.copy("Resources/"),
129137
]
@@ -133,6 +141,7 @@ let package = Package(
133141
.target(
134142
name: "WebExport",
135143
dependencies: ["ExFigCore", "Stencil", "StencilSwiftKit"],
144+
exclude: ["CLAUDE.md", "AGENTS.md"],
136145
resources: [
137146
.copy("Resources/"),
138147
]
@@ -147,7 +156,8 @@ let package = Package(
147156
"ExFigCore",
148157
"ExFigConfig",
149158
"XcodeExport",
150-
]
159+
],
160+
exclude: ["CLAUDE.md", "AGENTS.md"]
151161
),
152162

153163
// Android platform plugin
@@ -158,7 +168,8 @@ let package = Package(
158168
"ExFigConfig",
159169
"AndroidExport",
160170
"SVGKit",
161-
]
171+
],
172+
exclude: ["CLAUDE.md", "AGENTS.md"]
162173
),
163174

164175
// Flutter platform plugin
@@ -168,7 +179,8 @@ let package = Package(
168179
"ExFigCore",
169180
"ExFigConfig",
170181
"FlutterExport",
171-
]
182+
],
183+
exclude: ["CLAUDE.md", "AGENTS.md"]
172184
),
173185

174186
// Web platform plugin
@@ -178,7 +190,8 @@ let package = Package(
178190
"ExFigCore",
179191
"ExFigConfig",
180192
"WebExport",
181-
]
193+
],
194+
exclude: ["CLAUDE.md", "AGENTS.md"]
182195
),
183196

184197
// MARK: - Tests

Sources/ExFigCLI/Plugin/PluginRegistry.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import ExFig_iOS
44
import ExFig_Web
55
import ExFigCore
66

7+
// NOTE: Currently the registry is not used for dynamic dispatch.
8+
// Export commands route to platforms via hardcoded if-let chains in ExportColors/Icons/Images/Typography.
9+
// The registry is retained for future extensibility (e.g., third-party plugins, dynamic platform discovery).
10+
711
/// Registry that manages platform plugins and routes config keys to the appropriate plugin.
812
///
913
/// The registry is the central coordination point for the plugin system. It:

Sources/ExFigCLI/Subcommands/ExportColors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ extension ExFigCommand {
9898

9999
var totalCount = 0
100100

101-
// Export colors via plugin architecture
101+
// Platform routing: hardcoded dispatch (PluginRegistry is available but not used for dispatch yet)
102102
if let ios = options.params.ios, let colors = ios.colors {
103103
totalCount += try await exportiOSColorsViaPlugin(
104104
entries: colors, ios: ios, client: client, ui: ui

Sources/ExFigCore/Protocol/AssetExporter.swift

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,18 @@ import Foundation
1111
///
1212
/// ## Conformance
1313
///
14-
/// Conforming types are typically actors to ensure thread-safe state management:
14+
/// Conforming types are typically structs marked as Sendable:
1515
///
1616
/// ```swift
17-
/// actor iOSColorsExporter: AssetExporter {
17+
/// struct iOSColorsExporter: ColorsExporter {
1818
/// let assetType: AssetType = .colors
1919
///
20-
/// func load() async throws -> [Color] {
21-
/// // Fetch colors from Figma Variables API
22-
/// }
23-
///
24-
/// func process(_ data: [Color]) async throws -> [ProcessedColor] {
25-
/// // Transform to iOS color format
26-
/// }
27-
///
28-
/// func export(_ data: [ProcessedColor]) async throws -> ExportResult {
29-
/// // Write xcassets and Swift extensions
20+
/// func exportColors(
21+
/// entries: [iOSColorsEntry],
22+
/// platformConfig: iOS.PlatformImpl,
23+
/// context: ColorsExportContext
24+
/// ) async throws -> ColorsExportResult {
25+
/// // Load via context, process, write files
3026
/// }
3127
/// }
3228
/// ```

0 commit comments

Comments
 (0)