phpcs-wpcs-vscode
phpcs-wpcs-vscode copied to clipboard
How to install PHP CodeSniffer and the WordPress Coding Standard Rules in Visual Studio Code.
Would you be able to extend this guide to explain how to set up various customisations in a phpcs.xml file? For example, how to set up your plugin prefix or...
```json "phpcbf.enable": true, "phpcbf.standard": "WordPress", "phpcbf.debug": true, "phpcbf.onsave": true, "[php]": { "editor.defaultFormatter": "persoderlind.vscode-phpcbf" }, ``` Remember to restart Visual Studio Code when done
This is great. However it does not format the document, only shows you the problems. I want to format the document quickly using phpcbf. I cannot get that extension working...
``` phpcs: The "WordPress" coding standard set in your configuration is not installed. Please review your configuration an (sic) try again. ```