The following Tasks.json Problem matcher regular expression should match the following typical warning. But it doesn't. ctc W505: ["somedirectory/somefile.c" 350/18] implicit declaration blah blah blah
What is the issue ? I verified the built-in parser matches gcc output errors and warnings.
Thanks,
Satish K
"tasks": [
{
"label": "build.bat",
"type": "shell",
"command": "build.bat",
"problemMatcher": {
"owner": "cpptools",
"fileLocation": [
"relative",
"${env:PWD}"
],
"pattern": {
"regexp": "^ctc W(\\d+): \\[\\\"(.*)\\\" (\\d+)\\\/(\\d+)\\] (.*)$",
"file": 2,
"line": 3,
"column": 4,
"message": 5
}
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
This works for me in regex101.com (ECMAScript(JavaScript)):
^ctc\s+(W|E)(\d+): \["(.*)" (\d+)\/(\d+)\] (.*)
And this in VS Code:
"problemMatcher": {
"owner": "TASKING",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^ctc\\s+(W|E)(\\d+): \\[\"(.*)\" (\\d+)\/(\\d+)\\] (.*)",
"severity": 1,
"code": 2,
"file": 3,
"line": 4,
"column": 5,
"message": 6
}
}