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:
parent
ca7ba12fc6
commit
bd015f14e8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue