Moved for merge preparation.
[core.git] / contrib / lint.sh
diff --git a/contrib/lint.sh b/contrib/lint.sh
new file mode 100755 (executable)
index 0000000..00c4a2c
--- /dev/null
@@ -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