-
-
Save anestan/462284a7479f23d87935eae107a414fd to your computer and use it in GitHub Desktop.
PHP Code Sniffer with WordPress Coding Standards and Atom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install PHP CodeSniffer | |
brew install homebrew/php/php-code-sniffer #if using Homebrew | |
git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs #if you want to do it directly | |
#Install WordPress Coding Standards | |
git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs | |
#Add WordPress standards to PHPCS config | |
phpcs -i #shows the libraries installed | |
phpcs --config-set installed_paths <path to dir that you cloned>/wpcs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"linter-phpcs": | |
executablePath: "/usr/local/bin/phpcs" | |
codeStandardOrConfigFile: "WordPress" | |
tabWidth: 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment