{ $fileList = array(); $dir = opendir($dirName); while ($file = readdir($dir)) { if ($file != '.' && $file != '..' && $file != 'ext') { if (is_dir($dirName . '/' . $file)) { $fileList = array_merge($fileList, readDirectory($dirName . '/' . $file)); } else { if (StringTool::endsWith($file, '.js')) { $fileList[] = $dirName . '/' . $file; } } } } return $fileList; } echo '<pre>'; $fileList = readDirectory(dirname(__FILE__) . '/../../js'); foreach ($fileList as $file) { echo '<h2>' . $file . '</h2>'; $js = file_get_contents($file); if (!$lint->Lint($js)) { echo "bad js code! full output:\n"; echo $lint->output(); } else { echo $lint->output(); } } ?> </body> </html>