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-flycheck will block phpmd and phpcs from running. #17

Open
yisraeldov opened this issue Mar 13, 2019 · 4 comments
Open

phpstan-flycheck will block phpmd and phpcs from running. #17

yisraeldov opened this issue Mar 13, 2019 · 4 comments

Comments

@yisraeldov
Copy link
Contributor

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
Copy link
Contributor Author

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

@3ynm
Copy link
Contributor

3ynm commented Nov 1, 2019

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

@3ynm
Copy link
Contributor

3ynm commented Nov 2, 2019

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 :(

@zilti
Copy link

zilti commented Nov 25, 2020

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.

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

3 participants