Skip to content

Instantly share code, notes, and snippets.

@zombor
Created August 15, 2011 19:25
Show Gist options
  • Save zombor/1147520 to your computer and use it in GitHub Desktop.
Save zombor/1147520 to your computer and use it in GitHub Desktop.
phpcs pre-commit hook
#!/bin/bash
git diff --cached --name-status | awk '$1 != "D" && $1 != "R" { print $2 }' | xargs /usr/bin/env phpcs --tab-width=4 --extensions=php --report-width=140 --ignore=target/*,www/docroot/*,test/behat/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment