2 // Tired of chasing typos and finding them after a commit.
3 // Run this from cmdline in basedir and quickly see if we've
4 // got any parse errors in our application files.
7 error_reporting(E_ERROR | E_WARNING | E_PARSE );
8 ini_set('display_errors', '1');
9 ini_set('log_errors','0');
15 if(x($a->config,'php_path'))
16 $phpath = $a->config['php_path'];
21 echo "Directory: mod\n";
22 $files = glob('mod/*.php');
23 foreach($files as $file) {
24 passthru("$phpath -l $file", $ret); $ret===0 or die();
27 echo "Directory: include\n";
28 $files = glob('include/*.php');
29 foreach($files as $file) {
30 passthru("$phpath -l $file", $ret); $ret===0 or die();
33 echo "Directory: object\n";
34 $files = glob('object/*.php');
35 foreach($files as $file) {
36 passthru("$phpath -l $file", $ret); $ret===0 or die();
39 echo "Directory: addon\n";
40 $dirs = glob('addon/*');
42 foreach($dirs as $dir) {
43 $addon = basename($dir);
44 $files = glob($dir . '/' . $addon . '.php');
45 foreach($files as $file) {
46 passthru("$phpath -l $file", $ret); $ret===0 or die();
51 echo "String files\n";
53 echo 'util/strings.php' . "\n";
54 passthru("$phpath -l util/strings.php", $ret); $ret===0 or die();
56 $files = glob('view/lang/*/strings.php');
57 foreach($files as $file) {
58 passthru("$phpath -l $file", $ret); $ret===0 or die();