Skip to content

Commit 327cfd8

Browse files
authored
Merge pull request #233 from owenv/prefix-arrgs
Reword *-prefix-map diagnostic messages
2 parents 7a44156 + 96cfc2c commit 327cfd8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sources/SwiftDriver/Utilities/Diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extension Diagnostic.Message {
2525
}
2626

2727
static func error_opt_invalid_mapping(option: Option, value: String) -> Diagnostic.Message {
28-
.error("values for '\(option.spelling)' must be in the format original=remapped not '\(value)'")
28+
.error("values for '\(option.spelling)' must be in the format 'original=remapped', but '\(value)' was provided")
2929
}
3030

3131
static func error_invalid_arg_value(arg: Option, value: String) -> Diagnostic.Message {

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ final class SwiftDriverTests: XCTestCase {
333333
}
334334

335335
try assertDriverDiagnostics(args: "swiftc", "foo.swift", "-debug-prefix-map", "foo", "-debug-prefix-map", "bar") {
336-
$1.expect(.error("values for '-debug-prefix-map' must be in the format original=remapped not 'foo'"))
337-
$1.expect(.error("values for '-debug-prefix-map' must be in the format original=remapped not 'bar'"))
336+
$1.expect(.error("values for '-debug-prefix-map' must be in the format 'original=remapped', but 'foo' was provided"))
337+
$1.expect(.error("values for '-debug-prefix-map' must be in the format 'original=remapped', but 'bar' was provided"))
338338
}
339339

340340
try assertNoDriverDiagnostics(args: "swiftc", "foo.swift", "-emit-module", "-g", "-debug-info-format=codeview") { driver in
@@ -365,8 +365,8 @@ final class SwiftDriverTests: XCTestCase {
365365
}
366366

367367
try assertDriverDiagnostics(args: "swiftc", "foo.swift", "-coverage-prefix-map", "foo", "-coverage-prefix-map", "bar") {
368-
$1.expect(.error("values for '-coverage-prefix-map' must be in the format original=remapped not 'foo'"))
369-
$1.expect(.error("values for '-coverage-prefix-map' must be in the format original=remapped not 'bar'"))
368+
$1.expect(.error("values for '-coverage-prefix-map' must be in the format 'original=remapped', but 'foo' was provided"))
369+
$1.expect(.error("values for '-coverage-prefix-map' must be in the format 'original=remapped', but 'bar' was provided"))
370370
}
371371
}
372372

0 commit comments

Comments
 (0)