[lintian] 01/01: L::Check: Don't ignore midword punctuation in check_spelling()
This is an automated email from the git hooks/post-receive script.
jwilk pushed a commit to branch master
in repository lintian.
commit 53926f4939c65c511aa4e090e880a9580e17336a
Author: Jakub Wilk <jwilk@debian.org>
Date: Sat Mar 12 21:58:32 2016 +0100
L::Check: Don't ignore midword punctuation in check_spelling()
This partially reverts commit 0c114ec9502b4a9f31e368ad1a9496a3994fde47.
---
debian/changelog | 5 +++++
lib/Lintian/Check.pm | 2 +-
t/tests/binaries-spelling/debian/basic.c | 1 +
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 9851114..607baf9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,11 @@ lintian (2.5.43) UNRELEASED; urgency=medium
time substitution works again. Thanks to Stuart
Prescott for reporting the issue.
+ * lib/Lintian/Check.pm:
+ + [JW,ADB] Don't ignore midword punctuation characters when
+ spell-checking. (Closes: #818003) Thanks to Andreas Beckmann for
+ the bug report.
+
-- Niels Thykier <niels@thykier.net> Fri, 11 Mar 2016 18:35:45 +0000
lintian (2.5.42.1) unstable; urgency=medium
diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm
index 4f4b6c6..0f2d214 100644
--- a/lib/Lintian/Check.pm
+++ b/lib/Lintian/Check.pm
@@ -293,7 +293,7 @@ sub check_spelling {
strip($text);
for my $word (split(' ', $text)) {
- $word =~ tr/.,;:?!//d;
+ $word =~ s/[.,;:?!]+$//;
next if ($word =~ /^[A-Z]{1,5}\z/);
# Some exceptions are based on case (e.g. "teH").
next if exists($exceptions->{$word});
diff --git a/t/tests/binaries-spelling/debian/basic.c b/t/tests/binaries-spelling/debian/basic.c
index 84502ed..8e99ed3 100644
--- a/t/tests/binaries-spelling/debian/basic.c
+++ b/t/tests/binaries-spelling/debian/basic.c
@@ -16,6 +16,7 @@ main(void)
printf("I iz an exprimental speling error!\n");
printf("I also have teh broken teh!\n");
printf("But tEH non-broken tEh needs to be on its own line!\n");
+ printf("res.size is okay!\n"); /* #818003 */
hardening_trigger(NULL, 0, NULL);
return 0;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: