summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-01-31 10:34:30 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-03 00:02:19 +0900
commit1b9eda2e4892cb373c7d4cf23439f357c8739e27 (patch)
tree814481882c1c1f64b30dec7caef8a256d1824bcb /scripts/kconfig
parente1916031369a60c935c6957a47618d304a9df9de (diff)
downloadlinux-1b9eda2e4892cb373c7d4cf23439f357c8739e27.tar.bz2
kconfig: Warn if help text is blank
Blank help texts are probably either a typo, a Kconfig misunderstanding, or some kind of half-committing to adding a help text (in which case a TODO comment would be clearer, if the help text really can't be added right away). Best to flag them, IMO. Example warning: drivers/mmc/host/Kconfig:877: warning: 'MMC_TOSHIBA_PCI' defined with blank help text Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/zconf.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 21ce883e5d9e..4be98050b961 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -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;
};