File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Sources/SwiftFormat/PrettyPrint Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -816,10 +816,13 @@ public class PrettyPrinter {
816816 private func diagnose( _ message: Finding . Message , category: PrettyPrintFindingCategory ) {
817817 // Add 1 since columns uses 1-based indices.
818818 let column = outputBuffer. column + 1
819+ let converter = context. sourceLocationConverter
820+ let absolutePosition = converter. position ( ofLine: outputBuffer. lineNumber, column: column)
821+ let sourceLocation = converter. location ( for: absolutePosition)
819822 context. findingEmitter. emit (
820823 message,
821824 category: category,
822- location: Finding . Location ( file : context . fileURL . path , line : outputBuffer . lineNumber , column : column )
825+ location: Finding . Location ( sourceLocation )
823826 )
824827 }
825828}
You can’t perform that action at this time.
0 commit comments