emacs-php / emacs-php/phpstan.el
phpstan.neon, but no phpstan executable chokes flyspell
- Dominant language
- Emacs Lisp
- Stars
- 28
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.