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

[SCM] Debian package checker branch, master, updated. 1.24.2-11-gcced3c4



The following commit has been merged in the master branch:
commit cced3c446428517dfff7cb09d9ade5cd07e6b1f2
Author: Russ Allbery <rra@debian.org>
Date:   Sun Jul 20 22:14:50 2008 -0700

    Limit the number of tags for long copyright lines and direct changes
    
    * checks/copyright-file:
      + [RA] Suppress warnings about long lines beyond the first five to cut
        down on volume from badly formatted files.
    * checks/patch-systems:
      + [RA] Combine all patch-system-but-direct-changes-in-diff instances
        into a single message to reduce the noise from packages that rebuild
        all auto-generated files outside the patch system.  Thanks, Julien
        Cristau.  (Closes: #491296)

diff --git a/checks/copyright-file b/checks/copyright-file
index b9edf10..cb2e175 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -154,13 +154,20 @@ close(IN);
 # file uses a non-UTF-8 encoding, this will mangle it, but it doesn't
 # matter for the length check.
 my @lines = split ("\n", decode ('utf-8', $_));
+my $longcount = 0;
 for my $i (0 .. $#lines) {
     if (length ($lines[$i]) > 80
 	and $lines[$i] !~ m/^[\s.o*+-]*\S+$/
 	and $lines[$i] !~ m/^[^:]+:\s+\S+$/) {
-	tag "debian-copyright-line-too-long", "line " . ($i + 1);
+	$longcount++;
+	tag "debian-copyright-line-too-long", "line " . ($i + 1)
+	    if ($longcount <= 5 or $ENV{LINTIAN_DEBUG});
     }
 }
+if ($longcount > 5) {
+    tag "debian-copyright-line-too-long", ($longcount - 5),
+	"more occurrences not shown";
+}
 
 my $wrong_directory_detected = 0;
 
diff --git a/checks/patch-systems b/checks/patch-systems
index 511a15d..6b00eca 100644
--- a/checks/patch-systems
+++ b/checks/patch-systems
@@ -174,16 +174,18 @@ sub run {
 			tag "more-than-one-patch-system";
 		}
 
+		my @direct;
 		open(STAT, '<', "diffstat") or fail("cannot open diffstat file: $!");
 		while (<STAT>) {
 			my ($file) = (m,^\s+(.*?)\s+\|,)
 			     or fail("syntax error in diffstat file: $_");
-
-			if ($file !~ /^debian/) {
-				tag "patch-system-but-direct-changes-in-diff", $file;
-			}
+			push (@direct, $file) if ($file !~ m,^debian/,);
 		}
 		close (STAT) or fail("error reading diffstat file: $!");
+		if (@direct) {
+			my $files = (@direct > 1) ? "$direct[0] and $#direct more" : $direct[0];
+			tag "patch-system-but-direct-changes-in-diff", $files;
+		}
 	}
 }
 
diff --git a/debian/changelog b/debian/changelog
index 419a5d6..e8579c3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
 lintian (1.24.3) unstable; urgency=low
 
-  * checks/copyright:
+  * checks/copyright-file:
     + [ADB,RA] Exclude header-like lines where the value has no whitespace
       when checking for long lines.  This will avoid false positives for
       the Format-Specification: line and similar cases.  Based on a patch
@@ -8,12 +8,19 @@ lintian (1.24.3) unstable; urgency=low
     + [ADB] Don't flag lines only containing one word as overly long.  They're
       likely to be URLs and may not be easily shortenable to under 80
       characters.  (Closes: #491365)
+    + [RA] Suppress warnings about long lines beyond the first five to cut
+      down on volume from badly formatted files.
   * checks/debconf:
     + [ADB] Don't complain about unused debconf templates in udebs.
       (Closes: #491135)
   * checks/description:
     + [RA] Don't warn about a synopsis that ends in "etc."  Patch from
       Chris Lamb.  (Closes: #491252)
+  * checks/patch-systems:
+    + [RA] Combine all patch-system-but-direct-changes-in-diff instances
+      into a single message to reduce the noise from packages that rebuild
+      all auto-generated files outside the patch system.  Thanks, Julien
+      Cristau.  (Closes: #491296)
   * checks/po-debconf{,.desc}:
     + [ADB] Check that at least one complete translation exists.  Thanks Jordà
       Polo.
diff --git a/testset/copyright/debian/copyright.misc-errors b/testset/copyright/debian/copyright.misc-errors
index d4cbc95..12d8489 100644
--- a/testset/copyright/debian/copyright.misc-errors
+++ b/testset/copyright/debian/copyright.misc-errors
@@ -24,3 +24,14 @@ could make it appear to be if improperly decoded.
 
 The following line is too long, but may not be easily able to be shortened:
 http://foo.bar.baz.example.com/foobarmodule/someotherpath/which/is/really/rather/long/
+
+This one shouldn't get warnings either:
+Header: http://foo.bar.baz.example.com/foobarmodule/someotherpath/which/is/really/rather/long/
+
+Test suppression after five tags:
+This line is overly long. It should be less than 80 characters so that it fits nicely in an 80x25 terminal.
+This line is overly long. It should be less than 80 characters so that it fits nicely in an 80x25 terminal.
+This line is overly long. It should be less than 80 characters so that it fits nicely in an 80x25 terminal.
+This line is overly long. It should be less than 80 characters so that it fits nicely in an 80x25 terminal.
+This line is overly long. It should be less than 80 characters so that it fits nicely in an 80x25 terminal.
+This line is overly long. It should be less than 80 characters so that it fits nicely in an 80x25 terminal.
diff --git a/testset/tags.copyright b/testset/tags.copyright
index 72005ab..48a0c5e 100644
--- a/testset/tags.copyright
+++ b/testset/tags.copyright
@@ -17,6 +17,11 @@ W: copyright.iso-8859-1: debian-copyright-file-uses-obsolete-national-encoding a
 W: copyright.misc-errors: copyright-contains-dh-make-perl-boilerplate
 W: copyright.misc-errors: copyright-has-url-from-dh_make-boilerplate
 W: copyright.misc-errors: copyright-lists-upstream-authors-with-dh_make-boilerplate
+W: copyright.misc-errors: debian-copyright-line-too-long 2 more occurrences not shown
 W: copyright.misc-errors: debian-copyright-line-too-long line 20
+W: copyright.misc-errors: debian-copyright-line-too-long line 32
+W: copyright.misc-errors: debian-copyright-line-too-long line 33
+W: copyright.misc-errors: debian-copyright-line-too-long line 34
+W: copyright.misc-errors: debian-copyright-line-too-long line 35
 W: copyright.old-style: copyright-without-copyright-notice
 W: copyright.symlink: copyright-without-copyright-notice
diff --git a/testset/tags.diffs b/testset/tags.diffs
index b258eda..e600255 100644
--- a/testset/tags.diffs
+++ b/testset/tags.diffs
@@ -23,9 +23,7 @@ W: diffs source: configure-generated-file-in-source subdir-good/config.status
 W: diffs source: diff-contains-bzr-control-dir .bzr
 W: diffs source: diff-contains-cvs-conflict-copy .#binary.c.1.34
 W: diffs source: diff-contains-substvars debian/substvars
-W: diffs source: patch-system-but-direct-changes-in-diff .#binary.c.1.34
-W: diffs source: patch-system-but-direct-changes-in-diff .bzr/dummy
-W: diffs source: patch-system-but-direct-changes-in-diff binary.c~
+W: diffs source: patch-system-but-direct-changes-in-diff .#binary.c.1.34 and 2 more
 W: diffs: binary-without-manpage usr/bin/diffs
 W: diffs: possible-missing-colon-in-closes Closes #1239124
 W: diffs: possible-missing-colon-in-closes Closes 456712

-- 
Debian package checker


Reply to: