check method

  1. @override
void check(
  1. DcqRegistry registry
)

Implementation

@override
void check(
  DcqRegistry registry,
) {
  registry.addVariableDeclarationList((node) {
    final type = node.type;
    if (type != null && type.toSource() == 'Object') {
      reportAtNode(type);
    }
  });

  registry.addMethodDeclaration((node) {
    final returnType = node.returnType;
    if (returnType != null && returnType.toSource() == 'Object') {
      reportAtNode(returnType);
    }
  });

  registry.addFunctionDeclaration((node) {
    final returnType = node.returnType;
    if (returnType != null && returnType.toSource() == 'Object') {
      reportAtNode(returnType);
    }
  });
}