lintian: r1067 - in trunk: checks debian testset testset/cdbs-test/debian
Author: rra
Date: 2007-12-08 07:10:46 +0100 (Sat, 08 Dec 2007)
New Revision: 1067
Modified:
trunk/checks/changelog-file
trunk/checks/changelog-file.desc
trunk/debian/changelog
trunk/testset/cdbs-test/debian/changelog
trunk/testset/tags.cdbs-test
trunk/testset/tags.dh-test
Log:
+ [RA] If this looks like a new package (Debian revision of -1 and
only one changelog entry), warn if it doesn't close a bug. Thanks,
Margarita Manterola. (Closes: #356051)
+ [RA] Check for lines over 80 columns in the most recent entry.
Thanks, Guillem Jover. (Closes: #435963)
Modified: trunk/checks/changelog-file
===================================================================
--- trunk/checks/changelog-file 2007-12-08 05:23:28 UTC (rev 1066)
+++ trunk/checks/changelog-file 2007-12-08 06:10:46 UTC (rev 1067)
@@ -307,11 +307,22 @@
# Some checks should only be done against the most recent changelog entry.
if (@entries) {
- my $entry = $entries[0]->Changes;
- while ($entry =~ /(closes\s*(?:bug)?\#?\s?\d{6,})[^\w]/ig) {
+ my $entry = $entries[0];
+ if (@entries == 1 and $entry->Version =~ /-1$/) {
+ tag 'new-package-should-close-itp-bug'
+ unless @{ $entry->Closes };
+ }
+ my $changes = $entry->Changes;
+ while ($changes =~ /(closes\s*(?:bug)?\#?\s?\d{6,})[^\w]/ig) {
tag "possible-missing-colon-in-closes", "$1" if $1;
}
- spelling_check('spelling-error-in-changelog', $entry);
+ spelling_check('spelling-error-in-changelog', $changes);
+ my @lines = split ('\n', $changes);
+ for my $i (0 .. $#lines) {
+ if (length ($lines[$i]) > 80 && $lines[$i] =~ /\s/) {
+ tag 'debian-changelog-line-too-long', "line " . ($i + 1);
+ }
+ }
}
# read the changelog itself
Modified: trunk/checks/changelog-file.desc
===================================================================
--- trunk/checks/changelog-file.desc 2007-12-08 05:23:28 UTC (rev 1066)
+++ trunk/checks/changelog-file.desc 2007-12-08 06:10:46 UTC (rev 1067)
@@ -205,3 +205,21 @@
Info: Lintian found a spelling error in the latest entry of the
NEWS.Debian file. Lintian has a list of common misspellings that it
looks for. It does not have a dictionary like a spelling checker does.
+
+Tag: new-package-should-close-itp-bug
+Type: warning
+Info: This package appears to be the first packaging of a new upstream
+ software package (there is only one changelog entry and the Debian
+ revision is 1), but it does not close any bugs. The initial upload of a
+ new package should close the corresponding ITP bug for that package.
+ .
+ This warning can be ignored if the package is not intended for Debian or
+ if it is a split of an existing Debian package.
+Ref: devref 5.1
+
+Tag: debian-changelog-line-too-long
+Type: warning
+Info: The given line of the latest changelog entry is over 80 columns.
+ Such changelog entries may look poor in terminal windows and mail
+ messages and be annoying to read. Please wrap changelog entries at 80
+ columns or less where possible.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-12-08 05:23:28 UTC (rev 1066)
+++ trunk/debian/changelog 2007-12-08 06:10:46 UTC (rev 1067)
@@ -5,6 +5,11 @@
* checks/changelog-file{.desc,}:
+ [RA] Check the latest entry of the Debian changelog and any
NEWS.Debian file for common spelling errors. (Closes: #36017)
+ + [RA] If this looks like a new package (Debian revision of -1 and
+ only one changelog entry), warn if it doesn't close a bug. Thanks,
+ Margarita Manterola. (Closes: #356051)
+ + [RA] Check for lines over 80 columns in the most recent entry.
+ Thanks, Guillem Jover. (Closes: #435963)
* checks/copyright-file{.desc,}:
+ [RA] Moved spelling-error-in-copyright check to here.
* checks/debconf:
Modified: trunk/testset/cdbs-test/debian/changelog
===================================================================
--- trunk/testset/cdbs-test/debian/changelog 2007-12-08 05:23:28 UTC (rev 1066)
+++ trunk/testset/cdbs-test/debian/changelog 2007-12-08 06:10:46 UTC (rev 1067)
@@ -1,6 +1,6 @@
cdbs-test (1-1~bpo40+1) unstable; urgency=low
- * Backport.
+ * Backport, but for some reason I go on and on for longer than 80 columns thus making the entry annoying to read.
-- Russ Allbery <rra@debian.org> Wed, 05 Dec 2007 17:23:59 -0800
Modified: trunk/testset/tags.cdbs-test
===================================================================
--- trunk/testset/tags.cdbs-test 2007-12-08 05:23:28 UTC (rev 1066)
+++ trunk/testset/tags.cdbs-test 2007-12-08 06:10:46 UTC (rev 1067)
@@ -4,3 +4,4 @@
I: cdbs-test source: package-lacks-versioned-build-depends-on-debhelper 5
W: cdbs-test source: native-package-with-dash-version
W: cdbs-test source: package-has-a-duplicate-build-relation cdbs, cdbs
+W: cdbs-test: debian-changelog-line-too-long line 1
Modified: trunk/testset/tags.dh-test
===================================================================
--- trunk/testset/tags.dh-test 2007-12-08 05:23:28 UTC (rev 1066)
+++ trunk/testset/tags.dh-test 2007-12-08 06:10:46 UTC (rev 1067)
@@ -8,5 +8,6 @@
W: dh-test source: native-package-with-dash-version
W: dh-test source: out-of-date-standards-version 3.6.2 (current is 3.7.3)
W: dh-test source: package-uses-deprecated-debhelper-compat-version 3
+W: dh-test: new-package-should-close-itp-bug
W: dh-test: readme-debian-is-debmake-template
W: dh-test: wrong-bug-number-in-closes l3:#nnnn
Reply to: