Reputation: 331
I am trying to install PHP CodeSniffer with WordPress Coding standards on VSCode Windows. I got the PHP Code Beautifier and Fixer to work however the errors are not highlighted and an error appears saying "phpcs: Referenced sniff "PHPCompatibility.PHP.RemovedExtensions" does not exist".
I have installed phpcs correctly as shown in the print screen below.
I then setup up the setting on vscode:
{
"workbench.settings.editor": "json",
"phpcs.enable": true,
"phpcs.executablePath": "C:\\Users\\jafsa\\wpcs\\vendor\\bin\\phpcs.bat",
"phpcs.standard": "WordPress",
"phpcs.showWarnings": true,
"phpcs.showSources": true,
"phpcbf.enable": true,
"phpcbf.executablePath": "C:\\Users\\jafsa\\wpcs\\vendor\\bin\\phpcbf.bat",
"phpcbf.onsave": true,
"phpcbf.standard": "WordPress",
}
The code is formatted however no errors appear and an error appears saying "PHPCompatibility.PHP.RemovedExtensions" does not exist".
Any help would be appreciated.
Upvotes: 2
Views: 986