mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Merge pull request #5874 from weswigham/lint-all-things
lint all files before reporting a failure
This commit is contained in:
commit
db4cc982ab
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user