Skip to content

Commit

Permalink
output-format: add info about editorUrlTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Dec 16, 2022
1 parent 15377d9 commit c0086d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/src/user-guide/output-format.md
Expand Up @@ -63,4 +63,15 @@ To make the text really clickable in your terminal you might need to register th

If you run PHPStan analysis within Docker container (or using other virtualization tools) you may need to use `%relFile%` instead of `%file%`. This will use file's path relative to the current working directory. In the end your `editorUrl` should look like this: `phpstorm://open?file=/path/to/your/project/%%relFile%%&line=%%line%%`.


<div class="text-xs inline-block border border-green-600 text-green-600 bg-green-100 rounded px-1 mb-4">Available in PHPStan 1.9.3</div>

You may also want to change the default title of the clickable link to contain line to be able to quickly copy-paste it to your IDE when used within an environment that is not clickable (like CI output). Here is how:
```neon
parameters:
editorUrlTitle: '%%relFile%%:%%line%%'
```

--------------------

Since every team member working on the same project will likely have different absolute path to the project, machine-specific `editorUrl` should be used in `phpstan.neon` [paired with `phpstan.neon.dist` where all the common project settings live](/config-reference#multiple-files).

0 comments on commit c0086d9

Please sign in to comment.