Skip to content

Commit 1d1c04d

Browse files
rkeithhilldaviwil
authored andcommitted
Add Pester problem matcher to pkg,json.
1 parent f4371fd commit 1d1c04d

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

examples/.vscode/tasks.json

+1-18
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,7 @@
8787
"Write-Host 'Invoking Pester...'; Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true};",
8888
"Invoke-Command { Write-Host 'Completed Test task in task runner.' }"
8989
],
90-
"problemMatcher": [
91-
{
92-
"owner": "powershell",
93-
"fileLocation": ["absolute"],
94-
"severity": "error",
95-
"pattern": [
96-
{
97-
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
98-
"message": 1
99-
},
100-
{
101-
"regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$",
102-
"file": 1,
103-
"line": 2
104-
}
105-
]
106-
}
107-
]
90+
"problemMatcher": "$pesterError"
10891
}
10992
]
11093
}

package.json

+19
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,25 @@
155155
}
156156
]
157157
},
158+
"problemMatchers": [
159+
{
160+
"name": "pesterError",
161+
"owner": "powershell",
162+
"fileLocation": ["absolute"],
163+
"severity": "error",
164+
"pattern": [
165+
{
166+
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
167+
"message": 1
168+
},
169+
{
170+
"regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$",
171+
"file": 1,
172+
"line": 2
173+
}
174+
]
175+
}
176+
],
158177
"snippets": [
159178
{
160179
"language": "powershell",

0 commit comments

Comments
 (0)