Skip to content

Commit 92fdcd3

Browse files
committed
Remove the "name" label
1 parent b1c9982 commit 92fdcd3

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

Sources/PackageDescription/BuildSettings.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public struct CSetting: Sendable {
242242
/// - condition: A condition that restricts the application of the build setting.
243243
@available(_PackageDescription, introduced: 6.2)
244244
public static func treatWarning(
245-
name: String,
245+
_ name: String,
246246
as level: WarningLevel,
247247
_ condition: BuildSettingCondition? = nil
248248
) -> CSetting {
@@ -262,7 +262,7 @@ public struct CSetting: Sendable {
262262
/// - condition: A condition that restricts the application of the build setting.
263263
@available(_PackageDescription, introduced: 6.2)
264264
public static func enableWarning(
265-
name: String,
265+
_ name: String,
266266
_ condition: BuildSettingCondition? = nil
267267
) -> CSetting {
268268
return CSetting(
@@ -281,7 +281,7 @@ public struct CSetting: Sendable {
281281
/// - condition: A condition that restricts the application of the build setting.
282282
@available(_PackageDescription, introduced: 6.2)
283283
public static func disableWarning(
284-
name: String,
284+
_ name: String,
285285
_ condition: BuildSettingCondition? = nil
286286
) -> CSetting {
287287
return CSetting(
@@ -398,7 +398,7 @@ public struct CXXSetting: Sendable {
398398
/// - condition: A condition that restricts the application of the build setting.
399399
@available(_PackageDescription, introduced: 6.2)
400400
public static func treatWarning(
401-
name: String,
401+
_ name: String,
402402
as level: WarningLevel,
403403
_ condition: BuildSettingCondition? = nil
404404
) -> CXXSetting {
@@ -418,7 +418,7 @@ public struct CXXSetting: Sendable {
418418
/// - condition: A condition that restricts the application of the build setting.
419419
@available(_PackageDescription, introduced: 6.2)
420420
public static func enableWarning(
421-
name: String,
421+
_ name: String,
422422
_ condition: BuildSettingCondition? = nil
423423
) -> CXXSetting {
424424
return CXXSetting(
@@ -437,7 +437,7 @@ public struct CXXSetting: Sendable {
437437
/// - condition: A condition that restricts the application of the build setting.
438438
@available(_PackageDescription, introduced: 6.2)
439439
public static func disableWarning(
440-
name: String,
440+
_ name: String,
441441
_ condition: BuildSettingCondition? = nil
442442
) -> CXXSetting {
443443
return CXXSetting(
@@ -675,7 +675,7 @@ public struct SwiftSetting: Sendable {
675675
/// - condition: A condition that restricts the application of the build setting.
676676
@available(_PackageDescription, introduced: 6.2)
677677
public static func treatWarning(
678-
name: String,
678+
_ name: String,
679679
as level: WarningLevel,
680680
_ condition: BuildSettingCondition? = nil
681681
) -> SwiftSetting {

Tests/PackageLoadingTests/PD_6_2_LoadingTests.swift

+14-14
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,39 @@ final class PackageDescription6_2LoadingTests: PackageDescriptionLoadingTests {
3131
.target(
3232
name: "Foo",
3333
cSettings: [
34-
.enableWarning(name: "implicit-fallthrough"),
35-
.disableWarning(name: "unused-parameter"),
34+
.enableWarning("implicit-fallthrough"),
35+
.disableWarning("unused-parameter"),
3636
.treatAllWarnings(as: .error),
37-
.treatWarning(name: "deprecated-declarations", as: .warning),
37+
.treatWarning("deprecated-declarations", as: .warning),
3838
],
3939
cxxSettings: [
40-
.enableWarning(name: "implicit-fallthrough"),
41-
.disableWarning(name: "unused-parameter"),
40+
.enableWarning("implicit-fallthrough"),
41+
.disableWarning("unused-parameter"),
4242
.treatAllWarnings(as: .warning),
43-
.treatWarning(name: "deprecated-declarations", as: .error),
43+
.treatWarning("deprecated-declarations", as: .error),
4444
],
4545
swiftSettings: [
4646
.treatAllWarnings(as: .error),
47-
.treatWarning(name: "DeprecatedDeclaration", as: .warning),
47+
.treatWarning("DeprecatedDeclaration", as: .warning),
4848
]
4949
),
5050
.target(
5151
name: "Bar",
5252
cSettings: [
53-
.enableWarning(name: "implicit-fallthrough"),
54-
.disableWarning(name: "unused-parameter"),
53+
.enableWarning("implicit-fallthrough"),
54+
.disableWarning("unused-parameter"),
5555
.treatAllWarnings(as: .warning),
56-
.treatWarning(name: "deprecated-declarations", as: .error),
56+
.treatWarning("deprecated-declarations", as: .error),
5757
],
5858
cxxSettings: [
59-
.enableWarning(name: "implicit-fallthrough"),
60-
.disableWarning(name: "unused-parameter"),
59+
.enableWarning("implicit-fallthrough"),
60+
.disableWarning("unused-parameter"),
6161
.treatAllWarnings(as: .error),
62-
.treatWarning(name: "deprecated-declarations", as: .warning),
62+
.treatWarning("deprecated-declarations", as: .warning),
6363
],
6464
swiftSettings: [
6565
.treatAllWarnings(as: .warning),
66-
.treatWarning(name: "DeprecatedDeclaration", as: .error),
66+
.treatWarning("DeprecatedDeclaration", as: .error),
6767
]
6868
)
6969
]

0 commit comments

Comments
 (0)