Skip to content

Commit 66ab3c5

Browse files
authored
Only apply standard swift settings on valid targets (#93)
Only apply standard swift settings on valid targets. The current check ignores plugins but that is not comprehensive enough.
1 parent 5d11d38 commit 66ab3c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Package.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@ for target in package.targets {
3939

4040
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
4141
for target in package.targets {
42-
if target.type != .plugin {
42+
switch target.type {
43+
case .regular, .test, .executable:
4344
var settings = target.swiftSettings ?? []
4445
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
4546
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
4647
target.swiftSettings = settings
48+
case .macro, .plugin, .system, .binary:
49+
() // not applicable
50+
@unknown default:
51+
() // we don't know what to do here, do nothing
4752
}
4853
}
4954
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)