VSCode の Remote Development Extension で、Windows 10 上 の VSCode から Linux サーバにアクセスして開発しています。
サーバ上には Intel のコンパイラがあり、これのエラーメッセージを VSCode で読み取ろうとしていますが、一つも検知できません。
エラーメッセージは今のところ2形式見かけています。
エラーコードのないタイプ:
src/Data.cpp(163): error: class "Node" has no member "local_index_"
エラーコードのあるタイプ:
src/Data.cpp(82): error #308: member "Node::m_" (declared at line 56 of "include/Node.h") is inaccessible
これに対して、vscodeのタスク定義の中で、以下のようにproblemMatcherを書いてみていますが、これで一件も検出されません。何がいけない・足りないのでしょうか?
ドキュメントは Defining a problem matcher | Tasks in Visual Studio Code を見ながら挑戦しています。
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: make all",
"command": "make",
"args": [
"all",
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": {
"fileLocation":"relative",
"pattern": {
"regexp": "^([^(]+)\\(\\d+\\):\\s+(warning|error)( #\\d+)?:\\s+(.*)$",
/* 以下もダメでした */
/* "regexp": "^(.*)\\(\\d+\\):\\s+(warning|error)( #\\d+)?:\\s+(.*)$", */
/* "regexp": "^([-/._A-Za-z0-9]+)\\(\\d+\\):\\s+(warning|error)( #\\d+)?:\\s+(.*)$", */
"file": 1,
"line": 2,
"severity": 3,
"message": 5
}
},
"group":{
"kind": "build",
"isDefault": true
},
}
]
}
^(.+?)\\((\\d+)\\):\\s+(warning|error)( #\\d+)?:\\s+(.*)$
こちら regexper のサイトで各バックスラッシュが二重になっているのを一重にして試してみました。