First batch of removal of the headers needed for revision-functions.php
[mailer.git] / contrib / lint.sh
1 #!/bin/sh
2
3 if ! test -e "modules.php"; then
4         echo "$0: Please execute this script from root directory."
5         exit 1
6 fi
7
8 echo "$0: Analysing PHP scripts for syntax errors (lint) ..."
9 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`
10
11 if test "${LINT}" != ""; then
12         echo "${LINT}"
13 else
14         echo "$0: No syntax errors found."
15 fi