check method
Implementation
@override
void check(
DcqRegistry registry,
) {
registry.addIfStatement((node) {
final condition = node.expression;
final name = _getNullCheckedName(condition);
if (name == null) return;
final thenBody = node.thenStatement;
final finder = _ReferenceFinder(name);
thenBody.accept(finder);
if (finder.found) return;
reportAtNode(node.expression);
});
}