Say that you have TSLintBreakBuildOnError set to true so that a tslint failure should break the build. If you build and tslint returns that some of the tslint checks failed, then the build will fail. If you build right after that without changing any files, tslint won't execute, and the build will then succeed even though no code has changed and the tslint checks should still fail.
The problem seems to be that the timestamp file used for the incremental build is being touched even when the tslint checks fail. I'd expect to see it only touched if the tslint checks passed, something like:
...
<!-- Moved to after the Exec Task so we can grab the value of TSLintErrorCode -->
<Touch
AlwaysCreate="true"
Files="$(TSLintTimestampFile)"
Condition="'$(TSLintErrorCode)' == '0'"
/>
...
For what it's worth, I'm aware that I could get around this by forcing tslint to run every time with TSLintForceBuild, but I'd much rather keep the incremental build if possible
Say that you have TSLintBreakBuildOnError set to true so that a tslint failure should break the build. If you build and tslint returns that some of the tslint checks failed, then the build will fail. If you build right after that without changing any files, tslint won't execute, and the build will then succeed even though no code has changed and the tslint checks should still fail.
The problem seems to be that the timestamp file used for the incremental build is being touched even when the tslint checks fail. I'd expect to see it only touched if the tslint checks passed, something like:
For what it's worth, I'm aware that I could get around this by forcing tslint to run every time with TSLintForceBuild, but I'd much rather keep the incremental build if possible