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

[lintian] 01/01: Don't warn about duplicate words when separated by punctuation. (Closes: #822504)



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit bc8468862fd0060af454b06193cd5cccb36073f7
Author: Chris Lamb <lamby@debian.org>
Date:   Sat Nov 4 20:16:21 2017 +0000

    Don't warn about duplicate words when separated by punctuation. (Closes: #822504)
---
 debian/changelog                                     | 4 ++++
 lib/Lintian/Check.pm                                 | 4 +++-
 t/tests/description-general/debian/debian/control.in | 2 ++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index a24df3b..e7835fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ lintian (2.5.59) UNRELEASED; urgency=medium
 
   XXX: generate tag summary
 
+  * lib/Lintian/Check.pm
+    + [CL] Don't warn about duplicate words when separated by punctuation.
+      (Closes: #822504)
+
   * data/fields/*:
     + [CL] Apply patch from Guillem Jover to add a "golang" archive
       section.  (Closes: #880701)
diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm
index 8fd0c53..4d5d52b 100644
--- a/lib/Lintian/Check.pm
+++ b/lib/Lintian/Check.pm
@@ -302,7 +302,9 @@ sub check_spelling {
         if ($duplicate_check and defined($last_word) and $last_word eq $word) {
             # Avoid flagging words inside quoted text.
             $code_ref->("$word $word (duplicate word)", $word)
-              if not $quoted and not $duplicates{$word}++;
+              if not $quoted
+              and not $duplicates{$word}++
+              and not $ends_with_punct;
         }
 
         if ($word =~ m/^[A-Za-z]+$/ and not $ends_with_punct) {
diff --git a/t/tests/description-general/debian/debian/control.in b/t/tests/description-general/debian/debian/control.in
index 327ccd3..6d08445 100644
--- a/t/tests/description-general/debian/debian/control.in
+++ b/t/tests/description-general/debian/debian/control.in
@@ -153,3 +153,5 @@ Description: test for spelling - debian developement
  Some Lintian test package.
  .
  Some more stuff about this Debian test package. (dummy)
+ .
+ Duplicate: Duplicate (false positive due to colon)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: