[SCM] Debian package checker branch, master, updated. 2.2.18-86-gb3d3668
The following commit has been merged in the master branch:
commit 6371630c1fbf41218af2b78f1f2972b98ad40e84
Author: Raphael Geissert <atomo64@gmail.com>
Date: Thu Dec 24 20:16:43 2009 -0600
Add some multi-word spelling errors
Look for "an other", "this packages" and "these package"
diff --git a/lib/Spelling.pm b/lib/Spelling.pm
index 62692fa..74b7493 100644
--- a/lib/Spelling.pm
+++ b/lib/Spelling.pm
@@ -599,12 +599,27 @@ sub spelling_check {
}
}
- # Special case for correcting a multi-word string.
+ # Special case for correcting multi-word strings.
if ($text =~ m,debian/gnu\s+linux,) {
$counter++;
_tag($tag, $filename, "Debian/GNU Linux", "Debian GNU/Linux")
if defined $tag;
}
+ if ($text =~ m,\ban other\b,) {
+ $counter++;
+ _tag($tag, $filename, "an other", "another")
+ if defined $tag;
+ }
+ if ($text =~ m,\bthis packages\b,) {
+ $counter++;
+ _tag($tag, $filename, "this packages", "these packages")
+ if defined $tag;
+ }
+ if ($text =~ m,\bthese package\b,) {
+ $counter++;
+ _tag($tag, $filename, "these package", "this package")
+ if defined $tag;
+ }
return $counter;
}
diff --git a/t/tests/spelling-multiword/debian/debian/control.in b/t/tests/spelling-multiword/debian/debian/control.in
index 2c656eb..8197d1f 100644
--- a/t/tests/spelling-multiword/debian/debian/control.in
+++ b/t/tests/spelling-multiword/debian/debian/control.in
@@ -14,4 +14,9 @@ Description: {$description}
things. It should not be installed like a regular package.
.
Spelling errors:
- * Debian/GNU Linux
+ * Debian/GNU Linux
+ * An other error
+ * This packages
+ .
+ Not errors:
+ * These packages
diff --git a/t/tests/spelling-multiword/tags b/t/tests/spelling-multiword/tags
index 424f3fa..a53d437 100644
--- a/t/tests/spelling-multiword/tags
+++ b/t/tests/spelling-multiword/tags
@@ -1 +1,3 @@
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
--
Debian package checker
Reply to: