Skip to content

Instantly share code, notes, and snippets.

@Vinai
Created November 13, 2014 13:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Vinai/21d58d4d04c39aee5613 to your computer and use it in GitHub Desktop.
Save Vinai/21d58d4d04c39aee5613 to your computer and use it in GitHub Desktop.
Example for automating phpcs with a custom coding standard. Run this in a magento project dir (for example).
#/bin/bash
CODING_STANDARD_DIR="../Coding-Standards/Ecg"
[ ! -e "$CODING_STANDARD_DIR" ] && git clone https://github.com/magento-ecg/coding-standard.git "$CODING_STANDARD_DIR"
phpcs --standard="$CODING_STANDARD_DIR/ruleset.xml" "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment