Skip to content

Commit 5a734c8

Browse files
committed
Switch to a consistent vertical pipe character for nested diagnostics
1 parent 344158c commit 5a734c8

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Sources/SwiftDiagnostics/GroupedDiagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ extension GroupedDiagnostics {
151151
let childSource = annotateSource(
152152
childBufferID,
153153
formatter: formatter,
154-
indentString: indentString + String(repeating: " ", count: childPadding) + "|"
154+
indentString: indentString + String(repeating: " ", count: childPadding) + ""
155155
)
156156

157157
return (sourceFiles[childBufferID.id].parent!.1, childSource)

Tests/SwiftDiagnosticsTest/GroupDiagnosticsFormatterTests.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ final class GroupedDiagnosticsFormatterTests: XCTestCase {
116116
2 │ #myAssert(pi == 3)
117117
∣ ╰─ in expansion of macro 'myAssert' here
118118
╭-── #myAssert────────────────────────────────────────────────────────
119-
|1 │ let __a = pi
120-
|2 │ let __b = 3
121-
|3 │ if !(__a == __b) {
122-
| ∣ ╰─ no matching operator '==' for types 'Double' and 'Int'
123-
|4 │ fatalError("assertion failed: pi != 3")
124-
|5 │ }
119+
1 │ let __a = pi
120+
2 │ let __b = 3
121+
3 │ if !(__a == __b) {
122+
∣ ╰─ no matching operator '==' for types 'Double' and 'Int'
123+
4 │ fatalError("assertion failed: pi != 3")
124+
5 │ }
125125
╰-────────────────────────────────────────────────────────────────────
126126
3 │ print("hello"
127127
∣ ╰─ expected ')' to end function call
@@ -185,16 +185,16 @@ final class GroupedDiagnosticsFormatterTests: XCTestCase {
185185
2 │ #myAssert(pi == 3)
186186
∣ ╰─ in expansion of macro 'myAssert' here
187187
╭-── #myAssert────────────────────────────────────────────────────────
188-
|1 │ let __a = pi
189-
|2 │ let __b = 3
190-
|3 │ if #invertedEqualityCheck(__a, __b) {
191-
| ∣ ╰─ in expansion of macro 'invertedEqualityCheck' here
192-
| ╭-── #invertedEqualityCheck────────────────────────────────────────
193-
| |1 │ !(__a == __b)
194-
| | ∣ ╰─ no matching operator '==' for types 'Double' and 'Int'
195-
| ╰-─────────────────────────────────────────────────────────────────
196-
|4 │ fatalError("assertion failed: pi != 3")
197-
|5 │ }
188+
1 │ let __a = pi
189+
2 │ let __b = 3
190+
3 │ if #invertedEqualityCheck(__a, __b) {
191+
∣ ╰─ in expansion of macro 'invertedEqualityCheck' here
192+
╭-── #invertedEqualityCheck────────────────────────────────────────
193+
│ │1 │ !(__a == __b)
194+
│ │ ∣ ╰─ no matching operator '==' for types 'Double' and 'Int'
195+
╰-─────────────────────────────────────────────────────────────────
196+
4 │ fatalError("assertion failed: pi != 3")
197+
5 │ }
198198
╰-────────────────────────────────────────────────────────────────────
199199
3 │ print("hello"
200200
∣ ╰─ expected ')' to end function call

0 commit comments

Comments
 (0)