Merge pull request #5874 from weswigham/lint-all-things

lint all files before reporting a failure
This commit is contained in:
Wesley Wigham 2015-12-01 15:26:56 -08:00
commit db4cc982ab

View File

@ -926,13 +926,17 @@ var lintTargets = compilerSources
desc("Runs tslint on the compiler sources");
task("lint", ["build-rules"], function() {
var lintOptions = getLinterOptions();
var failed = 0;
for (var i in lintTargets) {
var result = lintFile(lintOptions, lintTargets[i]);
if (result.failureCount > 0) {
console.log(result.output);
fail('Linter errors.', result.failureCount);
failed += result.failureCount;
}
}
if (failed > 0) {
fail('Linter errors.', failed);
}
});
/**