Skip to content

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

Open
@xendk

Description

@xendk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions