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
This commit is contained in:
Tim Blasi 2016-01-11 15:39:27 -08:00 committed by Timothy Blasi
parent ca7ba12fc6
commit bd015f14e8
1 changed files with 9 additions and 3 deletions

View File

@ -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;