Skip to content

Commit 81c309c

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Package.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,14 @@ let package = Package(
5353

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

0 commit comments

Comments
 (0)