1
0
Fork 0

fix(rules): group rule errors to trigger correct failure (#114)

This commit is contained in:
ssube 2019-11-02 10:58:07 -05:00 committed by Sean Sube
parent b5d4698e5a
commit 0c30036c98
1 changed files with 1 additions and 1 deletions

View File

@ -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');