diff options
author | rillig <rillig> | 2006-03-02 19:47:03 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-03-02 19:47:03 +0000 |
commit | 1250bd879965541698e9fc8b31f96135aa3cea8f (patch) | |
tree | 4fb693695aa7d022004245b53fe451f6feefc4d8 /pkgtools | |
parent | e6b1cc2a90c9594797bc5c96e3103c32798d028c (diff) | |
download | pkgsrc-1250bd879965541698e9fc8b31f96135aa3cea8f.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.
Diffstat (limited to 'pkgtools')
-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)); |