diff options
author | rillig <rillig@pkgsrc.org> | 2006-03-02 19:47:03 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-03-02 19:47:03 +0000 |
commit | b93decabd77112c9a54febc1ecbb358c4c00c27c (patch) | |
tree | 4fb693695aa7d022004245b53fe451f6feefc4d8 | |
parent | 3d4751d0c7e50ca3dd20f3c5a2ec587fd18c9dd9 (diff) | |
download | pkgsrc-b93decabd77112c9a54febc1ecbb358c4c00c27c.tar.gz |
When in context diff mode, as soon as the add-hunk header is seen, the
number of deleted lines is irrelevant. This fixes one false positive.
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index d5a26d6d209..4b1fa9b22d3 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.542 2006/03/02 13:23:28 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.543 2006/03/02 19:47:03 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -4422,6 +4422,7 @@ sub checkfile_patch($) { $line->log_warning("Invalid number of deleted lines (${dellines})."); } }], [PST_CLD0, re_patch_cha, PST_CLA0, sub() { + $dellines = undef; $addlines = ($m->has(2)) ? (1 + $m->text(2) - $m->text(1)) : ($m->text(1)); |