Index: mojo/tools/mojob.py |
diff --git a/mojo/tools/mojob.py b/mojo/tools/mojob.py |
index fb9e1441ea52ef93b67b792814fc9d62b3e2caec..7f60900656af4c6251c0fde73c841b9bdae25b0c 100755 |
--- a/mojo/tools/mojob.py |
+++ b/mojo/tools/mojob.py |
@@ -112,6 +112,14 @@ def build(config): |
return subprocess.call(['ninja', '-C', out_dir]) |
+def dartcheck(config): |
+ """Runs the dart analyzer on code for the given config.""" |
+ |
+ out_dir = _get_out_dir(config) |
+ print 'Checking dart code in %s ...' % out_dir |
+ return subprocess.call(['ninja', '-C', out_dir, 'dartcheck']) |
+ |
+ |
def _run_tests(config, test_types): |
"""Runs the tests of the given type(s) for the given config.""" |
@@ -244,6 +252,10 @@ def main(): |
help='Run NaCl unit tests (does not build).') |
nacltest_parser.set_defaults(func=nacltest) |
+ dartcheck_parser = subparsers.add_parser('dartcheck', parents=[parent_parser], |
+ help='Run the dart source code analyzer to check for warnings.') |
+ dartcheck_parser.set_defaults(func=dartcheck) |
+ |
args = parser.parse_args() |
config = _args_to_config(args) |
return args.func(config) |