From 96f0683974406055e98ff88af3b01327aae8ba61 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 30 Dec 2018 18:30:14 +0100 Subject: [PATCH] named multiline problem patterns are not parsed properly in vscode at the moment --- editors/code/package.json | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/editors/code/package.json b/editors/code/package.json index 93a1d6d0125..e0db3c337d0 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -147,6 +147,7 @@ }, "problemPatterns": [ { + "//comment": "named multiline problem patterns are not parsed properly in vscode at the moment, when fixed in vscode replace both \"pattern\": [...] below with \"pattern\": \"$rustc\"", "name": "rustc", "patterns": [ { @@ -171,7 +172,20 @@ "relative", "${workspaceRoot}" ], - "pattern": "$rustc" + "pattern": [ + { + "regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$", + "severity": 1, + "code": 2, + "message": 3 + }, + { + "regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$", + "file": 1, + "line": 2, + "column": 3 + } + ] }, { "name": "rustc-watch", @@ -183,7 +197,20 @@ "beginsPattern": "^\\[Running ", "endsPattern": "^(\\[Finished running\\]|To learn more, run the command again with --verbose\\.)$" }, - "pattern": "$rustc" + "pattern": [ + { + "regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$", + "severity": 1, + "code": 2, + "message": 3 + }, + { + "regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$", + "file": 1, + "line": 2, + "column": 3 + } + ] } ] }