Created
April 10, 2017 13:15
-
-
Save mikaelz/c5d08ce9b7c575594c20e7dd75f71a05 to your computer and use it in GitHub Desktop.
PHP lint files, for example due migration to PHP7
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
#!/bin/bash | |
find . -name '*.php' | xargs -i php -l {} | grep -v 'No syntax errors' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool idea! Sadly, on macOS Mojave 10.14.6 the snippet throws an error:
It seems that
-i
flag is deprecated. Fortunately, I got the snippet working by replacing-i
by-I {}
.Note: the snippet seems to exit at the first lint issue. I had to fix the issue and run the snippet again and again to catch all the issues.