ikappas / vscode-phpcs

PHP CodeSniffer for Visual Studio Code
MIT License
128 stars 56 forks source link

phpcs.enable option not working? #155

Closed 9brada6 closed 4 years ago

9brada6 commented 4 years ago

Hi... for some reasons, even if I put phpcs.enable = false setting in user or workspace directory, the phpcs still show the error that it can't find the executable... Is this supposed to be like this?

image

simondubois commented 4 years ago

@9brada6 I face the same issue. Phpcs is disabled in the workspace but the plugin still tries to run. Could you share how you fixed it?

9brada6 commented 4 years ago

@9brada6 I face the same issue. Phpcs is disabled in the workspace but the plugin still tries to run. Could you share how you fixed it?

Hi... yes, I just disabled the plugin globally and enabled it for the workspace :)

simondubois commented 4 years ago

Thanks for the info. I switched to https://github.com/wongjn/vscode-php-sniffer to solve the problem.

9brada6 commented 4 years ago

Ah cool, in fact I switched too, to valeryanm.vscode-phpsab. I like phpsab more because like phpcs it auto-detect the code snipper executable, which is nice to not have to write everytime manually, and has also auto-format(if the error can be fixed, like auto space).

The only problem with valeryanm.vscode-phpsab is that somehow the problems shown will not go away if the file was open in preview mode(and then closed). This is not a problem for me since I have set anyway to show only the problems in the current file displayed, and to open a file in preview mode is anyway disabled.

So:

Pick your poison.