[SCM] Debian package checker branch, master, updated. 2.2.18-86-gb3d3668
The following commit has been merged in the master branch:
commit b3d366835310f3ead3850d1412c1064e0194f81d
Author: Raphael Geissert <atomo64@gmail.com>
Date: Fri Dec 25 20:33:29 2009 -0600
Update multi-word spelling checks to work after recent case change
Additionally update the checks and test case to report/expect the
original words in their original case.
diff --git a/lib/Spelling.pm b/lib/Spelling.pm
index 74b7493..230c2cc 100644
--- a/lib/Spelling.pm
+++ b/lib/Spelling.pm
@@ -600,24 +600,24 @@ sub spelling_check {
}
# Special case for correcting multi-word strings.
- if ($text =~ m,debian/gnu\s+linux,) {
+ if ($text =~ m,(debian/gnu\s+linux),i) {
$counter++;
- _tag($tag, $filename, "Debian/GNU Linux", "Debian GNU/Linux")
+ _tag($tag, $filename, $1, "Debian GNU/Linux")
if defined $tag;
}
- if ($text =~ m,\ban other\b,) {
+ if ($text =~ m,\b(an other)\b,i) {
$counter++;
- _tag($tag, $filename, "an other", "another")
+ _tag($tag, $filename, $1, "another")
if defined $tag;
}
- if ($text =~ m,\bthis packages\b,) {
+ if ($text =~ m,\b(this packages)\b,i) {
$counter++;
- _tag($tag, $filename, "this packages", "these packages")
+ _tag($tag, $filename, $1, "these packages")
if defined $tag;
}
- if ($text =~ m,\bthese package\b,) {
+ if ($text =~ m,\b(these package)\b,i) {
$counter++;
- _tag($tag, $filename, "these package", "this package")
+ _tag($tag, $filename, $1, "this package")
if defined $tag;
}
diff --git a/t/tests/spelling-multiword/tags b/t/tests/spelling-multiword/tags
index a53d437..7961876 100644
--- a/t/tests/spelling-multiword/tags
+++ b/t/tests/spelling-multiword/tags
@@ -1,3 +1,3 @@
+W: spelling-multiword: spelling-error-in-description An other another
W: spelling-multiword: spelling-error-in-description Debian/GNU Linux Debian GNU/Linux
-W: spelling-multiword: spelling-error-in-description an other another
-W: spelling-multiword: spelling-error-in-description this packages these packages
+W: spelling-multiword: spelling-error-in-description This packages these packages
--
Debian package checker
Reply to: