Skip to content
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

phpstan.neon, but no phpstan executable chokes flyspell #24

Open
xendk opened this issue Jan 15, 2020 · 0 comments
Open

phpstan.neon, but no phpstan executable chokes flyspell #24

xendk opened this issue Jan 15, 2020 · 0 comments

Comments

@xendk
Copy link

xendk commented Jan 15, 2020

Seems that if flycheck-phpstan finds a config file, but can't find a phpstan executable, it manages to error in a way that makes flycheck toss its cookies and never show any new errors for the buffer.

I install phpstan in vendor/bin and don't have any global install, which works fine. But in a project where there's a phpstan.neon, but phpstan haven't been installed, flycheck dies after the first check, and then seems to be in a permanent running state (at least according to doom-modeline).

Disabling the phpstan checker makes thing work when opening new buffers.

Running flycheck-compile and selecting the phpstan checker gives a "PHPStan executable not found" error, which I've traced to phpstan-get-executable.

I'm a bit surprised that flycheck apparently keels over because of the error thrown, I would have thought it would ignore the checker and carry on, but apparently not. On the other hand, it does force checker writers to handle errors and not rely on flycheck picking up the pieces.

I would think a possible solution would be having flycheck-phpstan--enabled-and-set-variable check if the executable could be found and return nil in case of error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant