analyzeFiles method
Analyzes the given files. By default invokes analyzeFile for every file. Implementations may override to optimize for batch analysis.
Implementation
Future<void> analyzeFiles({
required AnalysisContext analysisContext,
required List<String> paths,
}) async {
final pathSet = paths.toSet();
// First analyze priority files.
for (final path in priorityPaths) {
pathSet.remove(path);
await analyzeFile(
analysisContext: analysisContext,
path: path,
);
}
// Then analyze the remaining files.
for (final path in pathSet) {
await analyzeFile(
analysisContext: analysisContext,
path: path,
);
}
}