Index: third_party/closure_compiler/closure_args.gni |
diff --git a/third_party/closure_compiler/closure_args.gni b/third_party/closure_compiler/closure_args.gni |
index b1cd18974247bb1e587e661eecd99c629468a76d..182cae96903a210c6e7248fe69c4153cd729fbed 100644 |
--- a/third_party/closure_compiler/closure_args.gni |
+++ b/third_party/closure_compiler/closure_args.gni |
@@ -3,8 +3,9 @@ |
# found in the LICENSE file. |
# GYP version: third_party/closure_compiler/closure_args.gypi |
-closure_args = [ |
- "compilation_level=SIMPLE_OPTIMIZATIONS", |
+ |
+# Args for all uses of the closure compiler |
+common_closure_args = [ |
"extra_annotation_name=attribute", |
"extra_annotation_name=demo", |
@@ -15,6 +16,18 @@ closure_args = [ |
"extra_annotation_name=status", |
"extra_annotation_name=submodule", |
+ "language_in=ECMASCRIPT6_STRICT", |
+ "language_out=ECMASCRIPT5_STRICT", |
+ |
+ "polymer_pass", |
+ |
+ "source_map_format=V3", |
+] |
+ |
+# Additional closure args for performing full checks. |
+checking_closure_args = [ |
+ "compilation_level=SIMPLE_OPTIMIZATIONS", |
+ |
"jscomp_error=accessControls", |
"jscomp_error=ambiguousFunctionDecl", |
"jscomp_error=checkTypes", |
@@ -33,15 +46,11 @@ closure_args = [ |
"jscomp_error=unknownDefines", |
"jscomp_error=uselessCode", |
"jscomp_error=visibility", |
- |
- "language_in=ECMASCRIPT6_STRICT", |
- "language_out=ECMASCRIPT5_STRICT", |
- |
- "polymer_pass", |
- |
- "source_map_format=V3", |
] |
+# For compatibility with old uses. |
+closure_args = common_closure_args + checking_closure_args |
+ |
default_disabled_closure_args = [ |
"jscomp_off=duplicate", |
"jscomp_off=misplacedTypeAnnotation", |