reportAtPubNode method
      
void
reportAtPubNode(
    
- PubspecNode node, {
- required DiagnosticCode diagnosticCode,
- List<Object> arguments = const [],
- List<DiagnosticMessage> contextMessages = const [],
Reports diagnosticCode at Pubspec node, with message arguments and
contextMessages.
Implementation
void reportAtPubNode(
  PubspecNode node, {
  required DiagnosticCode diagnosticCode,
  List<Object> arguments = const [],
  List<DiagnosticMessage> contextMessages = const [],
}) {
  // Cache error and location info for creating `AnalysisErrorInfo`s.
  var error = Diagnostic.tmp(
    source: (node as PubspecNodeImpl).source,
    offset: node.span.start.offset,
    length: node.span.length,
    diagnosticCode: diagnosticCode,
    arguments: arguments,
    contextMessages: contextMessages,
  );
  _reporter.reportError(error);
}