It is possible to configure the Error message highlight pattern
and Warning message highlight pattern
of the TFS2015.2 Command Line
step?
For example, I may have the following build definition that runs a command line utility, say gulp
, to perform some tasks such as code linting.
The precise standard output (via stdout
) of this utility would be varied depending on the precise lint tasks being run. For example, one tool for analysing TypeScript code and another tool for analysing Sass code.
Furthermore, the utility may:
- Write messages to the error stream (via
stderr
). - Return a non-zero exit code.
Neither of the cases above are useful to me because in certain scenarios I don't want TFS to consider the build step has failed. I do however want warnings highlighted in the logs and build summary.
It would be useful to be able to teach the Command Line
step about specific output message patterns that represent warnings and errors.
In the build logs for the Command Line
step I see this:
This seems to suggest a way to configure the line matching patterns for output that represents warnings and errors. However, I cannot find a way to configure these, hence my question.
I should point out that I'm aware there are other ways of achieving this:
One way for example is via a targeted build step that is designed to wrap the command line utility. The built-in
Gulp
andnpm
steps for instance, or perhaps a custom authored step / extension.Another way is to emit Logging Commands from a build script as asked here.
My question specifically relates to employing the built-in generic Command Line
step directly when these options aren't available or desirable.