-
Notifications
You must be signed in to change notification settings - Fork 428
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
use forward slashes in TableFormatter
to make paths clickable
#1017
Conversation
src/File/FileHelper.php
Outdated
@@ -49,6 +49,10 @@ public function absolutizePath(string $path): string | |||
return rtrim($this->getWorkingDirectory(), '/\\') . DIRECTORY_SEPARATOR . ltrim($path, '/\\'); | |||
} | |||
|
|||
public function forwardSlashes(string $originalPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be tagged @api
just submitted the suggested fix of @paranoiq .. In case you would accept this patch, I can add test-coverage. |
ae66224
to
371583d
Compare
928b6ec
to
1d50d38
Compare
1d50d38
to
d039e3b
Compare
It feels really weird to me to make forward slashes for Windows users. Can you please check that configuring |
ddd20b4
to
95d480b
Compare
Please test the latest release on Windows and see if |
"It feels really weird to me to make forward slashes for Windows users." - and who are those Windows users exactly? these is no sole Windows user working alone in the woods with Windows only configuration. we usually work in teams with more than one OS involved on dev machines. CI is usually running on Linux. tools are already configured with paths with forward slashes to make them work on Linux/Mac machines as well as Windows, which has no problem with forward slashes. in the end on Windows resulting full paths in PHPStan output are then composed by both forward and back slashes this falls in the same category as line ending conversions in git. in the beginning there was a good intent of protecting Windows users with inferior text editors, after years it is just pain in the butt for almost every new Windows user |
closes phpstan/phpstan#6483
using forward slashes in e.g. Git Bash for windows to make the links clickable.
I tested it on gitbash for windows. with this patch I can hold CTRL key and click file-paths - even without configuring
editorUrl
.