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

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: final final final final Created 6 years, 5 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 66b8e425cacd2a7b2d86b213b4b28fd5edf0e346..67e956157b93ad0e2b745fc57d3eea811dc39d08 100755
--- a/third_party/closure_compiler/compile_modules.py
+++ b/third_party/closure_compiler/compile_modules.py
@@ -7,6 +7,8 @@ import argparse
import ast
from checker import Checker as Checker
import os
+import sys
+
class Module(object):
def __init__(self, name, sources, depends=[], externs=[]):
@@ -41,7 +43,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")
@@ -93,7 +95,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="")

Powered by Google App Engine
This is Rietveld 408576698