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

Unified Diff: third_party/closure_compiler/checker.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: remove exit_on_fatal flag 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/checker.py
diff --git a/third_party/closure_compiler/checker.py b/third_party/closure_compiler/checker.py
index 5ae34951f399d68082667aed5c3d1f10d69ebbab..2d48cf70a84f7041c094eac41cfd828755b764e7 100644
--- a/third_party/closure_compiler/checker.py
+++ b/third_party/closure_compiler/checker.py
@@ -19,7 +19,7 @@ class LineNumber(object):
class FileCache(object):
_cache = defaultdict(str)
-
+
def _read(self, file):
file = os.path.abspath(file)
self._cache[file] = self._cache[file] or open(file, "r").read()
@@ -128,7 +128,6 @@ class Checker(object):
def _fatal(self, msg):
Dan Beam 2014/07/29 23:49:08 change to _error, _fatal no longer makes as much s
Vitaly Pavlenko 2014/07/30 00:01:37 Done.
print >> sys.stderr, "(FATAL) " + msg
Dan Beam 2014/07/29 23:49:08 (ERROR)
Vitaly Pavlenko 2014/07/30 00:01:37 Done.
self._clean_up()
- sys.exit(1)
def _run_command(self, cmd):
cmd_str = " ".join(cmd)
@@ -212,11 +211,12 @@ class Checker(object):
self._debug("Summary: " + errors.pop())
output = self._format_errors(map(self._fix_up_error, errors))
+
if runner_cmd.returncode:
self._fatal("Error in: " + file + ("\n" + output if output else ""))
elif output:
self._debug("Output: " + output)
-
+
self._clean_up()
- return runner_cmd.returncode == 0
+ return runner_cmd.returncode == 0, output
Dan Beam 2014/07/29 23:49:08 return runner_cmd.returncode, output
Vitaly Pavlenko 2014/07/30 00:01:37 Done.

Powered by Google App Engine
This is Rietveld 408576698