我试图为 tslint 实现模式匹配器,但它变得混乱了。我确定正确指定了正则表达式,但 VSC 不断突出显示不正确的文件。这是我的 tasks.json 文件:
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [
],
"tasks": [
{
"taskName": "build",
"args": [],
"isBuildCommand": true,
"problemMatcher": [
{
"owner": "gulp",
"fileLocation": ["absolute"],
"pattern": {
"regexp": "^\\[[^>]* > ([^(]*)\\((\\d*),(\\d*)\\): (error) (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
{
"owner": "gulp",
"fileLocation": ["relative", "${workspaceRoot}/src/"],
"pattern": {
"regexp": "^\\([a-z\\-]*\\) ([^\\[]*)\\[([\\d]*), ([\\d]*)\\]: (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 1,
"message": 4
}
}
]
}
]
}