problemMatcher.ts ×8

Frontier kind: Code frontier

unlabeled · c_98ed14d44b93

8 tests · 12393 LOC · 50 files · introduces 0 tests · 27 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges27 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1198 ranges12393 lines · 50 files · Browse complete extent
All tests (intent)
8 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 27 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/tasks/common/problemMatcher.ts 27 introduced LOC · 8 ranges

Open complete file

304
305 export function createLineMatcher(matcher: ProblemMatcher, fileService?: IFileService, logService?: ILogService): ILineMatcher {
306 > const pattern = matcher.pattern; problemMatcher.ts
307 > if (Array.isArray(pattern)) {
308 return new MultiLineMatcher(matcher, fileService, logService);
309 > } else { problemMatcher.ts
310 > return new SingleLineMatcher(matcher, fileService, logService);
311 > }
312 > }
313
314 const endOfLine: string = Platform.OS === Platform.OperatingSystem.Windows ? '\r\n' : '\n';
320
321 constructor(matcher: ProblemMatcher, fileService?: IFileService, logService?: ILogService) {
322 > this.matcher = matcher; problemMatcher.ts
323 > this.fileService = fileService;
324 > this.logService = logService;
325 > }
326
327 public handle(lines: string[], start: number = 0): IHandleResult {
336
337 protected regexpExec(regexp: RegExp, line: string): RegExpExecArray | null {
338 > const start = Date.now(); problemMatcher.ts
339 > const result = regexp.exec(line);
340 > const elapsed = Date.now() - start;
341 > if (elapsed > 5) {
342 this.logService?.trace(`ProblemMatcher: slow regexp took ${elapsed}ms to execute`, regexp.source);
343 }
344 > return result; problemMatcher.ts
345 > }
346
347 protected fillProblemData(data: IProblemData | undefined, pattern: IProblemPattern, matches: RegExpExecArray): data is IProblemData {
497
498 constructor(matcher: ProblemMatcher, fileService?: IFileService, logService?: ILogService) {
499 > super(matcher, fileService, logService); problemMatcher.ts
500 > this.pattern = <IProblemPattern>matcher.pattern;
501 > }
502
503 public get matchLength(): number {
506
507 public override handle(lines: string[], start: number = 0): IHandleResult {
508 > Assert.ok(lines.length - start === 1); problemMatcher.ts
509 > const data: IProblemData = Object.create(null);
510 > if (this.pattern.kind !== undefined) {
511 > data.kind = this.pattern.kind;
512 > }
513 > const matches = this.regexpExec(this.pattern.regexp, lines[start]);
514 > if (matches) {
515 this.fillProblemData(data, this.pattern, matches);
516 if (data.kind === ProblemLocationKind.Location && !data.location && !data.line && data.file) {
523 }
524 return { match: null, continue: false };
526
527 public override next(line: string): IProblemMatch | null {