Skip to content

Instantly share code, notes, and snippets.

@lloc
Created September 21, 2013 12:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lloc/6650222 to your computer and use it in GitHub Desktop.
Save lloc/6650222 to your computer and use it in GitHub Desktop.
Install WordPress Coding Standards for PHP_CodeSniffer in Ubuntu
# 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