[lintian] 01/01: Detect Close: #123456 instead of Closes: #123456
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit 6411ee62b923aa4d59253c43d7ffc7ca46fceb10
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Sun Oct 4 18:56:32 2015 +0200
Detect Close: #123456 instead of Closes: #123456
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
checks/changelog-file.desc | 7 +++++++
checks/changelog-file.pm | 4 ++++
debian/changelog | 2 ++
t/tests/changelog-file-general/debian/debian/changelog.in | 1 +
t/tests/changelog-file-general/tags | 7 ++++---
5 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc
index 057c4f2..5c3e593 100644
--- a/checks/changelog-file.desc
+++ b/checks/changelog-file.desc
@@ -367,6 +367,13 @@ Info: The last changelog entry refer to a debian revision that is not
consecutive to previous changelog entry. Please use consecutive Debian
revision or use UNRELEASED version.
+Tag: mispell-closes-bug
+Severity: normal
+Certainty: certain
+Ref: policy 5.6.22
+Info: The last changelog entry use Close: #123456 instead of correct
+ Closes: #123456
+
Tag: version-refers-to-distribution
Severity: minor
Certainty: certain
diff --git a/checks/changelog-file.pm b/checks/changelog-file.pm
index a83895b..05687ab 100644
--- a/checks/changelog-file.pm
+++ b/checks/changelog-file.pm
@@ -383,6 +383,10 @@ sub run {
}
}
+ if($changes =~ /Close:\s+(\#\d+)/xi) {
+ tag 'mispell-closes-bug',$1;
+ }
+
my $changesempty = $changes;
$changesempty =~ s,\W,,gms;
if (length($changesempty)==0) {
diff --git a/debian/changelog b/debian/changelog
index f4b7d0e..89f517d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ lintian (2.5.38) UNRELEASED; urgency=medium
arch-dependent-file-not-in-arch-specific-directory in Python debug
packages. Thanks to Matthias Klose for the bug report.
(Closes: #795275)
+ * checks/changelog-files.{desc,pm}:
+ + [BR] Detect mispelled Closes in changelog file (Closes: #798799)
* checks/files.{desc,pm}:
+ [AB] Apply patch by Mattia Rizzolo to also check for files in /build
and /tmp/buildd in dir-or-file-in-build-tree. (Closes: #797532)
diff --git a/t/tests/changelog-file-general/debian/debian/changelog.in b/t/tests/changelog-file-general/debian/debian/changelog.in
index f583b80..e3ce67f 100644
--- a/t/tests/changelog-file-general/debian/debian/changelog.in
+++ b/t/tests/changelog-file-general/debian/debian/changelog.in
@@ -10,6 +10,7 @@
* http://www.example.com/but-a-really-long-url-does-not-count-as-a-long-line-at-all
See http://www.example.com/but-a-really-long-url-does-not-count-as-a-long-line-at-all
even if preceded by See.
+ * Mispell Closes (Close: #666666)
* Here is another really long in the changelog, and it would be really nice if a
certain program would report its line number correctly. Especially since,
diff --git a/t/tests/changelog-file-general/tags b/t/tests/changelog-file-general/tags
index 194cd43..e7ae9df 100644
--- a/t/tests/changelog-file-general/tags
+++ b/t/tests/changelog-file-general/tags
@@ -2,11 +2,12 @@ E: changelog-file-general: debian-changelog-file-contains-invalid-email-address
E: changelog-file-general: possible-missing-colon-in-closes Closes #555555
W: changelog-file-general: changelog-not-compressed-with-max-compression changelog.Debian.gz
W: changelog-file-general: debian-changelog-file-contains-obsolete-user-emacs-settings
-W: changelog-file-general: debian-changelog-line-too-long line 14
+W: changelog-file-general: debian-changelog-line-too-long line 15
W: changelog-file-general: debian-changelog-line-too-long line 8
W: changelog-file-general: improbable-bug-number-in-closes 12
W: changelog-file-general: latest-debian-changelog-entry-without-new-date
W: changelog-file-general: latest-debian-changelog-entry-without-new-version
-W: changelog-file-general: syntax-error-in-debian-changelog line 30 "badly formatted heading line"
-W: changelog-file-general: syntax-error-in-debian-changelog line 32 "found change data where expected next heading or eof"
+W: changelog-file-general: mispell-closes-bug #666666
+W: changelog-file-general: syntax-error-in-debian-changelog line 31 "badly formatted heading line"
+W: changelog-file-general: syntax-error-in-debian-changelog line 33 "found change data where expected next heading or eof"
X: changelog-file-general: bad-intended-distribution intended to experimental but uploaded to unstable
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: