From b59af57db6248c3d5deb2f2854fc7fe7583a1a8c Mon Sep 17 00:00:00 2001 From: Anthony Kim <62267334+anthonykim1@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:17:58 -0400 Subject: [PATCH] Contribute problem matcher (#24114) Resolves: https://github.com/microsoft/vscode-python/issues/3828 Breaking https://github.com/microsoft/vscode-python/pull/23953 down into two PR 1. problem matcher --> make sure to cover case where there is invalid strings printed before the Error (e.g. NameError or ValueError) 2. Whether we will replace 'Run In Terminal by contributing task with the problem matcher attached. --------- Co-authored-by: Karthik Nadig --- package.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/package.json b/package.json index ab0f4b1bb82d..085eaf694718 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,30 @@ "browser": "./dist/extension.browser.js", "l10n": "./l10n", "contributes": { + "problemMatchers": + [ + { + "name": "python", + "owner": "python", + "source": "python", + "fileLocation": "autoDetect", + "pattern": [ + { + "regexp": "^.*File \\\"([^\\\"]|.*)\\\", line (\\d+).*", + "file": 1, + "line": 2 + }, + { + "regexp": "^\\s*(.*)\\s*$" + + }, + { + "regexp": "^\\s*(.*Error.*)$", + "message": 1 + } + ] + } + ], "walkthroughs": [ { "id": "pythonWelcome",