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

Unified Diff: third_party/WebKit/Source/devtools/scripts/closure/closure_runner/src/org/chromium/devtools/compiler/Runner.java

Issue 2619933003: DevTools: mute struct-related violations for snippets containing 'Symbol'. (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/Source/devtools/scripts/closure/closure_runner/closure_runner.jar ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/scripts/closure/closure_runner/src/org/chromium/devtools/compiler/Runner.java
diff --git a/third_party/WebKit/Source/devtools/scripts/closure/closure_runner/src/org/chromium/devtools/compiler/Runner.java b/third_party/WebKit/Source/devtools/scripts/closure/closure_runner/src/org/chromium/devtools/compiler/Runner.java
index 06c0d74b1a7113bdd627017f7f60f2db2820d2e0..d94a0980d19b945d437a898e6b7693cb7eeb5912 100644
--- a/third_party/WebKit/Source/devtools/scripts/closure/closure_runner/src/org/chromium/devtools/compiler/Runner.java
+++ b/third_party/WebKit/Source/devtools/scripts/closure/closure_runner/src/org/chromium/devtools/compiler/Runner.java
@@ -3,6 +3,7 @@ package org.chromium.devtools.compiler;
import com.google.common.collect.Lists;
import com.google.common.io.Resources;
import com.google.javascript.jscomp.*;
+import com.google.javascript.jscomp.Compiler;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
@@ -192,6 +193,21 @@ public class Runner {
options.setCodingConvention(new DevToolsCodingConvention());
}
+ @Override
+ protected Compiler createCompiler() {
+ Compiler compiler = new Compiler();
+ final LightweightMessageFormatter formatter = new LightweightMessageFormatter(compiler);
+ compiler.setErrorManager(new PrintStreamErrorManager(formatter, getErrorPrintStream()) {
+ @Override
+ public void report(CheckLevel level, JSError error) {
+ String text = formatter.formatError(error);
+ if (text.indexOf("access on a struct") == -1 || text.indexOf("Symbol") == -1)
+ super.report(level, error);
+ }
+ });
+ return compiler;
+ }
+
int execute() {
try {
return doRun();
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/closure/closure_runner/closure_runner.jar ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698