errors method
Implementation
Future<List<(String, List<AnalysisError>)>> errors() async {
await analyzer.initialize(root: rootPath);
final mapped = <String, List<AnalysisError>>{};
for (final error in await analyzer.errors(rootPath)) {
final path = fs.path.relative(error.source.fullName);
mapped.putIfAbsent(path, () => []).add(error);
}
return mapped.entries.map((e) => (e.key, e.value)).toList();
}