aboutsummaryrefslogtreecommitdiff
path: root/scripts/checkhelp.awk
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-04 11:38:33 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-04 11:38:33 +0000
commitf74adcd952df1a78bda8a11000ed7283338fa307 (patch)
tree673ba15680a0f72ef17c0a84940bc0430f205912 /scripts/checkhelp.awk
parent3deb55b80e36df0a009838de476e908a038c3176 (diff)
downloadbusybox-w32-f74adcd952df1a78bda8a11000ed7283338fa307.tar.gz
busybox-w32-f74adcd952df1a78bda8a11000ed7283338fa307.tar.bz2
busybox-w32-f74adcd952df1a78bda8a11000ed7283338fa307.zip
- 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' git-svn-id: svn://busybox.net/trunk/busybox@14991 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-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 @@
1#!/usr/bin/awk -f
2# AWK script to check for missing help entries for config options
3#
4# Copyright (C) 2006 Bernhard Fischer
5#
6# This file is distributed under the terms and conditions of the
7# MIT/X public licenses. See http://opensource.org/licenses/mit-license.html
8# and notice http://www.gnu.org/licenses/license-list.html#X11License
9
10
11/^choice/ { is_choice = 1; }
12/^endchoice/ { is_choice = 0; }
13/^config/ {
14 pos++;
15 conf[pos] = $2;
16 file[pos] = FILENAME;
17 if (is_choice) {
18 help[pos] = 1; # do not warn about 'choice' config entries.
19 } else {
20 help[pos] = 0;
21 }
22}
23/^[[:space:]]*help[[:space:]]*$/ {
24 help[pos] = 1;
25}
26BEGIN {
27 pos = -1;
28 is_choice = 0;
29}
30END {
31 for (i = 0; i < pos; i++) {
32# printf("%s: help for #%i '%s' == %i\n", file[i], i, conf[i], help[i]);
33 if (help[i] == 0) {
34 printf("%s: No helptext for '%s'\n", file[i], conf[i]);
35 }
36 }
37}