Author: jue Date: 2006-09-24 12:27:34 +0200 (Sun, 24 Sep 2006) New Revision: 1932 Modified: tools/prt-utils/trunk/lib/prtverify/20_maintainer_email.awk Log: prtverify: extended test for the Maintainer-header Modified: tools/prt-utils/trunk/lib/prtverify/20_maintainer_email.awk =================================================================== --- tools/prt-utils/trunk/lib/prtverify/20_maintainer_email.awk 2006-09-24 10:26:15 UTC (rev 1931) +++ tools/prt-utils/trunk/lib/prtverify/20_maintainer_email.awk 2006-09-24 10:27:34 UTC (rev 1932) @@ -1,17 +1,25 @@ # # 20_maintainer_email.awk # -# Version 0.1.0 - 2006-09-02 +# Version 0.1.1 - 2006-09-11 # J�rgen Daubert <jue at jue dot li> # # Checks the Maintainer header for invalid characters +# and for the correct 'name, email at provider dot sth'. loglevel_ok(WARN) && FILENAME ~ PKGFILE { if ( $0 ~ ("^# Maintainer:") ) { + if ( p = match($0, /[<>@]+/) ) perror(WARN, "invalid email address: " substr($0, p)) + + else if ( $0 !~ /.*, .* at .* dot .*/ ) { + m = gensub(/^# Maintainer: */,"", "1") + if ( m !~ /^ *$/ ) + perror(WARN, "invalid Maintainer-header: " m) + } } }
participants (1)
-
crux@crux.nu