Skip to content

Commit d269598

Browse files
authored
Only apply standard swift settings on valid targets (#45)
Only apply standard swift settings on valid targets. The current check ignores plugins but that is not comprehensive enough.
1 parent f48faf0 commit d269598

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

4848
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
4949
for target in package.targets {
50-
if target.type != .plugin {
50+
switch target.type {
51+
case .regular, .test, .executable:
5152
var settings = target.swiftSettings ?? []
5253
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
5354
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
5455
target.swiftSettings = settings
56+
case .macro, .plugin, .system, .binary:
57+
() // not applicable
58+
@unknown default:
59+
() // we don't know what to do here, do nothing
5560
}
5661
}
5762
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)