reportAtToken method
Diagnostic?
reportAtToken(})
inherited
Reports a diagnostic at token, with message arguments and
contextMessages.
The arguments are interpolated into the DiagnosticCode.problemMessage
and DiagnosticCode.correctionMessage text. If present, the first
argument (at position 0) replaces each instance of {0}, the second
argument (at position 1) replaces each instance of {1}, etc.
Implementation
@override
Diagnostic? reportAtToken(
Token token, {
List<Object> arguments = const [],
List<DiagnosticMessage>? contextMessages,
}) {
if (_isDisabled()) return null;
if (_isIgnored(token.offset)) return null;
IgnoreTracker.instance.recordReport(name, token.offset);
return super.reportAtToken(
token,
arguments: arguments,
contextMessages: contextMessages,
);
}