I have installed phpcs vscode extension and configured vscode settings as follows:
settings.json:
...
"php.suggest.basic": true,
"php.validate.executablePath": "/usr/bin/php",
"php.validate.run": "onSave",
"phpcs.enable": true,
"phpcs.executablePath": "/usr/bin/phpcs",
"phpcs.standard": "WordPress"
...
Also phpcs --config-show
displays the below include paths for WordPress Code Style Standard:
> phpcs --config-show
Using config file: /home/iarnous/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.conf
installed_paths: /home/iarnous/wp-standard,/home/iarnous/php-compatibility
Also I have validation run onSave.
My Question: How do I configure vscode to auto-format/auto-fix php files using WordPress-Core Standard?
Best regards,