]> git.mxchange.org Git - friendica.git/blob - util/lint.sh
Opps, this has vanished by accident, thanks to @annando
[friendica.git] / util / lint.sh
1 #!/bin/sh
2
3 if [ ! -e "index.php" ]
4 then
5         echo "$0: Please execute this script from root directory."
6         exit 1
7 fi
8
9 echo "$0: Analysing PHP scripts for syntax errors (lint) ..."
10 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`
11
12 if [ -n "${LINT}" ]
13 then
14         echo "${LINT}"
15 else
16         echo "$0: No syntax errors found."
17 fi