Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/problem-matcher > IProblemMatcher

IProblemMatcher interface

A problem matcher processes one line at a time and returns an IProblem if a match occurs.

Signature:

export interface IProblemMatcher 

Remarks

Multi-line matchers may keep internal state and emit on a later line; they can also optionally implement flush() to emit any buffered problems when the stream closes.

Properties

Property

Modifiers

Type

Description

name

readonly

string

A friendly (and stable) name identifying the matcher.

Methods

Method

Description

exec(line)

Attempt to match a problem for the provided line of console output.

flush()?

(Optional) Flush any buffered state and return additional problems. Optional.