Skip to content

Commit 3962d23

Browse files
committed
yanglint UPDATE load schema-cmp module implicitl
1 parent c56c8c8 commit 3962d23

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎tools/lint/cmd_cmp.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ cmd_cmp_exec(struct ly_ctx **ctx, struct yl_opt *yo)
6565
const struct lys_module *mod1, *mod2;
6666
struct lyd_node *data = NULL;
6767

68+
/* load schema-comparison-output if needed */
69+
mod1 = ly_ctx_get_module_implemented(*ctx, "ietf-yang-schema-comparison-output");
70+
if (!mod1 && !ly_ctx_load_module(*ctx, "ietf-yang-schema-comparison-output", NULL, NULL)) {
71+
YLMSG_E("Unable to load \"ietf-yang-schema-comparison-output\".");
72+
rc = -1;
73+
goto cleanup;
74+
}
75+
6876
/* create the second context */
6977
if ((rc = cmp_ctx_dup(*ctx, yo, &ctx2))) {
7078
goto cleanup;

0 commit comments

Comments
 (0)