check method
Implementation
@override
void check(
DcqRegistry registry,
) {
registry.addMethodInvocation((node) {
if (node.methodName.name != 'reduce') return;
final target = node.target;
if (target == null) return;
final targetType = target.staticType;
if (targetType is! InterfaceType) return;
if (!_isIterableType(targetType)) return;
if (_hasEmptinessGuard(node, target)) return;
reportAtNode(node.methodName);
});
}