yanglint CHANGE allow setting features only on implemented (compiled) modules
diff --git a/tools/lint/commands.c b/tools/lint/commands.c
index 3c7cf01..d654579 100644
--- a/tools/lint/commands.c
+++ b/tools/lint/commands.c
@@ -1232,7 +1232,14 @@
         ++revision;
     }
 
-    module = ly_ctx_get_module(ctx, model_name, revision);
+    if (!revision) {
+        module = ly_ctx_get_module_implemented(ctx, model_name);
+    } else {
+        module = ly_ctx_get_module(ctx, model_name, revision);
+        if (module && !module->implemented) {
+            module = NULL;
+        }
+    }
 #if 0
     if (!module) {
         /* not a module, try to find it as a submodule */
@@ -1242,9 +1249,9 @@
 
     if (module == NULL) {
         if (revision) {
-            fprintf(stderr, "No (sub)module \"%s\" in revision %s found.\n", model_name, revision);
+            fprintf(stderr, "No implemented (sub)module \"%s\" in revision %s found.\n", model_name, revision);
         } else {
-            fprintf(stderr, "No (sub)module \"%s\" found.\n", model_name);
+            fprintf(stderr, "No implemented (sub)module \"%s\" found.\n", model_name);
         }
         goto cleanup;
     }
diff --git a/tools/lint/main_ni.c b/tools/lint/main_ni.c
index f3e955c..d7e0626 100644
--- a/tools/lint/main_ni.c
+++ b/tools/lint/main_ni.c
@@ -737,6 +737,10 @@
     /* enable specified features, if not specified, all the module's features are enabled */
     u = 4; /* skip internal libyang modules */
     while ((mod = ly_ctx_get_module_iter(ctx, &u))) {
+        if (!mod->implemented) {
+            continue;
+        }
+
         for (i = 0; i < featsize; i++) {
             if (!strcmp(feat[i], mod->name)) {
                 /* parse features spec */