Skip to content

Instantly share code, notes, and snippets.

@deetergp
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deetergp/10007191 to your computer and use it in GitHub Desktop.
Save deetergp/10007191 to your computer and use it in GitHub Desktop.
Re-Configure Code Sniffer for Drupal

Intent

This document contains instructions for re-configuring PHP_CodeSniffer in the brewStack local development environment after running brew upgrade in Homebrew upgrades PHP.

Steps

  1. Update Pear and use it to re-download the PHP_CodeSniffer package:

     $ sudo pear update-channels
     $ sudo pear install PHP_CodeSniffer
    
  2. Create a new symlink from the newly-upgraded version of PHP to wherever you downloaded Drupal Coder.

     $ ln -sv /path/to/coder/coder_sniffer/Drupal $(pear config-get php_dir)/PHP/CodeSniffer/Standards/Drupal
    
  3. You should now be able to run the following from a shell prompt:

     $ phpcs --standard=Drupal /path/to/code/you/want/to/sniff
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment