As it turns out, the error was due to SwiftFormat taking the path as relative. You can see this here:
> swiftformat C:\Users\o_o\Desktop\projects\swift\test\Sources\main.swift
error: File not found at C:/Users/o_o/Desktop/projects/swift/test/Sources/C:/Users/o_o/Desktop/projects/swift/test/Sources/main.swift.
My solution was just to put a / in front of the path if on Windows. SwiftFormat takes it as absolute and it formats it fine.
This fixes #21 (again?).
As it turns out, the error was due to SwiftFormat taking the path as relative. You can see this here:
My solution was just to put a
/
in front of the path if on Windows. SwiftFormat takes it as absolute and it formats it fine.Tested on Windows 11.