added lint.sh which needs to be executed like this:
$ ./util/lint.sh No parameters needed. It will use "php -l" (current interpreter) for checking for syntax errors in all PHP scripts. Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
c75d6ad850
commit
d5b4e09ec4
1 changed files with 15 additions and 0 deletions
15
util/lint.sh
Executable file
15
util/lint.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! test -e "index.php"; then
|
||||||
|
echo "$0: Please execute this script from root directory."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
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" | grep -v "FUSE_EDEADLK" | sort --unique`
|
||||||
|
|
||||||
|
if test "${LINT}" != ""; then
|
||||||
|
echo "${LINT}"
|
||||||
|
else
|
||||||
|
echo "$0: No syntax errors found."
|
||||||
|
fi
|
Loading…
Reference in a new issue