From c297a5d6975290f16479b3f9685825a017985fde Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 12 May 2015 02:04:30 +0200 Subject: [PATCH] Improved find-bad-php.sh with a lint check + updated 'core'. Signed-off-by: Roland Haeder --- core | 2 +- find-bad-php.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core b/core index 6ce3532..f1483fb 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 6ce35323d0e770dc35c47c12ab9d3a1f7879acf8 +Subproject commit f1483fbeae4881d349f9b9558340d1d56b0aab78 diff --git a/find-bad-php.sh b/find-bad-php.sh index 1d530b3..2fdfecf 100755 --- a/find-bad-php.sh +++ b/find-bad-php.sh @@ -18,6 +18,13 @@ do then echo "$0: Script '${SCRIPT}' has non-typical footer." fi + + LINT=`php -l "${SCRIPT}" 2>&1 | grep -v "No syntax errors detected in"` + + if [ -n "${LINT}" ] + then + echo "$0: ${LINT}" + fi done echo "$0: All done." -- 2.39.5