masqmail
diff misc/are-options-documented @ 140:867bb186a829
added a script that checks the documentation coverage of config options
author | meillo@marmaro.de |
---|---|
date | Tue, 06 Jul 2010 17:43:31 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/misc/are-options-documented Tue Jul 06 17:43:31 2010 +0200 1.3 @@ -0,0 +1,21 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# checks if all recognized options are documented 1.7 +# run from masqmail's repository root dir 1.8 +# 1.9 +# Note: this script is far from perfect, but its development time to 1.10 +# usage value ratio is quite good :-) 1.11 + 1.12 +docs="/tmp/masqmail-opts-docs.$$" 1.13 +code="/tmp/masqmail-opts-code.$$" 1.14 + 1.15 +cat man/masqmail.*.5 | grep -o '^\\fB[^(\\]*\\f.' | 1.16 + egrep -v 'OBSOLETE|http://' | sed 's,^\\fB,,; s,[\\ =].*,,' | 1.17 + sort -u | grep -v '^val$' >"$docs" 1.18 + 1.19 +cat src/conf.c | grep 'lval,.*"' | 1.20 + sed 's,[^"]*",,; s,"\, [0-9]*,",; s,".*,,' | sort -u >"$code" 1.21 + 1.22 +diff -U 0 "$code" "$docs" | grep -v '^@@' 1.23 + 1.24 +rm -f "$docs" "$code"