reportAtOffset method

  1. @override
Diagnostic reportAtOffset(
  1. int offset,
  2. int length, {
  3. List<Object> arguments = const [],
  4. List<DiagnosticMessage>? contextMessages,
})
inherited

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