fix(rule): print failure message when errors are present
This commit is contained in:
parent
3291e0408e
commit
5160eaa93d
|
@ -191,7 +191,7 @@ export async function visitRules(ctx: VisitorContext, rules: Array<Rule>, data:
|
|||
const itemCopy = cloneDeep(item);
|
||||
const itemResult = await rule.visit(ctx, itemCopy);
|
||||
|
||||
if (itemResult.errors.length === 0) {
|
||||
if (itemResult.errors.length > 0) {
|
||||
ctx.logger.warn({ count: itemResult.errors.length, rule }, 'rule failed');
|
||||
ctx.mergeResult(itemResult);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue