pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint Fixed bug in checkline_trailing_white...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0eec4999b381
branches:  trunk
changeset: 488903:0eec4999b381
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Feb 11 17:01:29 2005 +0000

description:
Fixed bug in checkline_trailing_whitespace. No warnings were emitted
before. Stripped non-leading "." path components in the log messages.
Welcome to 4.01.

diffstat:

 pkgtools/pkglint/Makefile         |  4 ++--
 pkgtools/pkglint/files/pkglint.pl |  6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 7a0712eb83c5 -r 0eec4999b381 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Fri Feb 11 17:00:07 2005 +0000
+++ b/pkgtools/pkglint/Makefile Fri Feb 11 17:01:29 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.214 2005/02/05 15:39:44 wiz Exp $
+# $NetBSD: Makefile,v 1.215 2005/02/11 17:01:29 rillig Exp $
 #
 
-DISTNAME=      pkglint-4.00
+DISTNAME=      pkglint-4.01
 CATEGORIES=    pkgtools devel
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r 7a0712eb83c5 -r 0eec4999b381 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Fri Feb 11 17:00:07 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Feb 11 17:01:29 2005 +0000
@@ -11,7 +11,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.126 2004/12/27 18:19:48 wiz Exp $
+# $NetBSD: pkglint.pl,v 1.127 2005/02/11 17:01:29 rillig Exp $
 #
 # This version contains lots of changes necessary for NetBSD packages
 # done by Hubert Feyrer <hubertf%netbsd.org@localhost>,
@@ -82,7 +82,9 @@
 {
        my ($file, $lineno, $type, $message) = @_;
        if ($file ne NO_FILE) {
+               # strip "." path components
                $file =~ s,^(?:\./)+,,;
+               $file =~ s,/(?:\./)+,/,g;
        }
        if ($file eq NO_FILE) {
                printf("%s: %s\n", $type, $message);
@@ -662,7 +664,7 @@
 
 sub checkline_trailing_whitespace($) {
        my ($line) = @_;
-       if ($line =~ /\s+$/) {
+       if ($line->text =~ /\s+$/) {
                log_warning($line->file, $line->lineno, "Trailing white space.");
        }
        return true;



Home | Main Index | Thread Index | Old Index