composer global require "squizlabs/php_codesniffer=*"
composer global require "wp-coding-standards/wpcs"
phpcs --config-set installed_paths %APPDATA%\Composer\vendor\wp-coding-standards\wpcs
phpcs -i
- If you haven't installed phpcs (PHP CodeSniffer for Visual Studio Code) by Ioannis Kappas, please install it.
- You can do it by pressing
Ctrl Shift Xand search forphpcsand then press Install.
- If you haven't installed linter-phpcs (Lint PHP on the fly, using phpcs) by AtomLinter, please install it.
- You can do it by pressing
Ctrl ,then click Install. Search forlinter-phpcsand then press Install.
Add
--devin both composer commands, so that packages are placed in require-dev (since they're tagged as "static analysis")