errors method
Implementation
Future<List<(String, List<AnalysisError>)>> errors() async {
final root = await rootOf(rootPath);
await analyzer.initialize(root: root.path);
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();
}