Closed UVLabs closed 6 years ago
The solution was like I suspected, adding wpcs to the repo directory caused an issue.
After adding the wpcs to a separate folder and instead of running:
phpcs --config-set installed_paths wpcs
I instead ran:
phpcs --config-set installed_paths <full path to wpcs folder>
It now works fine
@UVLabs You may want to consider adding Dealerdirect/phpcodesniffer-composer-installer: ^0.4.3
to your Composer dependencies. It will sort the installed paths out automatically, no matter how many external standards you may add.
I'm on Windows 10 64bit
I'm working a bit on this repository(please clone to be able to follow along, it's a WordPress plugin):
https://github.com/Codeinwp/tweet-old-post
I ran npm install in the local cloned repo
I ran composer install in the directory
I ran grunt local after i'd made my changes and two tasks were failing phpcbf and phpcs saying that they're not internal or external commands.
I installed PHP_CodeSniffer via composer
I again run grunt local and got an error stating that WPCore was not recognized.
I then followed this guide for setting up WordPress coding standards:
https://code.tutsplus.com/tutorials/using-php-codesniffer-with-wordpress-installing-and-using-the-wordpress-rules--cms-26443
It downloaded inside the cloned repo directory(I'm thinking this might be the cause, but I tried downloading it outside of the cloned repo and was getting an error when I tried to run grunt local):
So I deleted it from the other directory and went to install it back inside the tweet-old-post directory
After I checked phpcs -i and saw that all rules were set:
When i run grunt local I get the error spawn ENAMETOOLONG...I'm new to dependency management and all these things so I'm a bit lost, I spend hours googling but didn't find anything that could help, would greatly appreciate if I can get some help on this...it's preventing me from being able to contribute to that repository