Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1040)

Unified Diff: third_party/closure_compiler/compile_modules.py

Issue 421253006: Add ChromeCodingConvention.java to Closure Compiler to preserve getInstance() type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@A_typechecking_about
Patch Set: rebase onto master Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/closure_compiler/compile_modules.py
diff --git a/third_party/closure_compiler/compile_modules.py b/third_party/closure_compiler/compile_modules.py
index e6529521ad3ebcc4ca8516ffc3e4d92809b4a35d..b81f486615c58e479d5e95f414bb4689d4dcd139 100755
--- a/third_party/closure_compiler/compile_modules.py
+++ b/third_party/closure_compiler/compile_modules.py
@@ -6,6 +6,8 @@
import argparse
from checker import Checker as Checker
import os
+import sys
+
try:
import json
except:
@@ -45,7 +47,7 @@ class ModuleParser(object):
def parse(self, file_path):
if file_path in self._cache:
- print "(INFO) Found module file %s in the cache" % file_path
+ print "(INFO) Found module file %s in the cache" % file_path
return self._cache[file_path]
file = open(file_path, "r")
@@ -97,7 +99,10 @@ class ModuleCompiler(object):
for s in m.sources:
depends = [rel_path(d) for d in m.depends]
externs = [rel_path(e) for e in m.externs]
- self._checker.check(rel_path(s), depends=depends, externs=externs)
+ exit_code, _ = self._checker.check(rel_path(s), depends=depends,
+ externs=externs)
+ if exit_code:
+ sys.exit(exit_code)
if s != m.sources[-1]:
self._debug(os.linesep, prefix="")
« no previous file with comments | « third_party/closure_compiler/coding_conventions_test.py ('k') | third_party/closure_compiler/runner/build_runner_jar.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698