Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-04 15:38:33 +0400
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-04 15:38:33 +0400
commit3916b2a560cadab2a6e97aff0d170ec4de88f0ab (patch)
tree673ba15680a0f72ef17c0a84940bc0430f205912 /scripts/checkhelp.awk
parent7c94bed2345008b4b62014a846488319a7af0727 (diff)
- add script to check for missing help entries of config options
Currently we have these errors: ./modutils/Config.in: No helptext for 'CONFIG_FEATURE_QUERY_MODULE_INTERFACE' ./networking/Config.in: No helptext for 'CONFIG_IPADDR' ./networking/Config.in: No helptext for 'CONFIG_IPLINK' ./networking/Config.in: No helptext for 'CONFIG_IPROUTE' ./networking/Config.in: No helptext for 'CONFIG_IPTUNNEL' ./coreutils/Config.in: No helptext for 'CONFIG_UNIX2DOS'
Diffstat (limited to 'scripts/checkhelp.awk')
-rwxr-xr-xscripts/checkhelp.awk37
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/checkhelp.awk b/scripts/checkhelp.awk
new file mode 100755
index 000000000..1a7e0ea8e
--- /dev/null
+++ b/scripts/checkhelp.awk
@@ -0,0 +1,37 @@
+#!/usr/bin/awk -f
+# AWK script to check for missing help entries for config options
+#
+# Copyright (C) 2006 Bernhard Fischer
+#
+# This file is distributed under the terms and conditions of the
+# MIT/X public licenses. See http://opensource.org/licenses/mit-license.html
+# and notice http://www.gnu.org/licenses/license-list.html#X11License
+
+
+/^choice/ { is_choice = 1; }
+/^endchoice/ { is_choice = 0; }
+/^config/ {
+ pos++;
+ conf[pos] = $2;
+ file[pos] = FILENAME;
+ if (is_choice) {
+ help[pos] = 1; # do not warn about 'choice' config entries.
+ } else {
+ help[pos] = 0;
+ }
+}
+/^[[:space:]]*help[[:space:]]*$/ {
+ help[pos] = 1;
+}
+BEGIN {
+ pos = -1;
+ is_choice = 0;
+}
+END {
+ for (i = 0; i < pos; i++) {
+# printf("%s: help for #%i '%s' == %i\n", file[i], i, conf[i], help[i]);
+ if (help[i] == 0) {
+ printf("%s: No helptext for '%s'\n", file[i], conf[i]);
+ }
+ }
+}