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

Unified Diff: third_party/closure_compiler/checker.py

Issue 687453007: Suppress misplacedTypeAnnotation to compile cr.defineProperty with annotation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/checker.py
diff --git a/third_party/closure_compiler/checker.py b/third_party/closure_compiler/checker.py
index 02d9d5bd740a797d19d2ba7dfc0c79bc2093416f..b3b75971c416dc1bf287df6c8c49504b6af96170 100755
--- a/third_party/closure_compiler/checker.py
+++ b/third_party/closure_compiler/checker.py
@@ -32,7 +32,6 @@ class Checker(object):
"--jscomp_error=externsValidation",
"--jscomp_error=globalThis",
"--jscomp_error=invalidCasts",
- "--jscomp_error=misplacedTypeAnnotation",
"--jscomp_error=missingProperties",
"--jscomp_error=missingReturn",
"--jscomp_error=nonStandardJsDocs",
@@ -44,6 +43,9 @@ class Checker(object):
"--jscomp_error=visibility",
# TODO(dbeam): happens when the same file is <include>d multiple times.
"--jscomp_off=duplicate",
+ # TODO(fukino): happens when cr.defineProperty() has a type annotation.
+ # Avoiding parse-time warnings needs 2 pass compiling. crbug.com/421562.
+ "--jscomp_off=misplacedTypeAnnotation",
"--language_in=ECMASCRIPT5_STRICT",
"--summary_detail_level=3",
]
@@ -129,10 +131,10 @@ class Checker(object):
def _fix_up_error(self, error):
"""Filter out irrelevant errors or fix line numbers.
-
+
Args:
error: A Closure compiler error (2 line string with error and source).
-
+
Return:
The fixed up erorr string (blank if it should be ignored).
"""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698