From bd015f14e84c5cdd473e41bd694ea3fcd3cdfb8e Mon Sep 17 00:00:00 2001 From: Tim Blasi Date: Mon, 11 Jan 2016 15:39:27 -0800 Subject: [PATCH] build(dartanalyzer): Ignore TODOs during build The newest version of the analyzer emits hints when it encounters TODOs in code, which is breaking the Dart dev version of our build. Ignore TODOs for the purpose of build health. See #6410 --- tools/build/dartanalyzer.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/build/dartanalyzer.js b/tools/build/dartanalyzer.js index b2e7746cdd..10c58ef011 100644 --- a/tools/build/dartanalyzer.js +++ b/tools/build/dartanalyzer.js @@ -165,8 +165,9 @@ _AnalyzerOutputLine.prototype = { lineText = '\n' + sourceLine + '\n' + repeat(' ', this.colNum) + repeat('^', this.asciiLineLength); } - return '[' + this.severity + '] ' + this.errorMsg + ' (' + this.sourcePath + ', line ' + - this.lineNum + ', col ' + this.colNum + ')' + lineText; + return '[' + this.severity + '] type: ' + this.errorType + ' ' + + this.errorMsg + ' (' + this.sourcePath + ', line ' + this.lineNum + + ', col ' + this.colNum + ')' + lineText; }, shouldIgnore: function() { @@ -174,7 +175,7 @@ _AnalyzerOutputLine.prototype = { if (this.sourcePath.match(/_analyzer\.dart/)) { return true; } - // TODO remove it once ts2dart propertly generates abstract getters + // TODO remove it once ts2dart properly generates abstract getters if (this.errorMsg.match(/unimplemented/)) { return true; } @@ -189,6 +190,11 @@ _AnalyzerOutputLine.prototype = { return true; } + // TODOs shouldn't break our build... + if (this.errorCode.match(/TODO/i)) { + return true; + } + // Don't worry about hints in generated files. if (this.isHint && this.sourcePath.match(/generated/i)) { return true;