analyzeProject method
Analyzes all files in the project.
Implementation
Future<ProjectAnalysisResult> analyzeProject() async {
if (!_initialized) {
throw StateError('Server not initialized');
}
final files = _sourceLoader.discoverDartFiles();
final fileResults = <String, List<Diagnostic>>{};
for (final file in files) {
fileResults[file] = await analyzeFile(file);
}
return ProjectAnalysisResult(
fileCount: files.length,
diagnostics: fileResults,
);
}