yanglint BUGFIX enable all features if no specified
Clarify that this includes features in all
implemented modules, implement it that way.
Fixes #1719
diff --git a/tools/lint/cmd_load.c b/tools/lint/cmd_load.c
index 3da7553..a50e800 100644
--- a/tools/lint/cmd_load.c
+++ b/tools/lint/cmd_load.c
@@ -34,7 +34,7 @@
" them in searchpaths. if the <revision> of the module not\n"
" specified, the latest revision available is loaded.\n\n"
" -F FEATURES, --features=FEATURES\n"
- " Features to support, default all.\n"
+ " Features to support, default all in all implemented modules.\n"
" <modname>:[<feature>,]*\n"
" -i, --make-implemented\n"
" Make the imported modules \"referenced\" from any loaded\n"
@@ -94,6 +94,11 @@
goto cleanup;
}
+ if (!fset.count) {
+ /* no features, enable all of them */
+ options_ctx |= LY_CTX_ENABLE_IMP_FEATURES;
+ }
+
if (options_ctx) {
ly_ctx_set_options(*ctx, options_ctx);
}