Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/debugtest/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,8 +727,11 @@ test.js
Our problem matcher is line-based so we need to capture the file name (test.js) with a different regular expression than the actual problem location and message (1:0 error Missing "use strict" statement).

To do this, use an array of problem patterns for the `pattern` property. This way you define a pattern per each line you want to match.

> **Note:** In a multi-line problem matcher, each line in the output must be matched sequentially by the pattern array. Intermediate lines cannot be skipped, even if they are not needed for capturing values.

> **Note:** Terminal line wrapping can break multi-line problem matchers. If a line of output is too long and the terminal wraps it into two lines, VS Code processes it as two separate lines. Your problem matcher will fail unless your pattern array accounts for the extra wrapped line. To avoid this, ensure your terminal is wide enough or configure your build tool to disable line wrapping if possible.

The following problem pattern matches the output from ESLint in stylish mode - but still has one small issue that we need to resolve next. The code below has a first regular expression to capture the file name and the second to capture the line, column, severity, message, and error code:

```json
Expand Down