Last active
November 4, 2016 17:11
-
-
Save dev-ext/7d8539c711ac5f76bd0199dca8f9c032 to your computer and use it in GitHub Desktop.
Installing phpcs
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
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar | |
chmod 777 phpcs.phar | |
sudo mv phpcs.phar /usr/local/bin/phpcs | |
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar | |
sudo chmod 777 phpcbf.phar | |
sudo mv phpcbf.phar /usr/local/bin/phpcbf | |
curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v1.12.2/php-cs-fixer.phar -o php-cs-fixer | |
sudo chmod a+x php-cs-fixer | |
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer | |
wget -c http://static.phpmd.org/php/latest/phpmd.phar | |
chmod 777 phpmd.phar | |
sudo mv phpmd.phar /usr/local/bin/phpmd | |
git clone --depth=1 -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs | |
sudo phpcs --config-set installed_paths ~/dev/wpcs/ | |
phpcs -i |
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
{ | |
"phpcs_executable_path": "/usr/local/bin/phpcs", | |
"php_cs_fixer_executable_path": "/usr/local/bin/php-cs-fixer", | |
"phpcbf_executable_path": "/usr/local/bin/phpcbf", | |
"phpmd_executable_path": "/usr/local/bin/phpmd", | |
"phpcs_additional_args": { | |
"--standard": "WordPress", | |
"-n": "" | |
}, | |
"phpcbf_additional_args": { | |
"--standard": "WordPress", | |
"-n": "" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment