Last active
March 29, 2017 03:23
-
-
Save fjarrett/ab973bec61174b2188ea525af4b9c04c to your computer and use it in GitHub Desktop.
Run WP Coding Standards sniffs on themes/plugins
This file contains 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
# ------------------------------------------------------------ | |
# Run WP Coding Standards sniffs on themes/plugins | |
# | |
# See: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards | |
# | |
# $ composer require global wp-coding-standards/wpcs | |
# $ phpcs --config-set installed_paths ~/.composer/vendor/wp-coding-standards/wpcs | |
# ------------------------------------------------------------ | |
WPCS_EXCLUDE="WordPress.WhiteSpace.ControlStructureSpacing,Squiz.Commenting.FileComment" | |
WPCS_IGNORE="*/.dev/*,*/.git/*,*/bin/*,*/build/*,*/lib/*,*/node_modules/*,*/tests/*,*/vendor/*" | |
WPCS_OPTIONS="--exclude='$WPCS_EXCLUDE' --ignore='$WPCS_IGNORE' --colors -p" | |
alias wpcs-core="phpcs --standard='WordPress-Core' $WPCS_OPTIONS **/*.php" | |
alias wpcs-docs="phpcs --standard='WordPress-Docs' $WPCS_OPTIONS **/*.php" | |
alias wpcs-extra="phpcs --standard='WordPress-Extra' $WPCS_OPTIONS **/*.php" | |
alias wpcs-vip="phpcs --standard='WordPress-VIP' $WPCS_OPTIONS **/*.php" | |
alias wpcs-all="phpcs --standard='WordPress' $WPCS_OPTIONS **/*.php" | |
alias wpcs="wpcs-extra" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment