analyzeFile method
Future<void>
analyzeFile({
- required AnalysisContext analysisContext,
- required String path,
override
Analyzes the given file.
Implementation
@override
Future<void> analyzeFile({
required AnalysisContext analysisContext,
required String path,
}) async {
if (options == null) {
return;
}
try {
final context = analysisContext as DriverBasedAnalysisContext;
final errors = await getErrors(options!, context, path);
channel.sendNotification(
plugin.AnalysisErrorsParams(
path,
errors,
).toNotification(),
);
} on Exception catch (e, s) {
channel.sendNotification(plugin.PluginErrorParams(
false,
'ErrorResult ${e.toString()}',
s.toString(),
).toNotification());
}
}