check method
Implementation
@override
void check(
DcqRegistry registry,
) {
final acceptableLevel = configInt(ruleConfig, 'acceptable-level') ?? 1;
registry.addConditionalExpression((node) {
if (_isNestedInConditional(node)) return;
final depth = _maxDepth(node);
if (depth > acceptableLevel) {
reportAtNode(node);
}
});
}