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

[SCM] Debian package checker branch, master, updated. 8e894c3c810691e0a4274616d4e251b5471fb758



The following commit has been merged in the master branch:
commit 3af01fcde9c45c5d716980294034ac22eb6eda6a
Author: Russ Allbery <rra@debian.org>
Date:   Tue Jul 1 21:22:33 2008 -0700

    Further improvements to the duplicate word check from Raphael Geissert.

diff --git a/checks/description b/checks/description
index 5b2314d..9fc049d 100644
--- a/checks/description
+++ b/checks/description
@@ -117,9 +117,11 @@ while (<IN>) {
     }
 
     my $wo_quotes = $_;
-    $wo_quotes =~ s,(\"|\').*(\1),,;
-    if ($wo_quotes =~ m,(?:\W|^)((\w+)\s+(\2))(?:\W|$),i) {
-        tag "description-contains-duplicated-word", "$1";
+    $wo_quotes =~ s,(\"|\')(.*?)(\1),,;
+    while ($wo_quotes =~ m,(?:\W|^)((\w+)(\s+(\2))+)(?:\W|$),i) {
+	my $words = $1;
+	$wo_quotes =~ s/\Q$words//;
+        tag "description-contains-duplicated-word", "$words";
     }
 
     if ($lines == 1) {
diff --git a/testset/description/debian/control b/testset/description/debian/control
index 6ce5767..0a88f05 100644
--- a/testset/description/debian/control
+++ b/testset/description/debian/control
@@ -15,6 +15,8 @@ Description: description is a package which tests lintian's description checks.
  	not
  contain tabs.
  .control statements are not allowed as well.
+ .
+ All all all of of these these should be matched matched matched
 
 Package: description-foo
 Architecture: all
diff --git a/testset/tags.cdbs-test b/testset/tags.cdbs-test
index 579d3b9..6693542 100644
--- a/testset/tags.cdbs-test
+++ b/testset/tags.cdbs-test
@@ -8,4 +8,4 @@ W: cdbs-test source: no-human-maintainers
 W: cdbs-test source: out-of-date-standards-version 3.7.3 (current is 3.8.0)
 W: cdbs-test source: package-has-a-duplicate-build-relation cdbs, cdbs
 W: cdbs-test: debian-changelog-line-too-long line 1
-W: cdbs-test: description-contains-duplicated-word bla bla
+W: cdbs-test: description-contains-duplicated-word bla bla bla
diff --git a/testset/tags.description b/testset/tags.description
index 87eae2e..150012a 100644
--- a/testset/tags.description
+++ b/testset/tags.description
@@ -21,5 +21,9 @@ W: description-foo: description-starts-with-leading-spaces
 W: description-foo: possible-unindented-list-in-extended-description
 W: description: changelog-not-compressed-with-max-compression changelog.Debian.gz
 W: description: debian-changelog-file-contains-obsolete-user-emacs-settings
+W: description: description-contains-duplicated-word All all all
 W: description: description-contains-duplicated-word The the
+W: description: description-contains-duplicated-word matched matched matched
+W: description: description-contains-duplicated-word of of
+W: description: description-contains-duplicated-word these these
 W: description: description-synopsis-might-not-be-phrased-properly

-- 
Debian package checker


Reply to: