-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConsoleReport: Add hyperlinks to open file in editor #6850
Conversation
Are there any provisions for mapped folders? E.g. Psalm running in a docker container sees files at |
Hmm, do you have an idea how to solve this? |
Thinking out loud here. This can be handled either by Psalm itself emitting host paths or terminal emulator converting paths in links to their host counterparts. The latter is outside of our control and I have doubts of its universal support anytime soon. This leaves us with the need to implement it ourselves. The mapping is both machine and project specific: Alice may have her projects in
Neither of the options require any additional development as they are already available. As for the configuration format, I envision something like this: <psalm>
<directoryMapping>
<directory from="<absolute prefix>" to="<absolute prefix"/>
</directoryMapping>
</psalm> With that said, it can totally be a separate feature we may add later. |
Thanks! |
ConsoleReport
adds hyperlinks to the file paths to open them in editor. It uses the file format fromxdebug.file_link_format
(you do not need xdebug extension for this) and falls back to genericfile://...
link.Terminals not supporting hyperlinks should ignore these escape sequences, see https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#backward-compatibility:
psalm output (hover over one link, you can see the target at the bottom):
taint analysis:
This fixes #5798