You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix tests when building swift-format using Swift 6.0.2
When traversing the file URL with Foundation from Swift 6.0.2, you get the following components
- `["/", "C:", "test.swift"]`
- `["/", "C:"]`
- `[]`
The component count never reaches 1.
Foundation from Swift 6.1 goes
- `["/", "C:", "test.swift"]`
- `["/", "C:"]`
- `["/"]`
Cover both cases by checking for `<= 1` instead of `== 1`
Copy file name to clipboardExpand all lines: Sources/SwiftFormat/API/Configuration.swift
+1-1
Original file line number
Diff line number
Diff line change
@@ -478,7 +478,7 @@ fileprivate extension URL {
478
478
#if os(Windows)
479
479
// FIXME: We should call into Windows' native check to check if this path is a root once https://github.com/swiftlang/swift-foundation/issues/976 is fixed.
0 commit comments