Created
September 21, 2013 12:37
-
-
Save lloc/6650222 to your computer and use it in GitHub Desktop.
Install WordPress Coding Standards for PHP_CodeSniffer in Ubuntu
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 | |
sudo apt-get install php-codesniffer | |
# Install the WordPress Coding Standards | |
sudo git clone git://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git \ | |
$(pear config-get php_dir)/PHP/CodeSniffer/Standards/WordPress | |
# Now your can check your files like this | |
phpcs --standard=WordPress your-file.php | |
# or you could set the WordPress Coding Standards as your default | |
sudo phpcs --config-set default_standard WordPress | |
# and use the CodeSniffer like so | |
phpcs your-file.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment