Skip to content

Commit cbd39ce

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

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Package.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ for target in package.targets {
4949

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

0 commit comments

Comments
 (0)