Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48ebc15

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

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
@@ -84,11 +84,16 @@ let package = Package(
8484

8585
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
8686
for target in package.targets {
87-
if target.type != .plugin {
87+
switch target.type {
88+
case .regular, .test, .executable:
8889
var settings = target.swiftSettings ?? []
8990
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
9091
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
9192
target.swiftSettings = settings
93+
case .macro, .plugin, .system, .binary:
94+
() // not applicable
95+
@unknown default:
96+
() // we don't know what to do here, do nothing
9297
}
9398
}
9499
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)