check method
void
check(
- DcqRegistry registry
)
Implementation
@override
void check(
DcqRegistry registry,
) {
registry.addMethodInvocation((node) {
final methodName = node.methodName.name;
if (methodName != 'read') return;
final target = node.realTarget;
if (target == null) return;
final type = target.staticType;
if (type is! InterfaceType || !isRefType(type)) return;
final enclosingMethod = _findEnclosingMethod(node);
if (enclosingMethod == null) return;
if (enclosingMethod.name.lexeme != 'build') return;
reportAtNode(node);
});
}