Skip to content

Commit 6e1b407

Browse files
authored
Merge pull request #934 from TTOzzi/fix-pretty-printer-diagnose-location
Modify PrettyPrinter to output diagnostics using shortened relative paths
2 parents ed9d716 + 8890b69 commit 6e1b407

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftFormat/PrettyPrint/PrettyPrint.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ public class PrettyPrinter {
819819
context.findingEmitter.emit(
820820
message,
821821
category: category,
822-
location: Finding.Location(file: context.fileURL.path, line: outputBuffer.lineNumber, column: column)
822+
location: Finding.Location(file: context.fileURL.relativePath, line: outputBuffer.lineNumber, column: column)
823823
)
824824
}
825825
}

0 commit comments

Comments
 (0)