SanderRonde / phpstan-vscode

PHPStan plugin for VSCode
https://marketplace.visualstudio.com/items?itemName=SanderRonde.phpstan-vscode
MIT License
37 stars 7 forks source link

Error when phpstan.configFile is empty #62

Closed MrMeshok closed 4 months ago

MrMeshok commented 4 months ago

In the description, it states "Path to the config file (leave empty to disable, use a comma-separated list to resolve in order)". But when I set it to an empty string in the output, I see

[check:8] Check started for project
[status-bar] Showing status bar
[status-bar] Hiding status bar, last operation result = Error
[check:8] Check completed for project, errors= {"fileSpecificErrors":{},"notFileSpecificErrors":[]}

I use version 3.0.3 with docker

SanderRonde commented 4 months ago

Ah yeah not sure why I put that there, running without a config file is not really possible I think. I'll update the description. Or is there any other behavior you'd expect?

MrMeshok commented 4 months ago

I kinda expected default resolution priority, so not including -c option in command. For now, I just set my configFile to phpstan.neon,phpstan.neon.dist,phpstan.dist.neon

SanderRonde commented 4 months ago

Hmm when using an empty string it'll just use the empty string, when not changing the setting at all it'll use the default of phpstan.neon. I agree though that the resolution priority you linked is a more sensible default so I'll update it to that.

MrMeshok commented 4 months ago

If you omit -c option altogether phpstan will resolve it. But it does write in output

Note: Using configuration file /var/www/html/phpstan.neon.

Maybe this mess up your parsing of output

SanderRonde commented 3 months ago

It shouldn't affect the parsing of output, but good to know