pub struct Pattern {
code: Option<usize>,
column: Option<usize>,
end_column: Option<usize>,
end_line: Option<usize>,
file: Option<usize>,
kind: Option<String>,
line: Option<usize>,
location: Option<String>,
loop: Option<bool>,
message: Option<usize>,
regexp: String,
severity: Option<usize>,
}
Expand description
Struct for VSCode task’s problem matcher’s pattern.
Fields§
§code: Option<usize>
The match group index of the problem’s code. Defaults to undefined
column: Option<usize>
The match group index of the problem’s line character. Defaults to 3
end_column: Option<usize>
The match group index of the problem’s end line character. Defaults to undefined
end_line: Option<usize>
The match group index of the problem’s end line. Defaults to undefined
file: Option<usize>
The match group index of the filename. If omitted 1 is used.
kind: Option<String>
whether the pattern matches a location (file and line) or only a file.
line: Option<usize>
The match group index of the problem’s line. Defaults to 2
location: Option<String>
The match group index of the problem’s location. Valid location patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). If omitted (line,column) is assumed.
loop: Option<bool>
In a multi line matcher loop indicated whether this pattern is executed in a loop as long as it matches. Can only specified on a last pattern in a multi line pattern.
message: Option<usize>
The match group index of the message. If omitted it defaults to 4 if location is specified. Otherwise it defaults to 5.
regexp: String
The regular expression to find an error, warning or info in the output.
severity: Option<usize>
The match group index of the problem’s severity. Defaults to undefined
Implementations§
source§impl Pattern
impl Pattern
sourcepub fn builder(
) -> PatternBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder( ) -> PatternBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building Pattern
.
On the builder, call .code(...)
(optional), .column(...)
(optional), .end_column(...)
(optional), .end_line(...)
(optional), .file(...)
(optional), .kind(...)
(optional), .line(...)
(optional), .location(...)
(optional), .r#loop(...)
(optional), .message(...)
(optional), .regexp(...)
, .severity(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of Pattern
.