Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Created December 19, 2017 13:52
Show Gist options
  • Select an option

  • Save igmoweb/6d7ce8ff90903f167c7e244f3d047145 to your computer and use it in GitHub Desktop.

Select an option

Save igmoweb/6d7ce8ff90903f167c7e244f3d047145 to your computer and use it in GitHub Desktop.
Executes a phpcs review
#!/usr/bin/env bash
# Change this!
PATH_TO_RULESETS="~/source"
echo "Select what type of review you want to make: Security(s)/All(a). Default Security"
read SUFFIX
if [[ -z "$SUFFIX" ]]
then
SUFFIX='s'
fi
if [ $SUFFIX == 'a' ]
then
SUFFIX='all'
else
SUFFIX='security'
fi
RULESET=$PATH_TO_RULESETS/"phpcs-$SUFFIX.xml"
echo "Selected phpcs file: "
echo $RULESET
phpcs --standard=$RULESET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment