prosenjit-itobuz
10/18/2016 - 8:34 PM

Installing phpcs

Installing phpcs

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
{
    

    "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": ""
    },

   
}