From 1101029851031b4cc6344f756bebb2b92625ed1a Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 12 Apr 2018 11:37:42 +0200 Subject: [PATCH] Fixes #47652: Custom problem matcher "kind": "file" doesn't matches --- src/vs/workbench/parts/tasks/common/problemMatcher.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/tasks/common/problemMatcher.ts b/src/vs/workbench/parts/tasks/common/problemMatcher.ts index 5a137c0ad71..9ff40a2baf6 100644 --- a/src/vs/workbench/parts/tasks/common/problemMatcher.ts +++ b/src/vs/workbench/parts/tasks/common/problemMatcher.ts @@ -302,6 +302,9 @@ abstract class AbstractLineMatcher implements ILineMatcher { } private getLocation(data: ProblemData): Location { + if (data.kind === ProblemLocationKind.File) { + return this.createLocation(0, 0, 0, 0); + } if (data.location) { return this.parseLocationInfo(data.location); } @@ -383,7 +386,7 @@ class SingleLineMatcher extends AbstractLineMatcher { public handle(lines: string[], start: number = 0): HandleResult { Assert.ok(lines.length - start === 1); let data: ProblemData = Object.create(null); - if (this.pattern.kind) { + if (this.pattern.kind !== void 0) { data.kind = this.pattern.kind; } let matches = this.pattern.regexp.exec(lines[start]); -- GitLab