Last active
December 28, 2015 10:49
-
-
Save adduc/7489154 to your computer and use it in GitHub Desktop.
Phing target for detecting PHP short open tags.
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
<target name="checkshorttags"> | |
<!-- Run in parallel to speed up process. --> | |
<exec | |
escape="false" | |
command='GREPOUT=`find . -not -ipath "*vendor*" -type "f" -name "*.php" -print0 | xargs -0 -n1 -P$(nproc) pcregrep -nrHMe "<\?\s"`; | |
echo "$GREPOUT"; | |
if [ -z "$GREPOUT" ]; | |
then exit 0; | |
else exit 1; | |
fi; | |
' | |
checkreturn="true" | |
passthru="true" | |
/> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment