From 412e36ab0f49d43602cf5536a0d9e48b15ee06bb Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 12 Sep 2001 22:45:01 +0000 Subject: [PATCH] Added check for documentation in source code --- comedi/drivers/check_driver | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/comedi/drivers/check_driver b/comedi/drivers/check_driver index 1fb234db..c91ec74e 100755 --- a/comedi/drivers/check_driver +++ b/comedi/drivers/check_driver @@ -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 -- 2.26.2