Closed yonailo closed 4 months ago
Does it work if you use a relative path? So just ". /"?
No it does not seem to work:
client] Starting extension with configuration: {
"binPath": "vendor/bin/phpstan",
"binCommand": [
"/usr/local/bin/lando_phpstan"
],
"configFile": "phpstan.neon",
"rootDir": "",
"options": [],
"enableStatusBar": true,
"memoryLimit": "1G",
"enabled": true,
"timeout": 10000,
"projectTimeout": 60000,
"suppressTimeoutMessage": false,
"paths": {
"./": "/app/"
},
"showProgress": false,
"enableLanguageServer": false,
"ignoreErrors": [],
"suppressWorkspaceMessage": false
}
[client] Initializing done
[server] Language server ready
[server] Language server started
[file-watcher] Document active, checking
[check:1] Check started for file:///home/juan/Projects/xxx/web/modules/custom/xxx/xxx.module
[status-bar] Showing status bar
[check:1] Spawning PHPStan with the following configuration: {"binCmd":"/usr/local/bin/lando_phpstan","args":["analyse","-c","/home/juan/Projects/xxx/phpstan.neon","--error-format=raw","--no-interaction","--memory-limit=1G","--no-progress","/home/juan/Projects/xxx/web/modules/custom/xxx/xxx.module"]}
[server] PHPStan version: PHPStan - PHP Static Analysis Tool 1.10.58
[check:1] PHPStan process exited succesfully
[status-bar] Hiding status bar, last operation result = Success
[check:1] Check completed for file:///home/juan/Projects/xxx/web/modules/custom/xxx/xxx.module errors= {"file:///home/juan/Projects/xxx/web/modules/custom/xxxx/xxx.module":[]}
Should be fixed on master. I'll let you know when I'm releasing a new version so you can give it a test :)
@SanderRonde I just encountered this issue. AFAICT ${workspaceFolder}
does not work but specifying the absolute path does.
Are you sure? Could it maybe be the case that the workspaceFolder is not the same as the absolute path? When I test this it does seem to work
@SanderRonde I was using workspaceRoot
out of old habits. workspaceFolder
worked!
Hello,
I am trying to use phpstan extension through lando, this is my configuration:
But the $workspaceFolder seems to not work, as I see in the debug output :
On the other hand, if I replace ${workspaceFolder} by the real fullpath, everything works as expected.
Can you help me ? Thank you in advance.