in src/main.ts [45:68]
function parseOutputLines(output: string, regex: RegExp): Annotation[] {
let errors = output.split('\n');
let annotations: Annotation[] = [];
for (let i = 0; i < errors.length; i++) {
let error = errors[i];
let match = error.match(regex);
if (match) {
const groups = match.groups;
if (!groups) {
throw "No named capture groups in regex match.";
}
const annotation = makeAnnotation({
filename: groups.filename,
lineNumber: parseInt(groups.lineNumber),
columnNumber: parseInt(groups.columnNumber),
errorCode: groups.errorCode,
errorDesc: groups.errorDesc,
});
annotations.push(annotation);
}
}
return annotations;
}