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

Unified Diff: third_party/closure_compiler/compile2.py

Issue 2932743002: Closure compilation: Remove compile_js2.py error filtering. (Closed)
Patch Set: Delete more Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/closure_compiler/error_filter.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/compile2.py
diff --git a/third_party/closure_compiler/compile2.py b/third_party/closure_compiler/compile2.py
index a292c8dd732b2a4c76054e39b9a3d17d85ffebf0..224856d7227192fd022b0f655d4574c414254349 100755
--- a/third_party/closure_compiler/compile2.py
+++ b/third_party/closure_compiler/compile2.py
@@ -14,7 +14,6 @@ import sys
import tempfile
import processor
-import error_filter
_CURRENT_DIR = os.path.join(os.path.dirname(__file__))
@@ -45,7 +44,6 @@ class Checker(object):
self._target = None
self._temp_files = []
self._verbose = verbose
- self._error_filter = error_filter.PromiseErrorFilter()
def _nuke_temp_files(self):
"""Deletes any temp files this class knows about."""
@@ -122,29 +120,6 @@ class Checker(object):
real_file = self._processor.get_file_from_line(match.group(1))
return "%s:%d" % (os.path.abspath(real_file.file), real_file.line_number)
- def _filter_errors(self, errors):
- """Removes some extraneous errors. For example, we ignore:
-
- Variable x first declared in /tmp/expanded/file
-
- Because it's just a duplicated error (it'll only ever show up 2+ times).
- We also ignore Promise-based errors:
-
- found : function (VolumeInfo): (Promise<(DirectoryEntry|null)>|null)
- required: (function (Promise<VolumeInfo>): ?|null|undefined)
-
- as templates don't work with Promises in all cases yet. See
- https://github.com/google/closure-compiler/issues/715 for details.
-
- Args:
- errors: A list of string errors extracted from Closure Compiler output.
-
- Return:
- A slimmer, sleeker list of relevant errors (strings).
- """
- first_declared_in = lambda e: " first declared in " not in e
- return self._error_filter.filter(filter(first_declared_in, errors))
-
def _clean_up_error(self, error):
"""Reverse the effects that funky <include> preprocessing steps have on
errors messages.
@@ -295,8 +270,7 @@ class Checker(object):
f.write('')
if process_includes:
- filtered_errors = self._filter_errors(errors)
- errors = map(self._clean_up_error, filtered_errors)
+ errors = map(self._clean_up_error, errors)
output = self._format_errors(errors)
if errors:
« no previous file with comments | « no previous file | third_party/closure_compiler/error_filter.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698