[lintian] 03/03: Be a little bit fuzzy for checking package name and short description
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit 5c7b29bf91ceea2f8acc374edecc51039477435a
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Fri Aug 8 12:00:39 2014 +0200
Be a little bit fuzzy for checking package name and short description
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
checks/description.pm | 8 ++++++--
debian/changelog | 2 +-
t/tests/description-general/desc | 1 +
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/checks/description.pm b/checks/description.pm
index bf9e551..dab3a55 100644
--- a/checks/description.pm
+++ b/checks/description.pm
@@ -82,8 +82,12 @@ sub run {
tag 'description-too-short';
}
my $pkg_fmt = lc $pkg;
- $pkg_fmt =~ s/[-_]/ /g;
- if ($pkg_fmt eq $synopsis) {
+ my $synopsis_fmt = lc $synopsis;
+ # made a fuzzy match
+ $pkg_fmt =~ s,[-_], ,g;
+ $synopsis_fmt =~ s,[-_/\\], ,g;
+ $synopsis_fmt =~ s,\s+, ,g;
+ if ($pkg_fmt eq $synopsis_fmt) {
tag 'description-is-pkg-name', $synopsis;
}
diff --git a/debian/changelog b/debian/changelog
index 3fc84ca..6040866 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,7 +37,7 @@ lintian (2.5.26) UNRELEASED; urgency=medium
+ [BR] Update ref url. (Closes: #755275).
* checks/description.{desc,pm}:
+ [SL] Check for one word short description. (Closes: #756643).
- + [SL] Check if the short description is the same as the
+ + [SL] Check if the short description is the same as the
package name. (Closes: #757398).
* data/cruft/warn-file-type:
diff --git a/t/tests/description-general/desc b/t/tests/description-general/desc
index 9be1b4f..3d8640d 100644
--- a/t/tests/description-general/desc
+++ b/t/tests/description-general/desc
@@ -11,6 +11,7 @@ Test-For:
description-contains-invalid-control-statement
description-contains-tabs
description-is-debmake-template
+ description-is-pkg-name
description-starts-with-leading-spaces
description-starts-with-package-name
description-synopsis-is-duplicated
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: