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 {
var pathSet = paths.toSet();
// First analyze priority files.
for (var path in priorityPaths) {
if (pathSet.remove(path)) {
await analyzeFile(
analysisContext: analysisContext,
path: path,
);
}
}
// Then analyze the remaining files.
for (var path in pathSet) {
await analyzeFile(
analysisContext: analysisContext,
path: path,
);
}
}