Skip to content

Commit 71572c3

Browse files
authored
Only apply standard swift settings on valid targets (#60)
Only apply standard swift settings on valid targets. The current check ignores plugins but that is not comprehensive enough.
1 parent 9904e91 commit 71572c3

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
@@ -54,11 +54,16 @@ for target in package.targets {
5454

5555
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
5656
for target in package.targets {
57-
if target.type != .plugin {
57+
switch target.type {
58+
case .regular, .test, .executable:
5859
var settings = target.swiftSettings ?? []
5960
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
6061
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
6162
target.swiftSettings = settings
63+
case .macro, .plugin, .system, .binary:
64+
() // not applicable
65+
@unknown default:
66+
() // we don't know what to do here, do nothing
6267
}
6368
}
6469
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)