fix(rules): group rule errors to trigger correct failure (#114)
This commit is contained in:
parent
b5d4698e5a
commit
0c30036c98
|
@ -57,7 +57,7 @@ export class SchemaRule implements RuleData, Visitor {
|
|||
if (filter(node)) {
|
||||
ctx.logger.debug({ item: node }, 'checking item');
|
||||
if (!check(node) && hasItems(check.errors)) {
|
||||
ctx.error(...Array.from(check.errors).map(friendlyError));
|
||||
errors.push(...check.errors.map(friendlyError));
|
||||
}
|
||||
} else {
|
||||
ctx.logger.debug({ errors: filter.errors, item: node }, 'skipping item');
|
||||
|
|
Loading…
Reference in New Issue