X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=contrib%2Flint.sh;fp=contrib%2Flint.sh;h=00c4a2c545218402502edfebac78a36eb112910b;hp=0000000000000000000000000000000000000000;hb=d2d298a1fcc6217a93e7d67f0de7b976d5bfd5e7;hpb=421d8c20ff4014ddae23e61b6654666b039bf00d diff --git a/contrib/lint.sh b/contrib/lint.sh new file mode 100755 index 00000000..00c4a2c5 --- /dev/null +++ b/contrib/lint.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +echo "$0: Analysing PHP scripts for syntax errors (lint) ..." +LINT=`find -type f -name "*.php" -exec php -l -f {} 2>&1 \; | grep -v "No syntax errors detected in"` + +if test "${LINT}" != ""; then + echo "${LINT}" +else + echo "$0: No syntax errors found." +fi