reportAtNode method

  1. @override
Diagnostic? reportAtNode(
  1. AstNode? node, {
  2. List<Object> arguments = const [],
  3. List<DiagnosticMessage>? contextMessages,
})
inherited

Reports a diagnostic at node 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? reportAtNode(
  AstNode? node, {
  List<Object> arguments = const [],
  List<DiagnosticMessage>? contextMessages,
}) {
  if (_isDisabled()) return null;
  if (node != null) {
    if (_isIgnored(node.offset)) return null;
    IgnoreTracker.instance.recordReport(name, node.offset);
  }
  return super.reportAtNode(
    node,
    arguments: arguments,
    contextMessages: contextMessages,
  );
}