diff options
author | abs <abs> | 2000-01-05 12:54:31 +0000 |
---|---|---|
committer | abs <abs> | 2000-01-05 12:54:31 +0000 |
commit | e389763e47a7029e5138a5e1ae3bb62ff8a0d62d (patch) | |
tree | 4bc53d932e5bb69cfb6d023b85b51d593cabfa6c /pkgtools | |
parent | 5bb9674fe49d863d2dcbe97d990636e786a9996b (diff) | |
download | pkgsrc-e389763e47a7029e5138a5e1ae3bb62ff8a0d62d.tar.gz |
Check pkg/COMMENT a little more closely, and generate warnings on:
Leading/trailing whitespace
Trailing '.'
Leading '(a|an) ' (case insensitive)
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 18 | ||||
-rw-r--r-- | pkgtools/pkglint/pkg/COMMENT | 2 |
3 files changed, 17 insertions, 7 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 5265ea6ea01..c5fbbc87cbd 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.33 2000/01/03 15:21:45 abs Exp $ +# $NetBSD: Makefile,v 1.34 2000/01/05 12:54:31 abs Exp $ # -DISTNAME= pkglint-1.92 +DISTNAME= pkglint-1.93 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 8fa7223be55..080b5f17981 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -12,7 +12,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.21 2000/01/02 03:40:21 wiz Exp $ +# $NetBSD: pkglint.pl,v 1.22 2000/01/05 12:54:32 abs Exp $ # # This version contains some changes necessary for NetBSD packages # done by Hubert Feyrer <hubertf@netbsd.org> and @@ -269,14 +269,24 @@ sub checkdescr { print "OK: $file has $linecnt lines.\n" if ($verbose); } if ($longlines > 0) { - &perror("WARN: $i includes lines that exceed $maxchars{$file} ". - "characters."); + &perror("WARN: $file includes lines that exceed ". + "$maxchars{$file} characters."); } if ($tmp =~ /[\033\200-\377]/) { - &perror("WARN: pkg/DESCR includes iso-8859-1, or ". + &perror("WARN: $file includes iso-8859-1, or ". "other local characters. $file should be ". "plain ascii file."); } + if ($file eq 'pkg/COMMENT' && $tmp =~ /\.$/i) { + &perror("WARN: $file should not end with a '.' (period)."); + } + if ($file eq 'pkg/COMMENT' && $tmp =~ /^(a|an) /i) { + &perror("WARN: $file should not begin with '$1 '."); + } + if ($file eq 'pkg/COMMENT' && ($tmp =~ /^\s/ || $tmp =~ /\s\n$/)) { + &perror("WARN: $file should not not have any leading or ". + "trailing whitespace."); + } close(IN); } diff --git a/pkgtools/pkglint/pkg/COMMENT b/pkgtools/pkglint/pkg/COMMENT index 94309919a61..5c3cb824902 100644 --- a/pkgtools/pkglint/pkg/COMMENT +++ b/pkgtools/pkglint/pkg/COMMENT @@ -1 +1 @@ -A verifier for NetBSD package directory. +Verifier for NetBSD packages and complete pkgsrc tree |