diff options
author | abs <abs@pkgsrc.org> | 2000-01-05 12:54:31 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2000-01-05 12:54:31 +0000 |
commit | 88caa31ada8ee60fdab463d2532bddd845fc82fe (patch) | |
tree | 4bc53d932e5bb69cfb6d023b85b51d593cabfa6c /pkgtools/pkglint | |
parent | 11cd40adff9f0acf4e84817be592baaa400e2a7b (diff) | |
download | pkgsrc-88caa31ada8ee60fdab463d2532bddd845fc82fe.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/pkglint')
-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 |