Added check for documentation in source code
authorDavid Schleef <ds@schleef.org>
Wed, 12 Sep 2001 22:45:01 +0000 (22:45 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 12 Sep 2001 22:45:01 +0000 (22:45 +0000)
comedi/drivers/check_driver

index 1fb234dbf139b12daefc2e00e6c1f3ed46ecdea4..c91ec74e4936be2505b40d82cf828c0c67af6e5a 100755 (executable)
@@ -282,6 +282,18 @@ else
        echo "E: not documented in drivers.txt"
 fi
 
+# Drivers should have documentation in the source
+if grep "^Driver: ${basedriver}.o$" $driver &>/dev/null;then
+       echo "documentation in source"
+       if grep "^Devices:" $driver &>/dev/null;then
+               echo "has devices documentation"
+       else
+               echo "E: documentation: no Devices:"
+       fi
+else
+       echo "E: not documented in source"
+fi
+
 # Check that the config option is in Config.in
 if grep "dep_tristate.* ${config} \$CONFIG_COMEDI" ../Config.in &>/dev/null;then
        echo "config option in Config.in"
@@ -300,7 +312,7 @@ if [ -f "${basedriver}.o" ];then
        echo "number of global symbols: $n_syms"
        n_xsyms=$(nm ${basedriver}.o |grep -c ' __ksymtab')
        echo "number of exported symbols: $n_xsyms"
-       if [ $(($n_syms-$n_xsyms)) -gt 3 ];then
+       if [ $(($n_syms-$n_xsyms)) -gt 2 ];then
                echo "W: driver leaks symbols"
        fi
 fi