Skip to content

Instantly share code, notes, and snippets.

@xiaohuilam
Last active August 24, 2018 03:03
Show Gist options
  • Save xiaohuilam/688d813dbde2681e6fc17dbbabf224f6 to your computer and use it in GitHub Desktop.
Save xiaohuilam/688d813dbde2681e6fc17dbbabf224f6 to your computer and use it in GitHub Desktop.
phpcs when git commit
#!/bin/sh
list=$(git status -s | awk '{ print $2}')
for i in $list
do
/usr/local/bin/phpcs $i --report=source,diff,code
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment