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 {
816
816
private func diagnose( _ message: Finding . Message , category: PrettyPrintFindingCategory ) {
817
817
// Add 1 since columns uses 1-based indices.
818
818
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)
819
822
context. findingEmitter. emit (
820
823
message,
821
824
category: category,
822
- location: Finding . Location ( file : context . fileURL . path , line : outputBuffer . lineNumber , column : column )
825
+ location: Finding . Location ( sourceLocation )
823
826
)
824
827
}
825
828
}
You can’t perform that action at this time.
0 commit comments