VSCode で Powershell のタスクがありますが、それを機能させる方法がわかりませproblemMatch
ん
{
"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
}
}]
}]
}
正規表現のターゲットは次のとおりです。
At C:\tmp\C1-INT to C1-QA\a.ps1:1 char:11
+ "asdasds" !
+ ~
Unexpected token '!' in expression or statement.
ファイル:グループ 1 " C:\tmp\C1-INT to C1-QA\a.ps1 "
行:グループ 2 " 1 "
列:グループ 3 " 11 "
メッセージ:グループ 7 予期しないトークン '!' 式またはステートメントで。