From 7477cd17d5bf6dc00332c3011bc775e803119631 Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Mon, 16 Sep 2024 11:29:03 -0700 Subject: [PATCH 1/6] contribute just the problem matcher itself --- package.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/package.json b/package.json index ab0f4b1bb82d..35e863bbaa15 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,31 @@ "browser": "./dist/extension.browser.js", "l10n": "./l10n", "contributes": { + "problemMatchers": + [ + { + "name": "pythonCustomMatcher", + "owner": "python", + "source": "python", + "fileLocation": "autoDetect", + "pattern": [ + { + "regexp": "^.*File \\\"([^\\\"]|.*)\\\", line (\\d+).*", + "file": 1, + "line": 2, + "severity": 4, + "message": 5 + }, + { + "regexp": "^.*raise.*$" + }, + { + "regexp": "^\\s*(.*)\\s*$", + "message": 1 + } + ] + } + ], "walkthroughs": [ { "id": "pythonWelcome", From 27aea01a29b92209137db1ad6e55d94a1aba1019 Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Mon, 16 Sep 2024 12:57:12 -0700 Subject: [PATCH 2/6] problem show up in different error types, but not right messages for all --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 35e863bbaa15..ec8b9ddd5dae 100644 --- a/package.json +++ b/package.json @@ -95,9 +95,11 @@ "severity": 4, "message": 5 }, + { - "regexp": "^.*raise.*$" + "regexp": "^.*\\S.*$" }, + { "regexp": "^\\s*(.*)\\s*$", "message": 1 From f2251b8e204b0ddbae8f3c8759b92e933020e056 Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Mon, 16 Sep 2024 13:38:33 -0700 Subject: [PATCH 3/6] show correct messages, but only for the very first task --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ec8b9ddd5dae..3eed06d2e694 100644 --- a/package.json +++ b/package.json @@ -95,13 +95,12 @@ "severity": 4, "message": 5 }, - { - "regexp": "^.*\\S.*$" - }, + "regexp": "^\\s*(.*)\\s*$" + }, { - "regexp": "^\\s*(.*)\\s*$", + "regexp": "\\s*(.*Error.*)$", "message": 1 } ] From 54c4880256ad0ee6788bf9035584e2dadafcec27 Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Mon, 16 Sep 2024 14:29:47 -0700 Subject: [PATCH 4/6] Rename pythonCustomMatcher to python --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3eed06d2e694..d38df0f13ace 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "problemMatchers": [ { - "name": "pythonCustomMatcher", + "name": "python", "owner": "python", "source": "python", "fileLocation": "autoDetect", From 832d73aa49892c6e792b0c2032af92c0f365b352 Mon Sep 17 00:00:00 2001 From: Anthony Kim <62267334+anthonykim1@users.noreply.github.com> Date: Tue, 17 Sep 2024 00:44:30 -0400 Subject: [PATCH 5/6] Update package.json Co-authored-by: Karthik Nadig --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d38df0f13ace..b9287251b5f0 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ }, { - "regexp": "\\s*(.*Error.*)$", + "regexp": "^\\s*(.*Error.*)$", "message": 1 } ] From 472103b35af61f8a48638c13521d07b05be908e1 Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Mon, 16 Sep 2024 21:56:15 -0700 Subject: [PATCH 6/6] remove unncessary --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index b9287251b5f0..085eaf694718 100644 --- a/package.json +++ b/package.json @@ -91,9 +91,7 @@ { "regexp": "^.*File \\\"([^\\\"]|.*)\\\", line (\\d+).*", "file": 1, - "line": 2, - "severity": 4, - "message": 5 + "line": 2 }, { "regexp": "^\\s*(.*)\\s*$"