Closed jrj7 closed 1 year ago
What happens when you run the PHPStan command outside the extension? Do you get the same error?
I'm guessing you didn't put any paths in the parameters.paths
section of your phpstan.neon
, could that be it?
Ah, it was my phpstan.neon
. I was unclear as to what the extension handled vs my own config file. Thanks!
Solution: Added path %currentWorkingDirectory%
as a parameter in my phpstan.neon
file.
When trying to scan the entire project I am getting a
At least one path must be specified to analyse
error in logs. The only two settings I have altered are definingphpstan.binPath
and adding--level max
tophpstan.options
. Using thescan current file for errors
command does work.Here is the log. I've omitted my paths below:
[server] Language server ready [check:1] Check started for Project [check:1] Spawning PHPStan with the following configuration: {"binCmd":"/path/to/phpstan/","args":["analyse","-c","/path/to/config","--error-format=raw","--no-interaction","--memory-limit=1G","--level max"]} [check:1] PHPStan process exited with error filteredErr=At least one path must be specified to analyse. rawErr=At least one path must be specified to analyse. data= [check:1] Check completed for Project errors= {}
I tried explicitly defining the project directory in
phpstan.rootDir
and it did not work. What did work is adding a.
tophpstan.options
but that of course breaks the individual file scanning.