Skip to content

Instantly share code, notes, and snippets.

@scor
Last active August 29, 2015 14:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scor/653fe0869b03ad8d6929 to your computer and use it in GitHub Desktop.
Save scor/653fe0869b03ad8d6929 to your computer and use it in GitHub Desktop.
bash alias for code smoke test and PHP linting in a Drupal codebase
alias code-check="find -E . -type f -regex '^.*\.(engine|inc|install|engine|module|php|profile|test|theme|txt|info|rule|view)' | xargs -Ifile bash -c \"php -l file ; (true)\" | grep -v 'No syntax'
find . -type f | xargs -Ifile grep -H '>>>>>>' file| grep -v Binary | grep -v .git/rr-cache"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment