phpstan.el icon indicating copy to clipboard operation
phpstan.el copied to clipboard

phpstan-flycheck will block phpmd and phpcs from running.

Open yisraeldov opened this issue 6 years ago • 4 comments

I'm not sure if this is an issue with flycheck or the phpstan-flycheck

the other php flychecks don't run.

(flycheck-add-next-checker 'php 'phpstan)

That pretends it to the list of next checkers for php.

but even if I change it to append it still doesn't work. It will run all the other checkers but not get to phpspec.

If I modify flycheck.el and manually add phpstan to next-checkers of php and php-cs.

Then it works. It seems like flycheck doesn't honor the next-checkers list and they know it.

yisraeldov avatar Mar 13 '19 09:03 yisraeldov

if it is changed to run after php-cs it works...

yisraeldov avatar Mar 13 '19 09:03 yisraeldov

I can confirm this bug. I use phpcs for verifying PSR12 compliance.

3ynm avatar Nov 01 '19 21:11 3ynm

After several attempts and even hacking my way through elisp to alter order of the next-checker chain (which did not work anyways) I've came to try placing phpcs as next checker to phpstan instead of php.

(flycheck-add-next-checker 'phpstan 'php-phpcs)

It works. Anyways the bug is real and should be solved, I just don't know how :(

3ynm avatar Nov 02 '19 03:11 3ynm

That's not a bug, that is flycheck working as designed. It will always take the first checker in the "next checkers" list of the currently active checker, and only take the next if the first is unavailable.

zilti avatar Nov 25 '20 14:11 zilti