check method
Implementation
@override
void check(
DcqRegistry registry,
) {
registry.addMethodInvocation((node) {
final methodName = node.methodName.name;
if (methodName != 'watch') return;
final target = node.realTarget;
if (target == null) return;
final enclosingMethod = _findEnclosingMethod(node);
if (enclosingMethod != null && enclosingMethod.name.lexeme == 'build') {
return;
}
reportAtNode(node);
});
}