I have a task for Powershell in VSCode, but can't figure out how to make the problemMatch
work
{
"version": "0.1.0",
"command": "PowerShell.exe",
"isShellCommand": true,
"suppressTaskName": true,
"args": [
"& '${file}'"
],
"tasks": [
{
"taskName": "Build",
"isBuildCommand": true,
"showOutput": "always",
"fileLocation": ["absolute"],
"problemMatcher": [
{
"pattern": {
"regexp": "At (.*\\.ps1):(\\d*) char:(\\d*)(.*)\\n\\+(.*)\\n\\+(.*)\\n(.*)",
"file": 1,
"line": 2,
"column": 3,
"message": 7
}
}]
}]
}
Regex targets as so :
At C:\tmp\C1-INT to C1-QA\a.ps1:1 char:11
+ "asdasds" !
+ ~
Unexpected token '!' in expression or statement.
file: Group 1 "C:\tmp\C1-INT to C1-QA\a.ps1"
line: Group 2 "1"
column: Group 3 "11"
message: Group 7 Unexpected token '!' in expression or statement.