Skip to content

Commit f1e55ad

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ package.dependencies += [.package(url: "https://github.com/apple/swift-nio", fro
6161

6262
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
6363
for target in package.targets {
64-
if target.type != .plugin {
64+
switch target.type {
65+
case .regular, .test, .executable:
6566
var settings = target.swiftSettings ?? []
6667
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
6768
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
6869
target.swiftSettings = settings
70+
case .macro, .plugin, .system, .binary: () // not applicable
71+
@unknown default: () // we don't know what to do here, do nothing
6972
}
7073
}
7174
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)