Multi-line problem matcher algorithm clarification - rollup matcher not working as expected

101 Views Asked by At

Can anyone clarify the exact algorithm used for the VS code multi-line problem matcher? Specifically curious what the behavior is when there are more than 2 patterns defined.

The context is that I'm trying to write a multi-line problem matcher in VS Code for a rollup task. A sample of the output would look like:

(!) Plugin typescript: @rollup/plugin-typescript TS2345: Argument of type 'FirstType' is not assignable to parameter of type 'SecondType'.
 Types of property 'PropertyOne' are incompatible.
   Type 'FirstType' is missing the following properties from type 'PropertyOne': X, Y
src/main/pathToFile/file.ts: (174:37)

I've tried a number of options. Here's the most recent attempt:

"pattern": [
{
     "regexp":"^[(][!][)](.*)$",
     "message": 1
},
{
     "regexp":"^\\s+(.*)$",
},

{
     "regexp": "^([^:\\s]+):\\s+\\((\\d+):(\\d+)\\)$",
     "file": 1,
     "line": 2,
     "column":3
}],

I would expect this to match the output described, but it doesn't match at all.

If I remove the first pattern, I'm able to get a match, but this doesn't give me all of the information I need.

0

There are 0 best solutions below