3 // Tired of chasing typos and finding them after a commit.
4 // Run this from cmdline in basedir and quickly see if we've
5 // got any parse errors in our application files.
9 error_reporting(E_ERROR | E_WARNING | E_PARSE);
10 ini_set('display_errors', '1');
11 ini_set('log_errors', '0');
15 $a = new App(dirname(__DIR__));
17 if (x($a->config, 'php_path')) {
18 $phpath = $a->config['php_path'];
23 echo "Directory: mod\n";
24 $files = glob('mod/*.php');
25 foreach ($files as $file) {
26 passthru("$phpath -l $file", $ret);
30 echo "Directory: include\n";
31 $files = glob('include/*.php');
32 foreach ($files as $file) {
33 passthru("$phpath -l $file", $ret);
37 echo "Directory: object\n";
38 $files = glob('object/*.php');
39 foreach ($files as $file) {
40 passthru("$phpath -l $file", $ret);
44 echo "Directory: addon\n";
45 $dirs = glob('addon/*');
47 foreach ($dirs as $dir) {
48 $addon = basename($dir);
49 $files = glob($dir . '/' . $addon . '.php');
50 foreach ($files as $file) {
51 passthru("$phpath -l $file", $ret);
57 echo "String files\n";
59 echo 'util/strings.php' . "\n";
60 passthru("$phpath -l util/strings.php", $ret);
63 $files = glob('view/lang/*/strings.php');
64 foreach ($files as $file) {
65 passthru("$phpath -l $file", $ret);