parse method
Implementation
AnalyzeResult? parse(String logLine) {
final match = _regex.firstMatch(logLine);
if (match == null) {
return null;
}
final severity = Severity.values.byName(match.group(1)!.toLowerCase());
final type = match.group(2)!;
final errorCode = match.group(3)!;
final filePath = p.relative(match.group(4)!);
final line = int.parse(match.group(5)!);
final column = int.parse(match.group(6)!);
final length = int.parse(match.group(7)!);
final errorMessage = match.group(8)!;
return AnalyzeResult(
severity: severity,
type: type,
errorCode: errorCode,
filePath: filePath,
line: line,
column: column,
length: length,
errorMessage: errorMessage,
);
}