Skip to content
Snippets Groups Projects
Commit d2600cc8 authored by Jared Hancock's avatar Jared Hancock
Browse files

lint: Fail on js syntax errors

parent 6986e6f7
No related branches found
No related tags found
No related merge requests found
<?php
require_once "class.test.php";
class JsSyntaxTest extends Test {
var $name = "JavaScript Syntax Checks";
function testLintErrors() {
$exit = 0;
$root = get_osticket_root_path();
foreach (glob_recursive("$root/*.js") as $s) {
ob_start();
system("jsl -process $s", $exit);
$line = ob_get_contents();
ob_end_clean();
if ($exit == 3)
$this->fail($s, 0, $line);
else
$this->pass();
}
}
}
return 'JsSyntaxTest';
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment