- Follow instructions at https://www.drupal.org/node/1419988 to install PHPCS using composer (do it globally)
- Save git-cs to a location in your current path (
echo $PATH
); I used/usr/local/sbin
- Update permissions:
chmod u+x /usr/local/sbin/git-cs
- From your project directory, run
git-cs
to test changed files against Drupal coding standard
@todo - It would be nice to have this in a pre-commit hook so it's automatically run before a commit is made.