kconfig: Warn if help text is blank
[carl9170fw.git] / config / zconf.y
index 1aa9859726b365f732787d54d350d560c8a94f1a..02c8550147e5694a0b6773ae587f51bc18626bc1 100644 (file)
@@ -436,6 +436,12 @@ help: help_start T_HELPTEXT
                zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used",
                           current_entry->sym->name ?: "<choice>");
        }
+
+       /* Is the help text empty or all whitespace? */
+       if ($2[strspn($2, " \f\n\r\t\v")] == '\0')
+               zconfprint("warning: '%s' defined with blank help text",
+                          current_entry->sym->name ?: "<choice>");
+
        current_entry->help = $2;
 };