Skip to content

Instantly share code, notes, and snippets.

@mleko
Created April 19, 2017 16:18
Show Gist options
  • Save mleko/25ab9f559c3cc8ebd8bb43096c566286 to your computer and use it in GitHub Desktop.
Save mleko/25ab9f559c3cc8ebd8bb43096c566286 to your computer and use it in GitHub Desktop.
PHP lint directory
#!/bin/sh
# ! inverts return code (fails on non-empty grep output)
! find . -type f -name '*.php' -exec php -l {} \; | grep -v "No syntax errors detected"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment