Created
December 19, 2017 13:52
-
-
Save igmoweb/6d7ce8ff90903f167c7e244f3d047145 to your computer and use it in GitHub Desktop.
Executes a phpcs review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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