I am facing this issue in Visual Studio Code. I have already tried reinstalling the phpcs extension but still facing this issue.
Unable to locate phpcs
Please add
phpcs
to your global path or use the composer dependency manager to install it in your project locally in Visual studio Code
PHPCS is a tool that helps detect violations of pre-defined coding standards. It also includes an additional tool that can automatically correct those violations.
I had the same issue, I did the following to fix it:
Install the phpcs by using composer with composer global require squizlabs/php_codesniffer
Press Command + ,
(Click Code -> Preferences -> Settings)
PHP CodeSniffer
'Scroll to 'Executatble Path
' and put
/Users/your-username/.composer/vendor/bin/phpcs
This fixed the issue for me, I hope it does for you too. Cheers!
open the project in the terminal and run this command
composer global require squizlabs/php_codesniffer
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With