Skip to content

Commit a9707bb

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

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
@@ -54,11 +54,14 @@ let package = Package(
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: () // not applicable
64+
@unknown default: () // we don't know what to do here, do nothing
6265
}
6366
}
6467
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)