Skip to content

Instantly share code, notes, and snippets.

@aristath
Forked from ilicfilip/tf-checkout.bash
Last active September 19, 2019 08:20
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 aristath/9b2696a87e14110d02f116994f334440 to your computer and use it in GitHub Desktop.
Save aristath/9b2696a87e14110d02f116994f334440 to your computer and use it in GitHub Desktop.
Runs PHPCS on changed files only
if [ $# -lt 0 ]; then
echo "------------------------"
echo "usage: $0 \$1"
echo " \$1: Files to check"
echo "------------------------"
exit 1
fi
if [ "$#" == 1 ]
then
files=$1;
else
files=$(git ls-files -om --exclude-standard);
fi
./vendor/bin/phpcs --runtime-set testVersion 5.6- $files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment